Go to the documentation of this file.
58 params()->ruby_system->registerNetwork(
this);
65 std::unordered_map<MachineType, std::vector<NodeID>> localNodeVersions;
66 for (
auto &it :
params()->ext_links) {
74 for (
int i = 0;
i < MachineType_base_level(MachineType_NUM); ++
i) {
75 MachineType mach =
static_cast<MachineType
>(
i);
76 if (localNodeVersions.count(mach)) {
77 for (
auto &ver : localNodeVersions.at(mach)) {
79 NodeID global_node_id = MachineType_base_number(mach) + ver;
95 p->ext_links,
p->int_links);
113 i !=
p->ext_links.end(); ++
i) {
118 if (!ranges.empty()) {
131 for (
auto &it :
dynamic_cast<Network *
>(
this)->
params()->ext_links) {
132 it->params()->ext_node->initNetQueues();
138 for (
int node = 0; node <
m_nodes; node++) {
163 case MessageSizeType_Control:
164 case MessageSizeType_Request_Control:
165 case MessageSizeType_Reissue_Control:
166 case MessageSizeType_Response_Control:
167 case MessageSizeType_Writeback_Control:
168 case MessageSizeType_Broadcast_Control:
169 case MessageSizeType_Multicast_Control:
170 case MessageSizeType_Forwarded_Control:
171 case MessageSizeType_Invalidate_Control:
172 case MessageSizeType_Unblock_Control:
173 case MessageSizeType_Persistent_Control:
174 case MessageSizeType_Completion_Control:
176 case MessageSizeType_Data:
177 case MessageSizeType_Response_Data:
178 case MessageSizeType_ResponseLocal_Data:
179 case MessageSizeType_ResponseL2hit_Data:
180 case MessageSizeType_Writeback_Data:
183 panic(
"Invalid range for type MessageSizeType");
191 std::string vnet_type)
235 const auto &matching_ranges =
addrMap.equal_range(mtype);
236 for (
auto it = matching_ranges.first; it != matching_ranges.second; it++) {
238 auto &ranges = node.
ranges;
240 if (range.contains(
addr)) {
245 return MachineType_base_count(mtype);
std::vector< std::string > m_vnet_type_names
virtual void setFromNetQueue(NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
NodeID getVersion() const
const Params * params() const
static uint32_t getBlockSizeBytes()
MachineType getType() const
virtual void collateStats()=0
void initNetworkPtr(Network *net_ptr)
std::vector< std::vector< MessageBuffer * > > m_toNetQueues
NodeID addressToNodeID(Addr addr, MachineType mtype)
Map an address to the correct NodeID.
void registerDumpCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are about to be dumped.
const AddrRangeList & getAddrRanges() const
static uint32_t m_virtual_networks
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
const Params * params() const
std::unordered_map< NodeID, NodeID > globalToLocalMap
NodeID getLocalNodeID(NodeID global_id) const
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
static uint32_t m_control_msg_size
std::unordered_multimap< MachineType, AddrMapNode > addrMap
std::vector< bool > m_ordered
static uint32_t MessageSizeType_to_int(MessageSizeType size_type)
void setToNetQueue(NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
static uint32_t m_data_msg_size
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
const Params * params() const
MachineType getType() const
virtual void checkNetworkAllocation(NodeID local_id, bool ordered, int network_num, std::string vnet_type)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
MachineID getMachineID() const
#define panic(...)
This implements a cprintf based panic() function.
Topology * m_topology_ptr
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17