1
0

fix dramsim2 memory model to wrap around

- there was a problem when the I$ speculatively fetched an instruction from an illegal address
This commit is contained in:
Yunsup Lee 2013-01-23 01:40:15 -08:00
parent 217898c7d0
commit f37b9d9a7d

View File

@ -79,8 +79,8 @@ void mm_dramsim2_t::tick
if (req_cmd_fire) if (req_cmd_fire)
{ {
auto byte_addr = req_cmd_addr*REFILL_COUNT*MM_WORD_SIZE; // since the I$ can speculatively ask for address that are out of bounds
assert(byte_addr < size); auto byte_addr = (req_cmd_addr*REFILL_COUNT*MM_WORD_SIZE) % size;
if (req_cmd_store) if (req_cmd_store)
{ {