slicc: added vnet_type field to identify response vnets from others
authorTushar Krishna <tushar@csail.mit.edu>
Wed, 18 May 2011 07:06:07 +0000 (03:06 -0400)
committerTushar Krishna <tushar@csail.mit.edu>
Wed, 18 May 2011 07:06:07 +0000 (03:06 -0400)
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.

25 files changed:
src/mem/protocol/MESI_CMP_directory-L1cache.sm
src/mem/protocol/MESI_CMP_directory-L2cache.sm
src/mem/protocol/MESI_CMP_directory-dir.sm
src/mem/protocol/MESI_CMP_directory-dma.sm
src/mem/protocol/MOESI_CMP_directory-L1cache.sm
src/mem/protocol/MOESI_CMP_directory-L2cache.sm
src/mem/protocol/MOESI_CMP_directory-dir.sm
src/mem/protocol/MOESI_CMP_directory-dma.sm
src/mem/protocol/MOESI_CMP_token-L1cache.sm
src/mem/protocol/MOESI_CMP_token-L2cache.sm
src/mem/protocol/MOESI_CMP_token-dir.sm
src/mem/protocol/MOESI_CMP_token-dma.sm
src/mem/protocol/MOESI_hammer-cache.sm
src/mem/protocol/MOESI_hammer-dir.sm
src/mem/protocol/MOESI_hammer-dma.sm
src/mem/protocol/Network_test-cache.sm
src/mem/protocol/Network_test-dir.sm
src/mem/ruby/network/Network.hh
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
src/mem/ruby/network/simple/SimpleNetwork.cc
src/mem/ruby/network/simple/SimpleNetwork.hh
src/mem/slicc/symbols/StateMachine.py

index 26f5b1ff6db1f27248502c53162df4a522c9c17f..d0fc61e90663aab7ee3a301b46810fdf24987e41 100644 (file)
@@ -39,17 +39,17 @@ machine(L1Cache, "MSI Directory L1 Cache CMP")
   // NODE L1 CACHE
   // From this node's L1 cache TO the network
   // 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
-  MessageBuffer responseFromL1Cache, network="To", virtual_network="1", ordered="false";
-  MessageBuffer unblockFromL1Cache, network="To", virtual_network="2", ordered="false";
+  MessageBuffer responseFromL1Cache, network="To", virtual_network="1", ordered="false", vnet_type="response";
+  MessageBuffer unblockFromL1Cache, network="To", virtual_network="2", ordered="false", vnet_type="unblock";
 
 
   // To this node's L1 cache FROM the network
   // 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
