47 :
Network(p), m_buffer_size(p->buffer_size),
48 m_endpoint_bandwidth(p->endpoint_bandwidth),
49 m_adaptive_routing(p->adaptive_routing)
53 i != p->routers.end(); ++
i) {
83 const NetDest& routing_table_entry)
99 const NetDest& routing_table_entry)
108 const NetDest& routing_table_entry,
120 queues[
i] = buffer_ptr;
127 m_switches[src]->addOutPort(queues, routing_table_entry,
137 for (MessageSizeType
type = MessageSizeType_FIRST;
138 type < MessageSizeType_NUM; ++
type) {
140 .
name(
name() +
".msg_count." + MessageSizeType_to_string(
type))
144 .
name(
name() +
".msg_byte." + MessageSizeType_to_string(
type))
171 out <<
"[SimpleNetwork]";
175 SimpleNetworkParams::create()
200 uint32_t num_functional_writes = 0;
203 num_functional_writes +=
m_switches[
i]->functionalWrite(pkt);
209 return num_functional_writes;
std::vector< std::vector< MessageBuffer * > > m_toNetQueues
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
void print(std::ostream &out) const
void init_net_ptr(SimpleNetwork *net_ptr)
Stats::Formula m_msg_counts[MessageSizeType_NUM]
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
Topology * m_topology_ptr
bool functionalRead(Packet *pkt)
std::string PortDirection
uint32_t functionalWrite(Packet *pkt)
std::vector< Switch * > m_switches
void makeInternalLink(SwitchID src, SwitchID dest, BasicLink *link, const NetDest &routing_table_entry, PortDirection src_outport, PortDirection dst_inport)
void deletePointers(C< T, A > &container)
Stats::Formula m_msg_bytes[MessageSizeType_NUM]
std::vector< MessageBuffer * > m_int_link_buffers
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void makeExtOutLink(SwitchID src, NodeID dest, BasicLink *link, const NetDest &routing_table_entry)
static uint32_t MessageSizeType_to_int(MessageSizeType size_type)
virtual const std::string name() const
void regStats()
Register statistics for this object.
void makeExtInLink(NodeID src, SwitchID dest, BasicLink *link, const NetDest &routing_table_entry)
static uint32_t m_virtual_networks
const FlagsType nozero
Don't print if this is zero.
void createLinks(Network *net)
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
void regStats() override
Register statistics for this object.
SimpleNetwork(const Params *p)
int m_num_connected_buffers