slicc: added vnet_type field to identify response vnets from others

Identifying response vnets versus other vnets will allow garnet to
determine which vnets will carry data packets, and which will carry
ctrl packets, and use appropriate buffer sizes (since data packets are larger
than ctrl packets). This in turn allows the orion power model to accurately
estimate buffer power.
This commit is contained in:
Tushar Krishna 2011-05-18 03:06:07 -04:00
parent 26eaba4cb5
commit 3ed048e4f5
25 changed files with 115 additions and 100 deletions

View file

@ -39,17 +39,17 @@ machine(L1Cache, "MSI Directory L1 Cache CMP")
// NODE L1 CACHE // NODE L1 CACHE
// From this node's L1 cache TO the network // From this node's L1 cache TO the network
// a local L1 -> this L2 bank, currently ordered with directory forwarded requests // a local L1 -> this L2 bank, currently ordered with directory forwarded requests
MessageBuffer requestFromL1Cache, network="To", virtual_network="0", ordered="false"; MessageBuffer requestFromL1Cache, network="To", virtual_network="0", ordered="false", vnet_type="request";
// a local L1 -> this L2 bank // a local L1 -> this L2 bank
MessageBuffer responseFromL1Cache, network="To", virtual_network="1", ordered="false"; MessageBuffer responseFromL1Cache, network="To", virtual_network="1", ordered="false", vnet_type="response";
MessageBuffer unblockFromL1Cache, network="To", virtual_network="2", ordered="false"; MessageBuffer unblockFromL1Cache, network="To", virtual_network="2", ordered="false", vnet_type="unblock";
// To this node's L1 cache FROM the network // To this node's L1 cache FROM the network
// a L2 bank -> this L1 // a L2 bank -> this L1
MessageBuffer requestToL1Cache, network="From", virtual_network="0", ordered="false"; MessageBuffer requestToL1Cache, network="From", virtual_network="0", ordered="false", vnet_type="request";
// a L2 bank -> this L1 // a L2 bank -> this L1
MessageBuffer responseToL1Cache, network="From", virtual_network="1", ordered="false"; MessageBuffer responseToL1Cache, network="From", virtual_network="1", ordered="false", vnet_type="response";
// STATES // STATES
state_declaration(State, desc="Cache states", default="L1Cache_State_I") { state_declaration(State, desc="Cache states", default="L1Cache_State_I") {

View file

@ -40,15 +40,15 @@ machine(L2Cache, "MESI Directory L2 Cache CMP")
{ {
// L2 BANK QUEUES // L2 BANK QUEUES
// From local bank of L2 cache TO the network // From local bank of L2 cache TO the network
MessageBuffer DirRequestFromL2Cache, network="To", virtual_network="0", ordered="false"; // this L2 bank -> Memory MessageBuffer DirRequestFromL2Cache, network="To", virtual_network="0", ordered="false", vnet_type="request"; // this L2 bank -> Memory
MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="0", ordered="false"; // this L2 bank -> a local L1 MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="0", ordered="false", vnet_type="request"; // this L2 bank -> a local L1
MessageBuffer responseFromL2Cache, network="To", virtual_network="1", ordered="false"; // this L2 bank -> a local L1 || Memory MessageBuffer responseFromL2Cache, network="To", virtual_network="1", ordered="false", vnet_type="response"; // this L2 bank -> a local L1 || Memory
// FROM the network to this local bank of L2 cache // FROM the network to this local bank of L2 cache
MessageBuffer unblockToL2Cache, network="From", virtual_network="2", ordered="false"; // a local L1 || Memory -> this L2 bank MessageBuffer unblockToL2Cache, network="From", virtual_network="2", ordered="false", vnet_type="unblock"; // a local L1 || Memory -> this L2 bank
MessageBuffer L1RequestToL2Cache, network="From", virtual_network="0", ordered="false"; // a local L1 -> this L2 bank MessageBuffer L1RequestToL2Cache, network="From", virtual_network="0", ordered="false", vnet_type="request"; // a local L1 -> this L2 bank
MessageBuffer responseToL2Cache, network="From", virtual_network="1", ordered="false"; // a local L1 || Memory -> this L2 bank MessageBuffer responseToL2Cache, network="From", virtual_network="1", ordered="false", vnet_type="response"; // a local L1 || Memory -> this L2 bank
// MessageBuffer unblockToL2Cache, network="From", virtual_network="4", ordered="false"; // a local L1 || Memory -> this L2 bank // MessageBuffer unblockToL2Cache, network="From", virtual_network="4", ordered="false", vnet_type="unblock"; // a local L1 || Memory -> this L2 bank
// STATES // STATES
state_declaration(State, desc="L2 Cache states", default="L2Cache_State_NP") { state_declaration(State, desc="L2 Cache states", default="L2Cache_State_NP") {

View file

@ -42,11 +42,11 @@ machine(Directory, "MESI_CMP_filter_directory protocol")
int directory_latency = 6 int directory_latency = 6
{ {
MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false"; MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false", vnet_type="request";
MessageBuffer responseToDir, network="From", virtual_network="1", ordered="false"; MessageBuffer responseToDir, network="From", virtual_network="1", ordered="false", vnet_type="response";
MessageBuffer requestFromDir, network="To", virtual_network="0", ordered="false"; MessageBuffer requestFromDir, network="To", virtual_network="0", ordered="false", vnet_type="request";
MessageBuffer responseFromDir, network="To", virtual_network="1", ordered="false"; MessageBuffer responseFromDir, network="To", virtual_network="1", ordered="false", vnet_type="response";
// STATES // STATES
state_declaration(State, desc="Directory states", default="Directory_State_I") { state_declaration(State, desc="Directory states", default="Directory_State_I") {

View file

@ -4,8 +4,8 @@ machine(DMA, "DMA Controller")
int request_latency = 6 int request_latency = 6
{ {
MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", no_vector="true"; MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", vnet_type="response", no_vector="true";
MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", no_vector="true"; MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", vnet_type="request", no_vector="true";
state_declaration(State, desc="DMA states", default="DMA_State_READY") { state_declaration(State, desc="DMA states", default="DMA_State_READY") {
READY, AccessPermission:Invalid, desc="Ready to accept a new request"; READY, AccessPermission:Invalid, desc="Ready to accept a new request";

View file

@ -43,17 +43,17 @@ machine(L1Cache, "Directory protocol")
// NODE L1 CACHE // NODE L1 CACHE
// From this node's L1 cache TO the network // From this node's L1 cache TO the network
// a local L1 -> this L2 bank, currently ordered with directory forwarded requests // a local L1 -> this L2 bank, currently ordered with directory forwarded requests
MessageBuffer requestFromL1Cache, network="To", virtual_network="0", ordered="false"; MessageBuffer requestFromL1Cache, network="To", virtual_network="0", ordered="false", vnet_type="request";
// a local L1 -> this L2 bank // a local L1 -> this L2 bank
MessageBuffer responseFromL1Cache, network="To", virtual_network="2", ordered="false"; MessageBuffer responseFromL1Cache, network="To", virtual_network="2", ordered="false", vnet_type="response";
// MessageBuffer writebackFromL1Cache, network="To", virtual_network="3", ordered="false"; // MessageBuffer writebackFromL1Cache, network="To", virtual_network="3", ordered="false", vnet_type="writeback";
// To this node's L1 cache FROM the network // To this node's L1 cache FROM the network
// a L2 bank -> this L1 // a L2 bank -> this L1
MessageBuffer requestToL1Cache, network="From", virtual_network="0", ordered="false"; MessageBuffer requestToL1Cache, network="From", virtual_network="0", ordered="false", vnet_type="request";
// a L2 bank -> this L1 // a L2 bank -> this L1
MessageBuffer responseToL1Cache, network="From", virtual_network="2", ordered="false"; MessageBuffer responseToL1Cache, network="From", virtual_network="2", ordered="false", vnet_type="response";

View file

@ -40,15 +40,15 @@ machine(L2Cache, "Token protocol")
// L2 BANK QUEUES // L2 BANK QUEUES
// From local bank of L2 cache TO the network // From local bank of L2 cache TO the network
MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="0", ordered="false"; // this L2 bank -> a local L1 MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="0", ordered="false", vnet_type="request"; // this L2 bank -> a local L1
MessageBuffer GlobalRequestFromL2Cache, network="To", virtual_network="1", ordered="false"; // this L2 bank -> mod-directory MessageBuffer GlobalRequestFromL2Cache, network="To", virtual_network="1", ordered="false", vnet_type="request"; // this L2 bank -> mod-directory
MessageBuffer responseFromL2Cache, network="To", virtual_network="2", ordered="false"; // this L2 bank -> a local L1 || mod-directory MessageBuffer responseFromL2Cache, network="To", virtual_network="2", ordered="false", vnet_type="response"; // this L2 bank -> a local L1 || mod-directory
// FROM the network to this local bank of L2 cache // FROM the network to this local bank of L2 cache
MessageBuffer L1RequestToL2Cache, network="From", virtual_network="0", ordered="false"; // a local L1 -> this L2 bank, Lets try this??? MessageBuffer L1RequestToL2Cache, network="From", virtual_network="0", ordered="false", vnet_type="request"; // a local L1 -> this L2 bank, Lets try this???
MessageBuffer GlobalRequestToL2Cache, network="From", virtual_network="1", ordered="false"; // mod-directory -> this L2 bank MessageBuffer GlobalRequestToL2Cache, network="From", virtual_network="1", ordered="false", vnet_type="request"; // mod-directory -> this L2 bank
MessageBuffer responseToL2Cache, network="From", virtual_network="2", ordered="false"; // a local L1 || mod-directory -> this L2 bank MessageBuffer responseToL2Cache, network="From", virtual_network="2", ordered="false", vnet_type="response"; // a local L1 || mod-directory -> this L2 bank
// MessageBuffer L1WritebackToL2Cache, network="From", virtual_network="3", ordered="false"; // MessageBuffer L1WritebackToL2Cache, network="From", virtual_network="3", ordered="false", vnet_type="writeback";
// STATES // STATES
state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") { state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") {

View file

@ -38,13 +38,13 @@ machine(Directory, "Directory protocol")
{ {
// ** IN QUEUES ** // ** IN QUEUES **
MessageBuffer foo1, network="From", virtual_network="0", ordered="false"; // a mod-L2 bank -> this Dir MessageBuffer foo1, network="From", virtual_network="0", ordered="false", vnet_type="foo"; // a mod-L2 bank -> this Dir
MessageBuffer requestToDir, network="From", virtual_network="1", ordered="false"; // a mod-L2 bank -> this Dir MessageBuffer requestToDir, network="From", virtual_network="1", ordered="false", vnet_type="request"; // a mod-L2 bank -> this Dir
MessageBuffer responseToDir, network="From", virtual_network="2", ordered="false"; // a mod-L2 bank -> this Dir MessageBuffer responseToDir, network="From", virtual_network="2", ordered="false", vnet_type="response"; // a mod-L2 bank -> this Dir
MessageBuffer goo1, network="To", virtual_network="0", ordered="false"; MessageBuffer goo1, network="To", virtual_network="0", ordered="false", vnet_type="goo";
MessageBuffer forwardFromDir, network="To", virtual_network="1", ordered="false"; MessageBuffer forwardFromDir, network="To", virtual_network="1", ordered="false", vnet_type="forward";
MessageBuffer responseFromDir, network="To", virtual_network="2", ordered="false"; // Dir -> mod-L2 bank MessageBuffer responseFromDir, network="To", virtual_network="2", ordered="false", vnet_type="response"; // Dir -> mod-L2 bank
// STATES // STATES

View file

@ -5,13 +5,13 @@ machine(DMA, "DMA Controller")
int response_latency = 14 int response_latency = 14
{ {
MessageBuffer goo1, network="From", virtual_network="0", ordered="false"; MessageBuffer goo1, network="From", virtual_network="0", ordered="false", vnet_type="goo";
MessageBuffer goo2, network="From", virtual_network="1", ordered="false"; MessageBuffer goo2, network="From", virtual_network="1", ordered="false", vnet_type="goo";
MessageBuffer responseFromDir, network="From", virtual_network="2", ordered="false"; MessageBuffer responseFromDir, network="From", virtual_network="2", ordered="false", vnet_type="response";
MessageBuffer foo1, network="To", virtual_network="0", ordered="false"; MessageBuffer foo1, network="To", virtual_network="0", ordered="false", vnet_type="foo";
MessageBuffer reqToDir, network="To", virtual_network="1", ordered="false"; MessageBuffer reqToDir, network="To", virtual_network="1", ordered="false", vnet_type="request";
MessageBuffer respToDir, network="To", virtual_network="2", ordered="false"; MessageBuffer respToDir, network="To", virtual_network="2", ordered="false", vnet_type="dmaresponse";
state_declaration(State, desc="DMA states", default="DMA_State_READY") { state_declaration(State, desc="DMA states", default="DMA_State_READY") {
READY, AccessPermission:Invalid, desc="Ready to accept a new request"; READY, AccessPermission:Invalid, desc="Ready to accept a new request";

View file

@ -49,18 +49,18 @@ machine(L1Cache, "Token protocol")
// From this node's L1 cache TO the network // From this node's L1 cache TO the network
// a local L1 -> this L2 bank // a local L1 -> this L2 bank
MessageBuffer responseFromL1Cache, network="To", virtual_network="4", ordered="false"; MessageBuffer responseFromL1Cache, network="To", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer persistentFromL1Cache, network="To", virtual_network="3", ordered="true"; MessageBuffer persistentFromL1Cache, network="To", virtual_network="3", ordered="true", vnet_type="persistent";
// a local L1 -> this L2 bank, currently ordered with directory forwarded requests // a local L1 -> this L2 bank, currently ordered with directory forwarded requests
MessageBuffer requestFromL1Cache, network="To", virtual_network="1", ordered="false"; MessageBuffer requestFromL1Cache, network="To", virtual_network="1", ordered="false", vnet_type="request";
// To this node's L1 cache FROM the network // To this node's L1 cache FROM the network
// a L2 bank -> this L1 // a L2 bank -> this L1
MessageBuffer responseToL1Cache, network="From", virtual_network="4", ordered="false"; MessageBuffer responseToL1Cache, network="From", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer persistentToL1Cache, network="From", virtual_network="3", ordered="true"; MessageBuffer persistentToL1Cache, network="From", virtual_network="3", ordered="true", vnet_type="persistent";
// a L2 bank -> this L1 // a L2 bank -> this L1
MessageBuffer requestToL1Cache, network="From", virtual_network="1", ordered="false"; MessageBuffer requestToL1Cache, network="From", virtual_network="1", ordered="false", vnet_type="request";
// STATES // STATES
state_declaration(State, desc="Cache states", default="L1Cache_State_I") { state_declaration(State, desc="Cache states", default="L1Cache_State_I") {

View file

@ -44,22 +44,22 @@ machine(L2Cache, "Token protocol")
// From local bank of L2 cache TO the network // From local bank of L2 cache TO the network
// this L2 bank -> a local L1 || mod-directory // this L2 bank -> a local L1 || mod-directory
MessageBuffer responseFromL2Cache, network="To", virtual_network="4", ordered="false"; MessageBuffer responseFromL2Cache, network="To", virtual_network="4", ordered="false", vnet_type="response";
// this L2 bank -> mod-directory // this L2 bank -> mod-directory
MessageBuffer GlobalRequestFromL2Cache, network="To", virtual_network="2", ordered="false"; MessageBuffer GlobalRequestFromL2Cache, network="To", virtual_network="2", ordered="false", vnet_type="request";
// this L2 bank -> a local L1 // this L2 bank -> a local L1
MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="1", ordered="false"; MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="1", ordered="false", vnet_type="request";
// FROM the network to this local bank of L2 cache // FROM the network to this local bank of L2 cache
// a local L1 || mod-directory -> this L2 bank // a local L1 || mod-directory -> this L2 bank
MessageBuffer responseToL2Cache, network="From", virtual_network="4", ordered="false"; MessageBuffer responseToL2Cache, network="From", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer persistentToL2Cache, network="From", virtual_network="3", ordered="true"; MessageBuffer persistentToL2Cache, network="From", virtual_network="3", ordered="true", vnet_type="persistent";
// mod-directory -> this L2 bank // mod-directory -> this L2 bank
MessageBuffer GlobalRequestToL2Cache, network="From", virtual_network="2", ordered="false"; MessageBuffer GlobalRequestToL2Cache, network="From", virtual_network="2", ordered="false", vnet_type="request";
// a local L1 -> this L2 bank // a local L1 -> this L2 bank
MessageBuffer L1RequestToL2Cache, network="From", virtual_network="1", ordered="false"; MessageBuffer L1RequestToL2Cache, network="From", virtual_network="1", ordered="false", vnet_type="request";
// STATES // STATES
state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") { state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") {

View file

@ -41,15 +41,15 @@ machine(Directory, "Token protocol")
int fixed_timeout_latency = 100 int fixed_timeout_latency = 100
{ {
MessageBuffer dmaResponseFromDir, network="To", virtual_network="5", ordered="true"; MessageBuffer dmaResponseFromDir, network="To", virtual_network="5", ordered="true", vnet_type="response";
MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false"; MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer persistentFromDir, network="To", virtual_network="3", ordered="true"; MessageBuffer persistentFromDir, network="To", virtual_network="3", ordered="true", vnet_type="persistent";
MessageBuffer requestFromDir, network="To", virtual_network="1", ordered="false"; MessageBuffer requestFromDir, network="To", virtual_network="1", ordered="false", vnet_type="request";
MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false"; MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer persistentToDir, network="From", virtual_network="3", ordered="true"; MessageBuffer persistentToDir, network="From", virtual_network="3", ordered="true", vnet_type="persistent";
MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false"; MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false", vnet_type="request";
MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true"; MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true", vnet_type="request";
// STATES // STATES
state_declaration(State, desc="Directory states", default="Directory_State_O") { state_declaration(State, desc="Directory states", default="Directory_State_O") {

View file

@ -32,8 +32,8 @@ machine(DMA, "DMA Controller")
int request_latency = 6 int request_latency = 6
{ {
MessageBuffer responseFromDir, network="From", virtual_network="5", ordered="true", no_vector="true"; MessageBuffer responseFromDir, network="From", virtual_network="5", ordered="true", vnet_type="response", no_vector="true";
MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", no_vector="true"; MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", vnet_type="request", no_vector="true";
state_declaration(State, desc="DMA states", default="DMA_State_READY") { state_declaration(State, desc="DMA states", default="DMA_State_READY") {
READY, AccessPermission:Invalid, desc="Ready to accept a new request"; READY, AccessPermission:Invalid, desc="Ready to accept a new request";

View file

@ -45,12 +45,12 @@ machine(L1Cache, "AMD Hammer-like protocol")
{ {
// NETWORK BUFFERS // NETWORK BUFFERS
MessageBuffer requestFromCache, network="To", virtual_network="2", ordered="false"; MessageBuffer requestFromCache, network="To", virtual_network="2", ordered="false", vnet_type="request";
MessageBuffer responseFromCache, network="To", virtual_network="4", ordered="false"; MessageBuffer responseFromCache, network="To", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer unblockFromCache, network="To", virtual_network="5", ordered="false"; MessageBuffer unblockFromCache, network="To", virtual_network="5", ordered="false", vnet_type="unblock";
MessageBuffer forwardToCache, network="From", virtual_network="3", ordered="false"; MessageBuffer forwardToCache, network="From", virtual_network="3", ordered="false", vnet_type="forward";
MessageBuffer responseToCache, network="From", virtual_network="4", ordered="false"; MessageBuffer responseToCache, network="From", virtual_network="4", ordered="false", vnet_type="response";
// STATES // STATES

View file

@ -42,19 +42,19 @@ machine(Directory, "AMD Hammer-like protocol")
bool full_bit_dir_enabled = false bool full_bit_dir_enabled = false
{ {
MessageBuffer forwardFromDir, network="To", virtual_network="3", ordered="false"; MessageBuffer forwardFromDir, network="To", virtual_network="3", ordered="false", vnet_type="forward";
MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false"; MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false", vnet_type="response";
// //
// For a finite buffered network, note that the DMA response network only // For a finite buffered network, note that the DMA response network only
// works at this relatively lower numbered (lower priority) virtual network // works at this relatively lower numbered (lower priority) virtual network
// because the trigger queue decouples cache responses from DMA responses. // because the trigger queue decouples cache responses from DMA responses.
// //
MessageBuffer dmaResponseFromDir, network="To", virtual_network="1", ordered="true"; MessageBuffer dmaResponseFromDir, network="To", virtual_network="1", ordered="true", vnet_type="response";
MessageBuffer unblockToDir, network="From", virtual_network="5", ordered="false"; MessageBuffer unblockToDir, network="From", virtual_network="5", ordered="false", vnet_type="unblock";
MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false"; MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false", vnet_type="response";
MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false", recycle_latency="1"; MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false", vnet_type="request", recycle_latency="1";
MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true"; MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true", vnet_type="request";
// STATES // STATES
state_declaration(State, desc="Directory states", default="Directory_State_E") { state_declaration(State, desc="Directory states", default="Directory_State_E") {

View file

@ -32,8 +32,8 @@ machine(DMA, "DMA Controller")
int request_latency = 6 int request_latency = 6
{ {
MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", no_vector="true"; MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", vnet_type="response", no_vector="true";
MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", no_vector="true"; MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", vnet_type="request", no_vector="true";
state_declaration(State, state_declaration(State,
desc="DMA states", desc="DMA states",

View file

@ -37,9 +37,9 @@ machine(L1Cache, "Network_test L1 Cache")
{ {
// NETWORK BUFFERS // NETWORK BUFFERS
MessageBuffer requestFromCache, network="To", virtual_network="0", ordered="false"; MessageBuffer requestFromCache, network="To", virtual_network="0", ordered="false", vnet_type = "request";
MessageBuffer forwardFromCache, network="To", virtual_network="1", ordered="false"; MessageBuffer forwardFromCache, network="To", virtual_network="1", ordered="false", vnet_type = "forward";
MessageBuffer responseFromCache, network="To", virtual_network="2", ordered="false"; MessageBuffer responseFromCache, network="To", virtual_network="2", ordered="false", vnet_type = "response";
// STATES // STATES
state_declaration(State, desc="Cache states", default="L1Cache_State_I") { state_declaration(State, desc="Cache states", default="L1Cache_State_I") {

View file

@ -35,9 +35,9 @@ machine(Directory, "Network_test Directory")
: :
{ {
MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false"; MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false", vnet_type = "request";
MessageBuffer forwardToDir, network="From", virtual_network="1", ordered="false"; MessageBuffer forwardToDir, network="From", virtual_network="1", ordered="false", vnet_type = "forward";
MessageBuffer responseToDir, network="From", virtual_network="2", ordered="false"; MessageBuffer responseToDir, network="From", virtual_network="2", ordered="false", vnet_type = "response";
// STATES // STATES
state_declaration(State, desc="Directory states", default="Directory_State_I") { state_declaration(State, desc="Directory states", default="Directory_State_I") {

View file

@ -71,9 +71,9 @@ class Network : public SimObject
// returns the queue requested for the given component // returns the queue requested for the given component
virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered, virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
int netNumber) = 0; int netNumber, std::string vnet_type) = 0;
virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered, virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered,
int netNumber) = 0; int netNumber, std::string vnet_type) = 0;
virtual const std::vector<Throttle*>* getThrottles(NodeID id) const; virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
virtual int getNumNodes() {return 1;} virtual int getNumNodes() {return 1;}

View file

@ -227,14 +227,20 @@ GarnetNetwork_d::checkNetworkAllocation(NodeID id, bool ordered,
} }
MessageBuffer* MessageBuffer*
GarnetNetwork_d::getToNetQueue(NodeID id, bool ordered, int network_num) GarnetNetwork_d::getToNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type)
{ {
// TODO:
//if (vnet_type == "response")
// mark vnet as data vnet and use buffers_per_data_vc
checkNetworkAllocation(id, ordered, network_num); checkNetworkAllocation(id, ordered, network_num);
return m_toNetQueues[id][network_num]; return m_toNetQueues[id][network_num];
} }
MessageBuffer* MessageBuffer*
GarnetNetwork_d::getFromNetQueue(NodeID id, bool ordered, int network_num) GarnetNetwork_d::getFromNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type)
{ {
checkNetworkAllocation(id, ordered, network_num); checkNetworkAllocation(id, ordered, network_num);
return m_fromNetQueues[id][network_num]; return m_fromNetQueues[id][network_num];

View file

@ -63,8 +63,10 @@ class GarnetNetwork_d : public BaseGarnetNetwork
int getBuffersPerCtrlVC() {return m_buffers_per_ctrl_vc; } int getBuffersPerCtrlVC() {return m_buffers_per_ctrl_vc; }
// returns the queue requested for the given component // returns the queue requested for the given component
MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num); MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num,
MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num); std::string vnet_type);
MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type);
void clearStats(); void clearStats();
void printStats(std::ostream& out) const; void printStats(std::ostream& out) const;

View file

@ -192,14 +192,16 @@ GarnetNetwork::checkNetworkAllocation(NodeID id, bool ordered,
} }
MessageBuffer* MessageBuffer*
GarnetNetwork::getToNetQueue(NodeID id, bool ordered, int network_num) GarnetNetwork::getToNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type)
{ {
checkNetworkAllocation(id, ordered, network_num); checkNetworkAllocation(id, ordered, network_num);
return m_toNetQueues[id][network_num]; return m_toNetQueues[id][network_num];
} }
MessageBuffer* MessageBuffer*
GarnetNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num) GarnetNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type)
{ {
checkNetworkAllocation(id, ordered, network_num); checkNetworkAllocation(id, ordered, network_num);
return m_fromNetQueues[id][network_num]; return m_fromNetQueues[id][network_num];

View file

@ -60,8 +60,10 @@ class GarnetNetwork : public BaseGarnetNetwork
int getNumPipeStages() {return m_number_of_pipe_stages; } int getNumPipeStages() {return m_number_of_pipe_stages; }
// returns the queue requested for the given component // returns the queue requested for the given component
MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num); MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num,
MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num); std::string vnet_type);
MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type);
void clearStats(); void clearStats();
void printStats(std::ostream& out) const; void printStats(std::ostream& out) const;

View file

@ -226,14 +226,16 @@ SimpleNetwork::checkNetworkAllocation(NodeID id, bool ordered, int network_num)
} }
MessageBuffer* MessageBuffer*
SimpleNetwork::getToNetQueue(NodeID id, bool ordered, int network_num) SimpleNetwork::getToNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type)
{ {
checkNetworkAllocation(id, ordered, network_num); checkNetworkAllocation(id, ordered, network_num);
return m_toNetQueues[id][network_num]; return m_toNetQueues[id][network_num];
} }
MessageBuffer* MessageBuffer*
SimpleNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num) SimpleNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num,
std::string vnet_type)
{ {
checkNetworkAllocation(id, ordered, network_num); checkNetworkAllocation(id, ordered, network_num);
return m_fromNetQueues[id][network_num]; return m_fromNetQueues[id][network_num];

View file

@ -64,8 +64,8 @@ class SimpleNetwork : public Network
void reset(); void reset();
// returns the queue requested for the given component // returns the queue requested for the given component
MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num); MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num, std::string vnet_type);
MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num); MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num, std::string vnet_type);
virtual const std::vector<Throttle*>* getThrottles(NodeID id) const; virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
bool isVNetOrdered(int vnet) { return m_ordered[vnet]; } bool isVNetOrdered(int vnet) { return m_ordered[vnet]; }

View file

@ -594,12 +594,13 @@ $c_ident::init()
network = var["network"] network = var["network"]
ordered = var["ordered"] ordered = var["ordered"]
vnet = var["virtual_network"] vnet = var["virtual_network"]
vnet_type = var["vnet_type"]
assert var.machine is not None assert var.machine is not None
code(''' code('''
machine_type = string_to_MachineType("${{var.machine.ident}}"); machine_type = string_to_MachineType("${{var.machine.ident}}");
base = MachineType_base_number(machine_type); base = MachineType_base_number(machine_type);
$vid = m_net_ptr->get${network}NetQueue(m_version + base, $ordered, $vnet); $vid = m_net_ptr->get${network}NetQueue(m_version + base, $ordered, $vnet, "$vnet_type");
''') ''')
code('assert($vid != NULL);') code('assert($vid != NULL);')