base: Add classes that encapsulate a channel address
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 9 Oct 2019 08:45:51 +0000 (09:45 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 18 Oct 2019 09:45:01 +0000 (09:45 +0000)
commite0419b2530d2a63af9c55cc3d370719e65baca1f
tree4645794362f9cabf4d5f246cd0dc93425b3b6941
parent85e7a59cf0fa0faf4ba6ce61207a863d8840c453
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 <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21600
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/SConscript
src/base/channel_addr.cc [new file with mode: 0644]
src/base/channel_addr.hh [new file with mode: 0644]
src/base/channel_addr.test.cc [new file with mode: 0644]