[Gems-users] Whether RUBY function could uses parameters defined in SLICC files


Date: Mon, 17 May 2010 11:32:47 +0800
From: "shanshuchang" <shanshuchang@xxxxxxxxx>
Subject: [Gems-users] Whether RUBY function could uses parameters defined in SLICC files

Hi all,

 

I just wanted to add a new structure in L1 cache. Just like the CacheMemory structure, I wrote a new file VictimBuffer.h and added it into ruby/system folder.

Then in L1cache.sm I defined the Entry structure and declared the function written in the C file like this:

 

structure(VEntry, desc="...", interface="AbstractCacheEntry") {

int in_living,       desc="how long the victim data has been in VICTIM";

}

 

  external_type(VictimBuffer) {

    VEntry lookup(Address);

Address victim();

  }

 

The value of the in_living parameter is modified here and there in L1cache.sm file.

Also I found that, in the generated codes, the defined in_living parameter can be called by function getin_living() function.

So I wonder whether the external function in VictimBuffer.h which called the getin_living() function could correctly obtain the modified in_living data?

 

 

Thanks in advance!

shuchang

[← Prev in Thread] Current Thread [Next in Thread→]
  • [Gems-users] Whether RUBY function could uses parameters defined in SLICC files, shanshuchang <=