mem,sim: Change the type of cache_line_size to Addr

Change-Id: Id39e8249fef89c0d59bb39f8104650257ff00245
Signed-off-by: Hoa Nguyen <hn@hnpl.org>
This commit is contained in:
Hoa Nguyen
2023-09-20 13:49:10 -07:00
parent 9057eeabec
commit ac5280fedc
3 changed files with 8 additions and 8 deletions

View File

@@ -44,12 +44,12 @@
namespace gem5
{
PortProxy::PortProxy(ThreadContext *tc, unsigned int cache_line_size) :
PortProxy::PortProxy(ThreadContext *tc, Addr cache_line_size) :
PortProxy([tc](PacketPtr pkt)->void { tc->sendFunctional(pkt); },
cache_line_size)
{}
PortProxy::PortProxy(const RequestPort &port, unsigned int cache_line_size) :
PortProxy::PortProxy(const RequestPort &port, Addr cache_line_size) :
PortProxy([&port](PacketPtr pkt)->void { port.sendFunctional(pkt); },
cache_line_size)
{}

View File

@@ -92,7 +92,7 @@ class PortProxy : FunctionalRequestProtocol
SendFunctionalFunc sendFunctional;
/** Granularity of any transactions issued through this proxy. */
const unsigned int _cacheLineSize;
const Addr _cacheLineSize;
void
recvFunctionalSnoop(PacketPtr pkt) override
@@ -103,13 +103,13 @@ class PortProxy : FunctionalRequestProtocol
}
public:
PortProxy(SendFunctionalFunc func, unsigned int cache_line_size) :
PortProxy(SendFunctionalFunc func, Addr cache_line_size) :
sendFunctional(func), _cacheLineSize(cache_line_size)
{}
// Helpers which create typical SendFunctionalFunc-s from other objects.
PortProxy(ThreadContext *tc, unsigned int cache_line_size);
PortProxy(const RequestPort &port, unsigned int cache_line_size);
PortProxy(ThreadContext *tc, Addr cache_line_size);
PortProxy(const RequestPort &port, Addr cache_line_size);
virtual ~PortProxy() {}

View File

@@ -305,7 +305,7 @@ class System : public SimObject, public PCEventScope
/**
* Get the cache line size of the system.
*/
unsigned int cacheLineSize() const { return _cacheLineSize; }
Addr cacheLineSize() const { return _cacheLineSize; }
Threads threads;
@@ -405,7 +405,7 @@ class System : public SimObject, public PCEventScope
enums::MemoryMode memoryMode;
const unsigned int _cacheLineSize;
const Addr _cacheLineSize;
uint64_t workItemsBegin = 0;
uint64_t workItemsEnd = 0;