I am looking into the method you described but I am just wondering how I can 
add C++ code by defining a structure as external. I don't know where to put the 
C++ file and what else I would also need.

- Alex



On Thursday, October 3, 2013 9:36:31 AM, Alex <[email protected]> wrote:
 
Hello,

For my L2 caches I require each cache entry to not only contain the cache state 
of the L2 cache, but also contain the cache state of the L1 Caches that are 
connected to it. There tends to be more then one L1 cache so that means I will 
have to use an array to store the L1 cache states. I want the number of L1 
states required to be deteremined by a command line input.

I will take a look into the method you described. 

- Alex


Malek Musleh <[email protected]> wrote:



Alex,

It's not clear why your trying to do what your asking. It might be easier to 
create a new C++ Class (or append some members to an existing C++ Class such as 
Sequencer/CacheMemory/Prefetcher depending on what your trying to do), and 
access whatever arrays/data structures you want via function calls from slicc:

l1dCacheMemory.getDataStructures(); Sure, there might be some "extra" function 
call overhead if you do it repeatedly, but its easier than trying to hack in 
new ways into SLICC.

Look at RubySlicc_Types.sm at how the members of external c++ classes are 
declared.

Malek



On Wed, Oct 2, 2013 at 7:29 PM, Alex Tomala <[email protected]> wrote:

Hello,
>
>
>I am trying to figure out a way to declare an array of an enumerated type, but 
>I seem to have issues with it. None of the standard C++ methods work, so I am 
>wondering if they is anyway to make an array with SLICC (or find a way around 
>it).
>
>- Alex
>_______________________________________________
>gem5-users mailing list
>[email protected]
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>

Alex,

It's not clear why your trying to do what your asking. It might be easier
to create a new C++ Class (or append some members to an existing C++ Class
such as Sequencer/CacheMemory/Prefetcher depending on what your trying to
do), and access whatever arrays/data structures you want via function calls
from slicc:

l1dCacheMemory.getDataStructures(); Sure, there might be some "extra"
function call overhead if you do it repeatedly, but its easier than trying
to hack in new ways into SLICC.

Look at RubySlicc_Types.sm at how the members of external c++ classes are
declared.

Malek


On Wed, Oct 2, 2013 at 7:29 PM, Alex Tomala <[email protected]> wrote:

> Hello,
>
> I am trying to figure out a way to declare an array of an enumerated type,
> but I seem to have issues with it. None of the standard C++ methods work,
> so I am wondering if they is anyway to make an array with SLICC (or find a
> way around it).
>
> - Alex
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to