diff --git a/DRAMSys/simulator/src/simulation/Dram.h b/DRAMSys/simulator/src/simulation/Dram.h index e84edd52..8440487b 100644 --- a/DRAMSys/simulator/src/simulation/Dram.h +++ b/DRAMSys/simulator/src/simulation/Dram.h @@ -68,8 +68,10 @@ struct Dram : sc_module unsigned int burstLength = Configuration::getInstance().memSpec.BurstLength; // All DRAM chips on a DIMM operate in lockstep, // which constituing aggregate data bus width = chip's bus width * # locksteep-operated chips + // The bus width is given in bits, e.g., 64-bit data bus, 128-bit data bus, etc. unsigned int dataBusWidth = Configuration::getInstance().memSpec.bitWidth * Configuration::getInstance().NumberOfDevicesOnDIMM; - unsigned int bytesPerBurst = burstLength * (dataBusWidth / 8); + // First multiply to get the number of bits in a burst, then divide by 8 to get the value in bytes (the order is important. Think on a single x4 device) + unsigned int bytesPerBurst = (burstLength * dataBusWidth) / 8; // TLM Related: tlm_utils::simple_target_socket tSocket;