| 
 Hi all, 
I am trying to add a new field in structure Entry which is 
defined in MOESI_CMP_directory-L1cache.sm: 
      
structure(Entry, desc="...", interface="AbstractCacheEntry") 
{         State 
CacheState,        desc="cache 
state";         bool 
Dirty,              
desc="Is the data dirty (different than 
memory)?";         DataBlock 
DataBlk,       desc="data for the 
block";            // 
added  
        NodeID 
m_id,             
desc="the processor related to the L1 
cache";         int numofprocessors,      
desc="the number of processors in the 
chip";              
}
  (1)Can the NodeID be implicitly used in SLICC ? That is, can I directly 
use NodeID as a parameter in structure Entry? If not 
,should I use MachineID as a parameter and then use function 
NodeID L1CacheMachIDToProcessorNum(MachineID machID) to convert it 
when needed? 
  
(2)The NodeID is defined to be of type 'int'(ruby/system/NodeID.h),but when I use it 
as int in a comparator like this: 
  
    NodeID id; 
    id < 5;  
  
When I try to compiled the L1cache.sm, there are 
errors:
      
../protocols/MOESI_CMP_directory-L1cache.sm:282: Error: Type mismatch: left 
operand of operator '<=' expects input type 'int', actual was 
NodeID'     make[1]: *** 
[generated/MOESI_CMP_directory/generated] Error 1     make[1]: 
Leaving directory `/export/workspace/shanshuchang/gems/ruby'
  
How can I use NodeID as a 'int' 
type? 
  
(3) How can I get the number of processors in 
slicc?
 
  
I am sorry for so much questions, but I want to step forward 
for my work... 
Any help will be appreciated! 
 |