Ruby.py (7555:ccd55d73c75d) | Ruby.py (7557:bd48f4547e77) |
---|---|
1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# Copyright (c) 2009 Advanced Micro Devices, Inc. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 48 unchanged lines hidden (view full) --- 57 eval("%s.define_options(parser)" % protocol) 58 59def create_system(options, system, piobus = None, dma_devices = []): 60 61 protocol = buildEnv['PROTOCOL'] 62 exec "import %s" % protocol 63 try: 64 (cpu_sequencers, dir_cntrls, all_cntrls) = \ | 1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# Copyright (c) 2009 Advanced Micro Devices, Inc. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 48 unchanged lines hidden (view full) --- 57 eval("%s.define_options(parser)" % protocol) 58 59def create_system(options, system, piobus = None, dma_devices = []): 60 61 protocol = buildEnv['PROTOCOL'] 62 exec "import %s" % protocol 63 try: 64 (cpu_sequencers, dir_cntrls, all_cntrls) = \ |
65 eval("%s.create_system(options, system, piobus, dma_devices)" \ 66 % protocol) | 65 eval("%s.create_system(options, system, piobus, dma_devices)" \ 66 % protocol) |
67 except: 68 print "Error: could not create sytem for ruby protocol %s" % protocol | 67 except: 68 print "Error: could not create sytem for ruby protocol %s" % protocol |
69 sys.exit(1) | 69 raise |
70 71 # 72 # Important: the topology must be created before the network and after the 73 # controllers. 74 # 75 exec "import %s" % options.topology 76 try: | 70 71 # 72 # Important: the topology must be created before the network and after the 73 # controllers. 74 # 75 exec "import %s" % options.topology 76 try: |
77 net_topology = eval("%s.makeTopology(all_cntrls, options)" % options.topology) | 77 net_topology = eval("%s.makeTopology(all_cntrls, options)" \ 78 % options.topology) |
78 except: 79 print "Error: could not create topology %s" % options.topology | 79 except: 80 print "Error: could not create topology %s" % options.topology |
80 sys.exit(1) | 81 raise |
81 82 if options.garnet_network == "fixed": 83 network = GarnetNetwork_d(topology = net_topology) 84 elif options.garnet_network == "flexible": 85 network = GarnetNetwork(topology = net_topology) 86 else: 87 network = SimpleNetwork(topology = net_topology) 88 --- 28 unchanged lines hidden --- | 82 83 if options.garnet_network == "fixed": 84 network = GarnetNetwork_d(topology = net_topology) 85 elif options.garnet_network == "flexible": 86 network = GarnetNetwork(topology = net_topology) 87 else: 88 network = SimpleNetwork(topology = net_topology) 89 --- 28 unchanged lines hidden --- |