diff --git a/fpga/hls/jf_conversion.cpp b/fpga/hls/jf_conversion.cpp index 035538c8..891386c8 100644 --- a/fpga/hls/jf_conversion.cpp +++ b/fpga/hls/jf_conversion.cpp @@ -139,7 +139,7 @@ void jf_conversion(STREAM_512 &data_in, STREAM_512 &data_out, ap_uint<64> mode = ACT_REG_MODE(packet_in.data); ap_uint<1> conversion = (mode & MODE_CONV) ? 1 : 0; - ap_uint<5> modules = ACT_REG_NMODULES(packet_in.data); + ap_uint<6> modules = ACT_REG_NMODULES(packet_in.data) + 1; ap_uint<32> in_one_over_energy = ACT_REG_ONE_OVER_ENERGY(packet_in.data); ap_uint<5> storage_cells = ACT_REG_NSTORAGE_CELLS(packet_in.data); diff --git a/receiver/FPGAAcquisitionDevice.cpp b/receiver/FPGAAcquisitionDevice.cpp index 32153691..41e8bbc3 100644 --- a/receiver/FPGAAcquisitionDevice.cpp +++ b/receiver/FPGAAcquisitionDevice.cpp @@ -202,7 +202,7 @@ void FPGAAcquisitionDevice::FillActionRegister(const DiffractionExperiment& x, D std::uniform_int_distribution dist; data_collection_id = dist(rd); - job.nmodules = x.GetModulesNum(data_stream); + job.nmodules = x.GetModulesNum(data_stream) - 1; job.nframes = x.GetFrameNum(); job.one_over_energy = std::lround((1<<20)/ x.GetPhotonEnergy_keV()); job.nstorage_cells = x.GetStorageCellNumber() - 1;