From f37b9d9a7dcbe86e9f7a9c2fed223c03fc5d43cf Mon Sep 17 00:00:00 2001 From: Yunsup Lee Date: Wed, 23 Jan 2013 01:40:15 -0800 Subject: [PATCH] fix dramsim2 memory model to wrap around - there was a problem when the I$ speculatively fetched an instruction from an illegal address --- csrc/mm_dramsim2.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csrc/mm_dramsim2.cc b/csrc/mm_dramsim2.cc index b2de8cac..6be9eaf6 100644 --- a/csrc/mm_dramsim2.cc +++ b/csrc/mm_dramsim2.cc @@ -79,8 +79,8 @@ void mm_dramsim2_t::tick if (req_cmd_fire) { - auto byte_addr = req_cmd_addr*REFILL_COUNT*MM_WORD_SIZE; - assert(byte_addr < size); + // since the I$ can speculatively ask for address that are out of bounds + auto byte_addr = (req_cmd_addr*REFILL_COUNT*MM_WORD_SIZE) % size; if (req_cmd_store) {