From 8fc06589cbf28b2a5bf13384d1c683dc50f68a8a Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Thu, 23 Feb 2006 13:51:54 -0500 Subject: Update functional memory to have a response event Clean out old memory python files, move them into old_mem directory. Maybe we should just delete them, they are under revision control. Add new py files for new objects. SConscript: Update because memory is just a header file now base/chunk_generator.hh: Make Chunk Generator return the entire size if the chunk_size is set to zero. Useful when trying to chunck on blocksize of memory, which can write large pieces of data. cpu/simple/cpu.cc: Make sure to delete the pkt. mem/physical.cc: mem/physical.hh: Set up response event. mem/port.cc: Rename rqst to req to conform to same standard naming convention. python/m5/objects/PhysicalMemory.py: Update the params, inheritence --HG-- extra : convert_revision : 857154ec256522baf423b715833930497999549b --- base/chunk_generator.hh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'base') diff --git a/base/chunk_generator.hh b/base/chunk_generator.hh index 83caaca88..afd577814 100644 --- a/base/chunk_generator.hh +++ b/base/chunk_generator.hh @@ -82,11 +82,18 @@ class ChunkGenerator // set up initial chunk. curAddr = startAddr; - // nextAddr should be *next* chunk start - nextAddr = roundUp(startAddr, chunkSize); - if (curAddr == nextAddr) { - // ... even if startAddr is already chunk-aligned - nextAddr += chunkSize; + if (chunkSize == 0) //Special Case, if we see 0, assume no chuncking + { + nextAddr = startAddr + totalSize; + } + else + { + // nextAddr should be *next* chunk start + nextAddr = roundUp(startAddr, chunkSize); + if (curAddr == nextAddr) { + // ... even if startAddr is already chunk-aligned + nextAddr += chunkSize; + } } // how many bytes are left between curAddr and the end of this chunk? -- cgit v1.2.3