Network_test: Conform it with functional access changes in Ruby
authorNilay Vaish <nilay@cs.wisc.edu>
Sun, 3 Jul 2011 16:33:46 +0000 (11:33 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Sun, 3 Jul 2011 16:33:46 +0000 (11:33 -0500)
Addition of functional access support to Ruby necessitated some changes to
the way coherence protocols are written. I had forgotten to update the
Network_test protocol. This patch makes those updates.

configs/ruby/Network_test.py
src/mem/protocol/Network_test-cache.sm
src/mem/protocol/Network_test-dir.sm

index 308354f0f9c8b89053b17b6d09af425d25516952..0877ac00af4d8cbed8449e1ac4951bd06e940019 100644 (file)
@@ -41,7 +41,7 @@ class Cache(RubyCache):
 def define_options(parser):
     return
 
-def create_system(options, system, piobus, dma_devices):
+def create_system(options, system, piobus, dma_devices, ruby_system):
     
     if buildEnv['PROTOCOL'] != 'Network_test':
         panic("This script requires the Network_test protocol to be built.")
@@ -85,13 +85,15 @@ def create_system(options, system, piobus, dma_devices):
         #
         l1_cntrl = L1Cache_Controller(version = i,
                                       cntrl_id = cntrl_count,
-                                      cacheMemory = cache)
+                                      cacheMemory = cache,
+                                      ruby_system = ruby_system)
 
         cpu_seq = RubySequencer(icache = cache,
                                 dcache = cache,
                                 physMemPort = system.physmem.port,
                                 physmem = system.physmem,
-                                using_network_tester = True)
+                                using_network_tester = True,
+                                ruby_system = ruby_system)
 
         l1_cntrl.sequencer = cpu_seq
 
@@ -126,7 +128,8 @@ def create_system(options, system, piobus, dma_devices):
                                          directory = \
                                          RubyDirectoryMemory(version = i,
                                                              size = dir_size),
-                                         memBuffer = mem_cntrl)
+                                         memBuffer = mem_cntrl,
+                                         ruby_system = ruby_system)
 
         exec("system.dir_cntrl%d = dir_cntrl" % i)
         dir_cntrl_nodes.append(dir_cntrl)
index b97819ca322ce06cae7920273e67b36270cbd6ff..d3b649e89b78880944ced0cf68254c9ef0b5f96a 100644 (file)
@@ -131,6 +131,9 @@ machine(L1Cache, "Network_test L1 Cache")
     return OOD;
   }
 
+  DataBlock getDataBlock(Address addr), return_by_ref="yes" {
+    error("Network Test does not support get data block.");
+  }
 
   // NETWORK PORTS
 
index 593a409d0369ac9d1d411ff57a7ee8f462fd11b6..57736b66d5d35d8ad467da798cc6de739d2a6ed5 100644 (file)
@@ -55,7 +55,7 @@ machine(Directory, "Network_test Directory")
 
   // TYPES
   // DirectoryEntry
-  structure(Entry, desc="...") {
+  structure(Entry, desc="...", interface="AbstractEntry") {
     State DirectoryState,          desc="Directory state";
     DataBlock DataBlk,             desc="data for the block";
   }
@@ -76,6 +76,10 @@ machine(Directory, "Network_test Directory")
   void setAccessPermission(Address addr, State state) {
   }
 
+  DataBlock getDataBlock(Address addr), return_by_ref="yes" {
+    error("Network Test does not support get data block.");
+  }
+
   // ** IN_PORTS **
 
   in_port(requestQueue_in, RequestMsg, requestToDir) {