12 #ifndef SSTMAC_HARDWARE_NETWORK_CONGESTION_INTERCONNECT_H_INCLUDED 13 #define SSTMAC_HARDWARE_NETWORK_CONGESTION_INTERCONNECT_H_INCLUDED 34 #define interconn_debug(...) \ 35 debug_printf(sprockit::dbg::interconnect, __VA_ARGS__) 37 #if SSTMAC_INTEGRATED_SST_CORE 38 #define SSTMAC_SET_TOPOLOGY(obj, top) //no op 39 #define STATIC_INIT_TOPOLOGY(params) \ 41 sstmac::hw::topology* top = sstmac::hw::topology::static_topology(params); \ 45 #define STATIC_INIT_INTERCONNECT(params) \ 47 sstmac::hw::interconnect* top = sstmac::hw::interconnect::static_interconnect(params); \ 48 set_interconnect(top); \ 52 #define SSTMAC_SET_TOPOLOGY(obj, top) obj->set_topology(top); 53 #define STATIC_INIT_TOPOLOGY(params) //no op 54 #define STATIC_INIT_INTERCONNECT(params) 68 typedef spkt_unordered_map<switch_id, connectable*> internal_map;
69 typedef spkt_unordered_map<node_id, connectable*> endpoint_map;
70 typedef spkt_unordered_map<node_id, node*> node_map;
71 typedef spkt_unordered_map<node_id, nic*> nic_map;
75 return "interconnect";
78 virtual ~interconnect();
89 init_factory_params(sprockit::sim_parameters* params);
91 #if !SSTMAC_INTEGRATED_SST_CORE 100 immediate_send(event_scheduler* src, message* msg, timestamp start)
const = 0;
103 set_event_manager(event_manager* mgr){};
116 node_map::const_iterator it = nodes_.find(nid);
117 if (it == nodes_.end()){
133 kill_node(
node_id nid, timestamp t) = 0;
136 static_interconnect(sprockit::sim_parameters* params);
151 typedef void * Stats;
152 std::map <switch_id, std::map <switch_id, std::list <Stats> > > state;
155 static interconnect* static_interconnect_;
157 void set_topology(
topology* params);
160 #if SSTMAC_INTEGRATED_SST_CORE 161 class sst_interconnect :
public interconnect
165 sst_interconnect(partition* part, parallel_runtime* rt){}
168 event_location()
const {
173 init_factory_params(sprockit::sim_parameters* params);
179 kill_node(
node_id nid, timestamp t);
184 class macro_interconnect :
public interconnect
187 virtual ~macro_interconnect();
190 init_factory_params(sprockit::sim_parameters *params);
193 set_event_manager(event_manager* m);
196 set_node_event_manager(node* the_node, event_manager* m);
199 set_event_manager_common(event_manager* m);
205 kill_node(
node_id nid, timestamp t);
211 macro_interconnect(partition* part, parallel_runtime* rt) :
212 partition_(part), rt_(rt)
217 partition* partition_;
218 parallel_runtime* rt_;
220 typedef spkt_unordered_map<netlink_id, netlink*> netlink_map;
221 netlink_map netlinks_;
223 typedef std::pair<timestamp, node_id> node_fail_event;
224 std::list<node_fail_event> failures_to_schedule_;
226 typedef macro_interconnect interconnect_base;
DeclareFactory2InitParams(processor, memory_model *, node *)
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
DeclareDebugSlot(interconnect) namespace sstmac