On 8/14/2023 1:42 PM, Khan Shaikhul Hadi wrote:
Initially I was thinking doing something like this as you suggested:
CpuSidePort cacheMemSidePortConnection = cache.memSidePort;
MemSidePort cacheCpuSidePortConnection = cache.cpuSidePort;
problem is when I looked into how python code done this connection, constructor
has
cpuSidePort(p.name <http://p.name> + ".cpu_side_port", *this,
"CpuSidePort"),
memSidePort(p.name <http://p.name> + ".mem_side_port", this,
"MemSidePort"),
So, when I was thinking about using CpuSidePort cacheMemSidePortConnection = cache.memSidePort, I
could not make sense of howto deal with those constructor arguments . Especially"this" pointer which
is supposed to be a pointer or reference to the cache object, but my simobject is not cache_object.
So, I'm not sure how to deal withthis.
Thanks for your input though.
Best
Shaikhul
If you have already declared Cache cache, then the Cache constructor has run
and the fields are
available for assigning to other variables - assuming they are public or you
can arrange access.
Of course you really need to write:
Cache cache(parameters to Cache constructor);
But perhaps you could clarify what you're really trying to do (bigger picture)
rather than
saying "I want this port connected to that one".
Best - EM
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org