garnet_synth_traffic.py (11688:725fef71f376) | garnet_synth_traffic.py (12564:2778478ca882) |
---|---|
1# Copyright (c) 2016 Georgia Institute of Technology 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 12 unchanged lines hidden (view full) --- 21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Author: Tushar Krishna 28 | 1# Copyright (c) 2016 Georgia Institute of Technology 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 12 unchanged lines hidden (view full) --- 21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Author: Tushar Krishna 28 |
29from __future__ import print_function 30 |
|
29import m5 30from m5.objects import * 31from m5.defines import buildEnv 32from m5.util import addToPath 33import os, optparse, sys 34 35addToPath('../') 36 --- 48 unchanged lines hidden (view full) --- 85# 86Ruby.define_options(parser) 87 88execfile(os.path.join(config_root, "common", "Options.py")) 89 90(options, args) = parser.parse_args() 91 92if args: | 31import m5 32from m5.objects import * 33from m5.defines import buildEnv 34from m5.util import addToPath 35import os, optparse, sys 36 37addToPath('../') 38 --- 48 unchanged lines hidden (view full) --- 87# 88Ruby.define_options(parser) 89 90execfile(os.path.join(config_root, "common", "Options.py")) 91 92(options, args) = parser.parse_args() 93 94if args: |
93 print "Error: script doesn't take any positional arguments" | 95 print("Error: script doesn't take any positional arguments") |
94 sys.exit(1) 95 96 97if options.inj_vnet > 2: | 96 sys.exit(1) 97 98 99if options.inj_vnet > 2: |
98 print "Error: Injection vnet %d should be 0 (1-flit), 1 (1-flit) \ 99 or 2 (5-flit) or -1 (random)"\ 100 % (options.inj_vnet) | 100 print("Error: Injection vnet %d should be 0 (1-flit), 1 (1-flit) " 101 "or 2 (5-flit) or -1 (random)" % (options.inj_vnet)) |
101 sys.exit(1) 102 103 104cpus = [ GarnetSyntheticTraffic( 105 num_packets_max=options.num_packets_max, 106 single_sender=options.single_sender_id, 107 single_dest=options.single_dest_id, 108 sim_cycles=options.sim_cycles, --- 39 unchanged lines hidden (view full) --- 148m5.ticks.setGlobalFrequency('1ns') 149 150# instantiate configuration 151m5.instantiate() 152 153# simulate until program terminates 154exit_event = m5.simulate(options.abs_max_tick) 155 | 102 sys.exit(1) 103 104 105cpus = [ GarnetSyntheticTraffic( 106 num_packets_max=options.num_packets_max, 107 single_sender=options.single_sender_id, 108 single_dest=options.single_dest_id, 109 sim_cycles=options.sim_cycles, --- 39 unchanged lines hidden (view full) --- 149m5.ticks.setGlobalFrequency('1ns') 150 151# instantiate configuration 152m5.instantiate() 153 154# simulate until program terminates 155exit_event = m5.simulate(options.abs_max_tick) 156 |
156print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause() | 157print('Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()) |