Hi all,

I am trying to modify the SimpleDRAM module to profile the data contents in
phymem.

In simple_dram.cc, the *docodeAddr()* function shows how to get the rank
and the bank addresses for given request *pkt*.
I wonder, given* pkt->getAddr()*, how to calculate the row address?

It seems that, a dram row contains 64 (linesPerRow = 64) 64-Byte data
blocks, and I want to read out the whole row data into a self-defined data
structure ( namely row_data).

The detailed codes are like this:

*uint8_t *myHostAddr = pmemAddr + (pkt->getAddr() - pkt->getAddr()
% linesPerRow)  - range.start;*
*
*
*int row_size = pkt->getSize()*64;*
*uint8_t row_data[row_size];*
*memcpy(row_data, **myHostAddr **, row_size ); // read the whole MEM row
data out into the array structure: row_data*


I am not sure whether the calculation of the row address is right. Any
advice will be appreciated.

Regards,
shuchang
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to