add etherdump file option
authorAli Saidi <saidi@eecs.umich.edu>
Thu, 17 Aug 2006 02:17:23 +0000 (22:17 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Thu, 17 Aug 2006 02:17:23 +0000 (22:17 -0400)
--HG--
extra : convert_revision : 6b62398778208bc4e64582e06fb73b71a94f3014

configs/common/FSConfig.py
configs/example/fs.py

index e86cc05f5a570859337777d05ffc209deecd89df..193d3a5e56fb8c4a227095bdd0ffda03ea510d1d 100644 (file)
@@ -83,14 +83,15 @@ def makeLinuxAlphaSystem(mem_mode, mdesc = None):
 
     return self
 
-def makeDualRoot(testSystem, driveSystem):
+def makeDualRoot(testSystem, driveSystem, dumpfile):
     self = Root()
     self.testsys = testSystem
     self.drivesys = driveSystem
-
-    self.etherdump = EtherDump(file='ethertrace')
     self.etherlink = EtherLink(int1 = Parent.testsys.tsunami.etherint[0],
-                               int2 = Parent.drivesys.tsunami.etherint[0],
-                               dump = Parent.etherdump)
+                               int2 = Parent.drivesys.tsunami.etherint[0])
+    if dumpfile:
+        self.etherdump = EtherDump(file=dumpfile)
+        self.etherlink.dump = Parent.etherdump
+
     self.clock = '1THz'
     return self
index 7c888c53647c8de8a1b8e6c6bc5075f35c35f6a2..958fc435314edf3a07cdce10041c72f5f07a588e 100644 (file)
@@ -47,6 +47,9 @@ parser.add_option("-b", "--benchmark", action="store", type="string",
                   dest="benchmark",
                   help="Specify the benchmark to run. Available benchmarks: %s"\
                           % DefinedBenchmarks)
+parser.add_option("--etherdump", action="store", type="string", dest="etherdump",
+                  help="Specify the filename to dump a pcap capture of the ethernet"
+                  "traffic")
 
 (options, args) = parser.parse_args()
 
@@ -90,7 +93,7 @@ if len(bm) == 2:
     s2 = makeLinuxAlphaSystem(mem_mode, bm[1])
     s2.cpu = cpu2
     cpu2.connectMemPorts(s2.membus)
-    root = makeDualRoot(s1, s2)
+    root = makeDualRoot(s1, s2, options.etherdump)
 elif len(bm) == 1:
     root = Root(clock = '1THz',
                 system = makeLinuxAlphaSystem(mem_mode, bm[0]))