My goal is to extract and print specific information (e.g., request type) from 
the Messages passing through the Garnet NetworkInterface instances. Within 
NetworkInterface::wakeup(), I’ve been able to print the messages by using:
DPRINTF(RubyNetwork, "Message: %s\n", *(msg_ptr.get()));

In FS sims, I’m able to get messages printed such as:
Message: [RequestMsg: addr = [0xb9a3cfc0, line 0xb9a3cfc0] Type = GETS 
AccessMode = Supervisor Requestor = L1Cache-1 Destination = [NetDest (20)  - 0 
0  - 0 1  -  - 0 0  - 0 0  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - ] 
MessageSize = Control DataBlk = [ 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 ] Len = 0 Dirty = 0 
Prefetch = No ]

Now here’s where I run into trouble. I’d like access to each individual field 
of the request Message, instead of printing it as output. I’ve tried 
dynamically casting to RubyRequestType and accessing the getType() method, but 
this does not work:

Is there a better way to access the message attributes and enums within the 
garnet network from Ruby/SLICC code?

Thanks in advance,
Vlad
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to