Network.py (11666:10d59d546ea2) | Network.py (11762:29d401db3746) |
---|---|
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 --- 56 unchanged lines hidden (view full) --- 65 help="""routing algorithm in network. 66 0: weight-based table 67 1: XY (for Mesh. see garnet2.0/RoutingUnit.cc) 68 2: Custom (see garnet2.0/RoutingUnit.cc""") 69 parser.add_option("--network-fault-model", action="store_true", 70 default=False, 71 help="""enable network fault model: 72 see src/mem/ruby/network/fault_model/""") | 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 --- 56 unchanged lines hidden (view full) --- 65 help="""routing algorithm in network. 66 0: weight-based table 67 1: XY (for Mesh. see garnet2.0/RoutingUnit.cc) 68 2: Custom (see garnet2.0/RoutingUnit.cc""") 69 parser.add_option("--network-fault-model", action="store_true", 70 default=False, 71 help="""enable network fault model: 72 see src/mem/ruby/network/fault_model/""") |
73 parser.add_option("--garnet-deadlock-threshold", action="store", 74 type="int", default=50000, 75 help="network-level deadlock threshold.") |
|
73 74 75def create_network(options, ruby): 76 77 # Set the network classes based on the command line options 78 if options.network == "garnet2.0": 79 NetworkClass = GarnetNetwork 80 IntLinkClass = GarnetIntLink --- 17 unchanged lines hidden (view full) --- 98 99def init_network(options, network, InterfaceClass): 100 101 if options.network == "garnet2.0": 102 network.num_rows = options.mesh_rows 103 network.vcs_per_vnet = options.vcs_per_vnet 104 network.ni_flit_size = options.link_width_bits / 8 105 network.routing_algorithm = options.routing_algorithm | 76 77 78def create_network(options, ruby): 79 80 # Set the network classes based on the command line options 81 if options.network == "garnet2.0": 82 NetworkClass = GarnetNetwork 83 IntLinkClass = GarnetIntLink --- 17 unchanged lines hidden (view full) --- 101 102def init_network(options, network, InterfaceClass): 103 104 if options.network == "garnet2.0": 105 network.num_rows = options.mesh_rows 106 network.vcs_per_vnet = options.vcs_per_vnet 107 network.ni_flit_size = options.link_width_bits / 8 108 network.routing_algorithm = options.routing_algorithm |
109 network.garnet_deadlock_threshold = options.garnet_deadlock_threshold |
|
106 107 if options.network == "simple": 108 network.setup_buffers() 109 110 if InterfaceClass != None: 111 netifs = [InterfaceClass(id=i) \ 112 for (i,n) in enumerate(network.ext_links)] 113 network.netifs = netifs 114 115 if options.network_fault_model: 116 assert(options.network == "garnet2.0") 117 network.enable_fault_model = True 118 network.fault_model = FaultModel() | 110 111 if options.network == "simple": 112 network.setup_buffers() 113 114 if InterfaceClass != None: 115 netifs = [InterfaceClass(id=i) \ 116 for (i,n) in enumerate(network.ext_links)] 117 network.netifs = netifs 118 119 if options.network_fault_model: 120 assert(options.network == "garnet2.0") 121 network.enable_fault_model = True 122 network.fault_model = FaultModel() |