From e0419b2530d2a63af9c55cc3d370719e65baca1f Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Wed, 9 Oct 2019 09:45:51 +0100 Subject: base: Add classes that encapsulate a channel address There are cases where the memory system needs to reason about channel-local addresses. These are currently represented using the Addr and AddrRange classes. This is not ideal since it doesn't provide any type safety when working with global addresses and channel-local addresses. This is particularly problematic when porting existing components to work in multi-channel configurations. This changeset introduces the new ChannelAddr and ChannelAddrRange classes. These classes encapsulate channel-local addresses in a contiguous address space. These can, for example, be used in a memory controller to represent a flat address space when calculating timings or in a sectored cache. Change-Id: I45d4061ebc8507a10d0a4577b28796dc5ec7a469 Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21600 Reviewed-by: Bobby R. Bruce Reviewed-by: Daniel Carvalho Reviewed-by: Nikos Nikoleris Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/base/SConscript | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/base/SConscript') diff --git a/src/base/SConscript b/src/base/SConscript index b4b381bf1..129110fef 100644 --- a/src/base/SConscript +++ b/src/base/SConscript @@ -40,6 +40,7 @@ Source('imgwriter.cc') Source('bmpwriter.cc') Source('callback.cc') GTest('callback.test', 'callback.test.cc', 'callback.cc') +Source('channel_addr.cc') Source('cprintf.cc', add_tags='gtest lib') GTest('cprintf.test', 'cprintf.test.cc') Source('debug.cc') @@ -90,6 +91,7 @@ if env['USE_HDF5']: GTest('addr_range.test', 'addr_range.test.cc') GTest('addr_range_map.test', 'addr_range_map.test.cc') GTest('bitunion.test', 'bitunion.test.cc') +GTest('channel_addr.test', 'channel_addr.test.cc') GTest('circlebuf.test', 'circlebuf.test.cc') GTest('circular_queue.test', 'circular_queue.test.cc') GTest('sat_counter.test', 'sat_counter.test.cc') -- cgit v1.2.3