-  MessageBuffer responseToL1Cache, network="From", virtual_network="1", ordered="false";
+  MessageBuffer responseToL1Cache, network="From", virtual_network="1", ordered="false", vnet_type="response";
 
   // STATES
   state_declaration(State, desc="Cache states", default="L1Cache_State_I") {
index 42fe0823f3ca09568f986d1c2afc674501d0681a..771a2dfb230c7a33dd43d10c4a2a8847638d36ab 100644 (file)
@@ -40,15 +40,15 @@ machine(L2Cache, "MESI Directory L2 Cache CMP")
 {
   // L2 BANK QUEUES
   // From local bank of L2 cache TO the network
-  MessageBuffer DirRequestFromL2Cache, network="To", virtual_network="0", ordered="false";  // this L2 bank -> Memory
-  MessageBuffer L1RequestFromL2Cache, network="To", virtual_network="0", ordered="false";  // this L2 bank -> a local L1
-  MessageBuffer responseFromL2Cache, network="To", virtual_network="1", ordered="false";  // this L2 bank -> a local L1 || 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", vnet_type="request";  // this L2 bank -> a local L1
+  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
-  MessageBuffer unblockToL2Cache, network="From", virtual_network="2", ordered="false";  // a local L1 || Memory -> this L2 bank
-  MessageBuffer L1RequestToL2Cache, network="From", virtual_network="0", ordered="false";  // a local L1 -> this L2 bank
-  MessageBuffer responseToL2Cache, network="From", virtual_network="1", ordered="false";  // 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="2", ordered="false", vnet_type="unblock";  // a local L1 || Memory -> 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", vnet_type="response";  // 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
   state_declaration(State, desc="L2 Cache states", default="L2Cache_State_NP") {
index c47df943393a123a24d4976348b94a43daa01b00..6ad88f8091bfaa3ecd58c26c9040380e51ef87c4 100644 (file)
@@ -42,11 +42,11 @@ machine(Directory, "MESI_CMP_filter_directory protocol")
    int directory_latency = 6
 {
 
-  MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false";
-  MessageBuffer responseToDir, network="From", virtual_network="1", ordered="false";
+  MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false", vnet_type="request";
+  MessageBuffer responseToDir, network="From", virtual_network="1", ordered="false", vnet_type="response";
 
-  MessageBuffer requestFromDir, network="To", virtual_network="0", ordered="false";
-  MessageBuffer responseFromDir, network="To", virtual_network="1", ordered="false";
+  MessageBuffer requestFromDir, network="To", virtual_network="0", ordered="false", vnet_type="request";
+  MessageBuffer responseFromDir, network="To", virtual_network="1", ordered="false", vnet_type="response";
 
   // STATES
   state_declaration(State, desc="Directory states", default="Directory_State_I") {
index da8b94b7c19e450e51b54cb739bf4e4f8075b719..205d337b1664b2a265400f8e91ff351621bb361f 100644 (file)
@@ -4,8 +4,8 @@ machine(DMA, "DMA Controller")
   int request_latency = 6
 {
 
-  MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", no_vector="true";
-  MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", 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", vnet_type="request", no_vector="true";
 
   state_declaration(State, desc="DMA states", default="DMA_State_READY") {
     READY, AccessPermission:Invalid, desc="Ready to accept a new request";
index 50bb710cb1d14841732e4b5f804cbda394a80f07..e9622c30bdd830d2ed5948fef94459b93771cddd 100644 (file)
@@ -43,17 +43,17 @@ machine(L1Cache, "Directory protocol")
   // NODE L1 CACHE
   // From this node's L1 cache TO the network
   // 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
-  MessageBuffer responseFromL1Cache, network="To", virtual_network="2", ordered="false";
-//  MessageBuffer writebackFromL1Cache, network="To", virtual_network="3", ordered="false";
+  MessageBuffer responseFromL1Cache, network="To", virtual_network="2", ordered="false", vnet_type="response";
+//  MessageBuffer writebackFromL1Cache, network="To", virtual_network="3", ordered="false", vnet_type="writeback";
 
 
   // To this node's L1 cache FROM the network
   // 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
-  MessageBuffer responseToL1Cache, network="From", virtual_network="2", ordered="false";
+  MessageBuffer responseToL1Cache, network="From", virtual_network="2", ordered="false", vnet_type="response";
 
 
 
index 297904c90d8dfc017c6da0bb08d990306152acb6..a9c1e74a02c86d1b5fc46df0c2a506ae9ec621c3 100644 (file)
@@ -40,15 +40,15 @@ machine(L2Cache, "Token protocol")
 
   // L2 BANK QUEUES
   // 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 GlobalRequestFromL2Cache, network="To", virtual_network="1", ordered="false";  // this L2 bank -> mod-directory
-  MessageBuffer responseFromL2Cache, network="To", virtual_network="2", ordered="false";  // this L2 bank -> a local L1 || mod-directory
+  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", vnet_type="request";  // this L2 bank -> 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
-  MessageBuffer L1RequestToL2Cache, network="From", virtual_network="0", ordered="false";  // a local L1 -> this L2 bank, Lets try this???
-  MessageBuffer GlobalRequestToL2Cache, network="From", virtual_network="1", ordered="false";  // mod-directory -> this L2 bank
-  MessageBuffer responseToL2Cache, network="From", virtual_network="2", ordered="false";  // a local L1 || mod-directory -> this L2 bank
-//  MessageBuffer L1WritebackToL2Cache, network="From", virtual_network="3", ordered="false";
+  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", vnet_type="request";  // 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", vnet_type="writeback";
 
   // STATES
   state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") {
index bf5e8bff641367cbc6c10c4ddeb6049c2f7127b2..572101f002bd6cf82e4b99ea8a91f77d3aac652b 100644 (file)
@@ -38,13 +38,13 @@ machine(Directory, "Directory protocol")
 {
 
   // ** IN QUEUES **
-  MessageBuffer foo1, network="From", virtual_network="0", ordered="false";  // a mod-L2 bank -> this Dir
-  MessageBuffer requestToDir, network="From", virtual_network="1", ordered="false";  // a mod-L2 bank -> this Dir
-  MessageBuffer responseToDir, network="From", virtual_network="2", 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", vnet_type="request";  // 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 forwardFromDir, network="To", virtual_network="1", ordered="false";
-  MessageBuffer responseFromDir, network="To", virtual_network="2", ordered="false";  // Dir -> mod-L2 bank
+  MessageBuffer goo1, network="To", virtual_network="0", ordered="false", vnet_type="goo";
+  MessageBuffer forwardFromDir, network="To", virtual_network="1", ordered="false", vnet_type="forward";
+  MessageBuffer responseFromDir, network="To", virtual_network="2", ordered="false", vnet_type="response";  // Dir -> mod-L2 bank
 
 
   // STATES
index 42e48c95a3b315d6856e073e38bba55e91ff70be..642c6e22d57ddf59d83867a92393c85571f6465e 100644 (file)
@@ -5,13 +5,13 @@ machine(DMA, "DMA Controller")
   int response_latency = 14
 {
   
-  MessageBuffer goo1, network="From", virtual_network="0", ordered="false";
-  MessageBuffer goo2, network="From", virtual_network="1", ordered="false";
-  MessageBuffer responseFromDir, network="From", virtual_network="2", ordered="false";
+  MessageBuffer goo1, network="From", virtual_network="0", ordered="false", vnet_type="goo";
+  MessageBuffer goo2, network="From", virtual_network="1", ordered="false", vnet_type="goo";
+  MessageBuffer responseFromDir, network="From", virtual_network="2", ordered="false", vnet_type="response";
 
-  MessageBuffer foo1, network="To", virtual_network="0", ordered="false";
-  MessageBuffer reqToDir, network="To", virtual_network="1", ordered="false";
-  MessageBuffer respToDir, network="To", virtual_network="2", ordered="false";
+  MessageBuffer foo1, network="To", virtual_network="0", ordered="false", vnet_type="foo";
+  MessageBuffer reqToDir, network="To", virtual_network="1", ordered="false", vnet_type="request";
+  MessageBuffer respToDir, network="To", virtual_network="2", ordered="false", vnet_type="dmaresponse";
   
   state_declaration(State, desc="DMA states", default="DMA_State_READY") {
     READY, AccessPermission:Invalid, desc="Ready to accept a new request";
index d7344d779037b91f7d4055b1000e3f120519602a..a4dbe5fe781c360c7d2f4add4ffde99e235c841c 100644 (file)
@@ -49,18 +49,18 @@ machine(L1Cache, "Token protocol")
   // From this node's L1 cache TO the network
 
   // a local L1 -> this L2 bank
-  MessageBuffer responseFromL1Cache, network="To", virtual_network="4", ordered="false";
-  MessageBuffer persistentFromL1Cache, network="To", virtual_network="3", ordered="true";
+  MessageBuffer responseFromL1Cache, network="To", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer persistentFromL1Cache, network="To", virtual_network="3", ordered="true", vnet_type="persistent";
   // 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
   // a L2 bank -> this L1
-  MessageBuffer responseToL1Cache, network="From", virtual_network="4", ordered="false";
-  MessageBuffer persistentToL1Cache, network="From", virtual_network="3", ordered="true";
+  MessageBuffer responseToL1Cache, network="From", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer persistentToL1Cache, network="From", virtual_network="3", ordered="true", vnet_type="persistent";
   // 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
   state_declaration(State, desc="Cache states", default="L1Cache_State_I") {
index 6f43e771219cd339eba4fa7a4b1fd05b48f984bc..8b87889b1e6dbd588899ab90e2b91188b3ac2ab3 100644 (file)
@@ -44,22 +44,22 @@ machine(L2Cache, "Token protocol")
   // From local bank of L2 cache TO the network
 
   // 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
-  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
-  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
 
   // a local L1 || mod-directory -> this L2 bank
-  MessageBuffer responseToL2Cache, network="From", virtual_network="4", ordered="false";  
-  MessageBuffer persistentToL2Cache, network="From", virtual_network="3", ordered="true";
+  MessageBuffer responseToL2Cache, network="From", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer persistentToL2Cache, network="From", virtual_network="3", ordered="true", vnet_type="persistent";
   // 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
-  MessageBuffer L1RequestToL2Cache, network="From", virtual_network="1", ordered="false";  
+  MessageBuffer L1RequestToL2Cache, network="From", virtual_network="1", ordered="false", vnet_type="request";
 
   // STATES
   state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") {
index c411d1c4b3021a9b34b35170518dfe39449ea8d9..aabde0af80159111eabefa07e2958345d729f11a 100644 (file)
@@ -41,15 +41,15 @@ machine(Directory, "Token protocol")
    int fixed_timeout_latency = 100
 {
 
-  MessageBuffer dmaResponseFromDir, network="To", virtual_network="5", ordered="true";
-  MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false";
-  MessageBuffer persistentFromDir, network="To", virtual_network="3", ordered="true";
-  MessageBuffer requestFromDir, network="To", virtual_network="1", ordered="false";
-
-  MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false";
-  MessageBuffer persistentToDir, network="From", virtual_network="3", ordered="true";
-  MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false";
-  MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true";
+  MessageBuffer dmaResponseFromDir, network="To", virtual_network="5", ordered="true", vnet_type="response";
+  MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer persistentFromDir, network="To", virtual_network="3", ordered="true", vnet_type="persistent";
+  MessageBuffer requestFromDir, network="To", virtual_network="1", ordered="false", vnet_type="request";
+
+  MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer persistentToDir, network="From", virtual_network="3", ordered="true", vnet_type="persistent";
+  MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false", vnet_type="request";
+  MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true", vnet_type="request";
 
   // STATES
   state_declaration(State, desc="Directory states", default="Directory_State_O") {
index 9a090145cf754dc0c048d7ab241db70983aef280..dfd26e64dea1435466307a4f6504bd4467fe7924 100644 (file)
@@ -32,8 +32,8 @@ machine(DMA, "DMA Controller")
   int request_latency = 6
 {
 
-  MessageBuffer responseFromDir, network="From", virtual_network="5", ordered="true", no_vector="true";
-  MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", 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", vnet_type="request", no_vector="true";
 
   state_declaration(State, desc="DMA states", default="DMA_State_READY") {
     READY, AccessPermission:Invalid, desc="Ready to accept a new request";
index 06c9ea76b65be6995c5fe50af65cd4de4d332f6e..24f3ab318c26dea6c75f260a5289810c9d6be508 100644 (file)
@@ -45,12 +45,12 @@ machine(L1Cache, "AMD Hammer-like protocol")
 {
 
   // NETWORK BUFFERS
-  MessageBuffer requestFromCache, network="To", virtual_network="2", ordered="false";
-  MessageBuffer responseFromCache, network="To", virtual_network="4", ordered="false";
-  MessageBuffer unblockFromCache, network="To", virtual_network="5", ordered="false";
+  MessageBuffer requestFromCache, network="To", virtual_network="2", ordered="false", vnet_type="request";
+  MessageBuffer responseFromCache, network="To", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer unblockFromCache, network="To", virtual_network="5", ordered="false", vnet_type="unblock";
 
-  MessageBuffer forwardToCache, network="From", virtual_network="3", ordered="false";
-  MessageBuffer responseToCache, network="From", virtual_network="4", ordered="false";
+  MessageBuffer forwardToCache, network="From", virtual_network="3", ordered="false", vnet_type="forward";
+  MessageBuffer responseToCache, network="From", virtual_network="4", ordered="false", vnet_type="response";
 
 
   // STATES
index f364b584679b187765bbc939d94d8aac0109ed33..96af4228fbfe396c8acf5729fcd7afac169d801f 100644 (file)
@@ -42,19 +42,19 @@ machine(Directory, "AMD Hammer-like protocol")
   bool full_bit_dir_enabled = false
 {
 
-  MessageBuffer forwardFromDir, network="To", virtual_network="3", ordered="false";
-  MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false";
+  MessageBuffer forwardFromDir, network="To", virtual_network="3", ordered="false", vnet_type="forward";
+  MessageBuffer responseFromDir, network="To", virtual_network="4", ordered="false", vnet_type="response";
   //
   // For a finite buffered network, note that the DMA response network only 
   // works at this relatively lower numbered (lower priority) virtual network
   // 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 responseToDir, network="From", virtual_network="4", ordered="false";
-  MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false", recycle_latency="1";
-  MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true";
+  MessageBuffer unblockToDir, network="From", virtual_network="5", ordered="false", vnet_type="unblock";
+  MessageBuffer responseToDir, network="From", virtual_network="4", ordered="false", vnet_type="response";
+  MessageBuffer requestToDir, network="From", virtual_network="2", ordered="false", vnet_type="request", recycle_latency="1";
+  MessageBuffer dmaRequestToDir, network="From", virtual_network="0", ordered="true", vnet_type="request";
 
   // STATES
   state_declaration(State, desc="Directory states", default="Directory_State_E") {
index d80c55c73b327f636287a069b0059b67246d99e3..c784fb6b987d0068018c8587c3166b2fed9324a1 100644 (file)
@@ -32,8 +32,8 @@ machine(DMA, "DMA Controller")
   int request_latency = 6
 {
 
-  MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", no_vector="true";
-  MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", 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", vnet_type="request", no_vector="true";
 
   state_declaration(State, 
                     desc="DMA states", 
index 814cd5c29bd612c8253c74fe6468b1f3b788b98b..e76c002f578ec99fc12f4fb4622a871ab9c1cc4f 100644 (file)
@@ -37,9 +37,9 @@ machine(L1Cache, "Network_test L1 Cache")
 {
 
   // NETWORK BUFFERS
-  MessageBuffer requestFromCache, network="To", virtual_network="0", ordered="false";
-  MessageBuffer forwardFromCache, network="To", virtual_network="1", ordered="false";
-  MessageBuffer responseFromCache, network="To", virtual_network="2", ordered="false";
+  MessageBuffer requestFromCache, network="To", virtual_network="0", ordered="false", vnet_type = "request";
+  MessageBuffer forwardFromCache, network="To", virtual_network="1", ordered="false", vnet_type = "forward";
+  MessageBuffer responseFromCache, network="To", virtual_network="2", ordered="false", vnet_type = "response";
 
   // STATES
   state_declaration(State, desc="Cache states", default="L1Cache_State_I") {
index 6d2bbf3595154b97682167cfc024eccd10de6629..c3e6dfaf051eb655d864c75c71859b5f2189d81e 100644 (file)
@@ -35,9 +35,9 @@ machine(Directory, "Network_test Directory")
 :
 {
 
-  MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false";
-  MessageBuffer forwardToDir, network="From", virtual_network="1", ordered="false";
-  MessageBuffer responseToDir, network="From", virtual_network="2", ordered="false";
+  MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false", vnet_type = "request";
+  MessageBuffer forwardToDir, network="From", virtual_network="1", ordered="false", vnet_type = "forward";
+  MessageBuffer responseToDir, network="From", virtual_network="2", ordered="false", vnet_type = "response";
 
   // STATES
   state_declaration(State, desc="Directory states", default="Directory_State_I") {
index cce81f266b8bdc1096cc4c840768c78639a4be12..309560921d8906097c02a63e8a70b6d6710385eb 100644 (file)
@@ -71,9 +71,9 @@ class Network : public SimObject
 
     // returns the queue requested for the given component
     virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
-        int netNumber) = 0;
+        int netNumber, std::string vnet_type) = 0;
     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 int getNumNodes() {return 1;}
 
index 17dba251dbb3ae5f310d701fcb74aa113fb7514d..dc24900c45d1c46e8fa0826c4339d8cd4bac611e 100644 (file)
@@ -227,14 +227,20 @@ GarnetNetwork_d::checkNetworkAllocation(NodeID id, bool ordered,
 }
 
 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);
     return m_toNetQueues[id][network_num];
 }
 
 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);
     return m_fromNetQueues[id][network_num];
index 6254bd383483367d9e3ec30bead33a3fbd95ef33..f2b3bd4ef12de9481fa6d320702f1e3d4e4f07c1 100644 (file)
@@ -63,8 +63,10 @@ class GarnetNetwork_d : public BaseGarnetNetwork
     int getBuffersPerCtrlVC() {return m_buffers_per_ctrl_vc; }
 
     // returns the queue requested for the given component
-    MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num);
-    MessageBuffer* getFromNetQueue(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,
+                                   std::string vnet_type);
 
     void clearStats();
     void printStats(std::ostream& out) const;
index 62ae2dbd6f86ec8293978b856bd446ddb5a22fe1..2c0d9f3aaf47161862c860640a34e258b7864fec 100644 (file)
@@ -192,14 +192,16 @@ GarnetNetwork::checkNetworkAllocation(NodeID id, bool ordered,
 }
 
 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);
     return m_toNetQueues[id][network_num];
 }
 
 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);
     return m_fromNetQueues[id][network_num];
index 6e08330f312596b9ab961a9c6c7003678d2c48bb..5c7959131372e44f10c5ade5181906fb722c9968 100644 (file)
@@ -60,8 +60,10 @@ class GarnetNetwork : public BaseGarnetNetwork
     int getNumPipeStages() {return m_number_of_pipe_stages; }
 
     // returns the queue requested for the given component
-    MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num);
-    MessageBuffer* getFromNetQueue(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,
+                                   std::string vnet_type);
 
     void clearStats();
     void printStats(std::ostream& out) const;
index eb561b61252c2718c2579338a37f8c9556acfe74..0f3472773e7647973882969a38362e43b53a13fc 100644 (file)
@@ -226,14 +226,16 @@ SimpleNetwork::checkNetworkAllocation(NodeID id, bool ordered, int network_num)
 }
 
 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);
     return m_toNetQueues[id][network_num];
 }
 
 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);
     return m_fromNetQueues[id][network_num];
index 093ed959efce20f27db50656f9081a1fd65981b3..fb5481b46312ce53d1c9bb7fbc0c2e84be06c5e1 100644 (file)
@@ -64,8 +64,8 @@ class SimpleNetwork : public Network
     void reset();
 
     // returns the queue requested for the given component
-    MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num);
-    MessageBuffer* getFromNetQueue(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, std::string vnet_type);
     virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
 
     bool isVNetOrdered(int vnet) { return m_ordered[vnet]; }
index 116371e70c676ce07027066ac989ae774d57a278..3cb542d47554dcb5f4ed7f4970bd31f975de75e1 100644 (file)
@@ -594,12 +594,13 @@ $c_ident::init()
                 network = var["network"]
                 ordered =  var["ordered"]
                 vnet = var["virtual_network"]
+                vnet_type = var["vnet_type"]
 
                 assert var.machine is not None
                 code('''
 machine_type = string_to_MachineType("${{var.machine.ident}}");
 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);')