-
How should I communicate the ICache line size from the ICache unit to the Fetch unit? I want to prevent fetching past the end of the cache line. Ports are for dynamic inter-unit communication. Can one unit access another's parameters? If so, is there an example in Olympia and will the accessed parameters include the default values? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
One solution (just as a workaround) would to use two different params, one for fetch unit, another Icache unit and user being responsible such that values of those parameters are equal. This is just to test rest of the code. The other more permanent solution could be to specifiy icache line size as a global simulation argument, just like workload/trace is specified. I agree better solution would for one sparta unit to access the value of the parameter for other sparta unit. @klingaard is that possible? |
Beta Was this translation helpful? Give feedback.
-
There are a couple of avenues. For one, if you are designing the Fetch block to always have the icache as a child of the Fetch unit, you can (in the constructor of Fetch) grab the parameters of the icache block and query the size:
The way I prefer the icache size to be defined and retrieved is to do something similar to what Arup says and make the parameter a core extension. To this file (and this function), add this code:
and add the
You can get the ICache size in both the Fetch Unit and the ICache Unit via a helper method you add to CoreUtils.hpp. |
Beta Was this translation helpful? Give feedback.
One solution (just as a workaround) would to use two different params, one for fetch unit, another Icache unit and user being responsible such that values of those parameters are equal. This is just to test rest of the code.
The other more permanent solution could be to specifiy icache line size as a global simulation argument, just like workload/trace is specified.
I agree better solution would for one sparta unit to access the value of the parameter for other sparta unit. @klingaard is that possible?