umd-memsys / DRAMSim2

DRAMSim2: A cycle accurate DRAM simulator
http://www.ece.umd.edu/~blj/papers/cal10-1.pdf
255 stars 151 forks source link

the latency histogram in the output file only contains read latency? #29

Open chenxiancool opened 11 years ago

chenxiancool commented 11 years ago

hi, Recently, I spent some time to analysis the sourcecode. I found that the latency histogram in the output file only contains read latency. Why not take write transactions into account? thanks ,:)

dramninjasUMD commented 11 years ago

Write latency is not all that relevant and hard to define. From a system level, as soon as a memory controller accepts a write transaction, it is "done" (since the CPU no longer cares what happens to it). If you count a write as done when the CAS-W issues to the actual bank, that's not really all that useful either.

Writes basically just slow down reads and so the effect of the writes is seen in the read latency.

chenxiancool commented 11 years ago

Thanks for your reply! Yeah, read latency is more meaningful. But, another question also bothers me. How could I get the total energy consumed by each write or read operation? I know a read transaction contains several detail operations, and I have to calculate every part, then sum the subcomponents to calculate the total energy consumed by one transaction. Take read transaction for example, it should contain act energy, read energy, precharge energy, refresh energy and standby energy. Just for read operation,I wonder if the below equation works. I refered to the method you ues to calculate the power. Eread = (IDD4R - IDD3N)_BL/2_NUM_DEVICES*tCK

the result is in pJ.

dramninjasUMD commented 11 years ago

So you want to compute this on a per-transaction granularity? Are you interested in open page or closed page mode?

Your formula looks OK to me but it doesn't include the precharge and refresh components. Also, your result is not in joules, it's actually in amps (you need to include voltage somewhere to get to joules). DRAMSim2 accumulates the current values and multiplies by voltage later.

chenxiancool commented 11 years ago

Many thanks for your remind! So sorry to miss the voltage in my equation. My motivation is to calculate the whole energy consumed by all the transactions from the trace file generated by GEM5 or other fulll system simulator(integrateing DRAMSIM2 into GEM5 may be a good way :) ). Now,I chose closed page mode for it seems easier to calculate the act and precharge energy. In DRAMSim2, the variable member "actpreEnergy[]" (MemoryController.h) seems to calculate the whole energy consumed by ACT and PRECHARGE operation (for accurately , it's not the energy for missing some components e.g. voltage ). It is used as below: actpreEnergy[rank]+=((IDD0 * tRC)-((IDD3N)tRAS)+(IDD2N(tRC - tRAS))))*NUM_DEVICES, although it is in rank granularity.

Then I think the equation below can get the energy consumed by ACT and PRECHARGE operations. actpreEnergy+=((IDD0 * tRC)-((IDD3N)tRAS)+(IDD2N(tRC - tRAS))))_NUM_DEVICES_tCK*Vdd

chenxiancool commented 11 years ago

I devied the who energy into four parts: energy consumed by ACT and Precharge operations energy consumed by read or write operations from or to the buffer energy consumed by refresh operation and the background energy

swanandM commented 9 years ago

Hello,

I have some doubts regarding actual simulation. In which .CPP file the actual simulation process starts. Means the process before calculating Total return transactions and avg. bandwidth . Can you please help me with this. Thanks.