encountered the usual "too many items and not enough belts" in factorio and solved it with a bit of Verilog
always @(posedge update) begin
science_x_delta <= science_x_in + science_x_out * -1;
science_x_mem <= science_x_mem + science_x_delta;
end