63 std::unordered_map<MachineType, std::vector<NodeID>> localNodeVersions;
64 for (
auto &it :
params()->ext_links) {
71 for (
int i = 0;
i < MachineType_base_level(MachineType_NUM); ++
i) {
72 MachineType mach =
static_cast<MachineType
>(
i);
73 if (localNodeVersions.count(mach)) {
74 for (
auto &ver : localNodeVersions.at(mach)) {
76 NodeID global_node_id = MachineType_base_number(mach) + ver;
107 params()->ruby_system->registerNetwork(
this);
111 i != p->ext_links.end(); ++
i) {
116 if (!ranges.empty()) {
129 for (
auto &it : dynamic_cast<Network *>(
this)->
params()->ext_links) {
130 it->params()->ext_node->initNetQueues();
136 for (
int node = 0; node <
m_nodes; node++) {
161 case MessageSizeType_Control:
162 case MessageSizeType_Request_Control:
163 case MessageSizeType_Reissue_Control:
164 case MessageSizeType_Response_Control:
165 case MessageSizeType_Writeback_Control:
166 case MessageSizeType_Broadcast_Control:
167 case MessageSizeType_Multicast_Control:
168 case MessageSizeType_Forwarded_Control:
169 case MessageSizeType_Invalidate_Control:
170 case MessageSizeType_Unblock_Control:
171 case MessageSizeType_Persistent_Control:
172 case MessageSizeType_Completion_Control:
174 case MessageSizeType_Data:
175 case MessageSizeType_Response_Data:
176 case MessageSizeType_ResponseLocal_Data:
177 case MessageSizeType_ResponseL2hit_Data:
178 case MessageSizeType_Writeback_Data:
181 panic(
"Invalid range for type MessageSizeType");
189 std::string vnet_type)
233 const auto &matching_ranges =
addrMap.equal_range(mtype);
234 for (
auto it = matching_ranges.first; it != matching_ranges.second; it++) {
236 auto &ranges = node.
ranges;
238 if (range.contains(addr)) {
243 return MachineType_base_count(mtype);
#define panic(...)
This implements a cprintf based panic() function.
std::unordered_multimap< MachineType, AddrMapNode > addrMap
MachineType getType() const
std::vector< std::vector< MessageBuffer * > > m_toNetQueues
virtual void checkNetworkAllocation(NodeID local_id, bool ordered, int network_num, std::string vnet_type)
Callback class used for collating statistics from all the controller of this type.
const Params * params() const
const AddrRangeList & getAddrRanges() const
std::vector< bool > m_ordered
std::vector< std::string > m_vnet_type_names
void setToNetQueue(NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
const Params * params() const
Topology * m_topology_ptr
NodeID getVersion() 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
MachineID getMachineID() const
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void registerDumpCallback(Callback *cb)
Register a callback that should be called whenever statistics are about to be dumped.
static uint32_t MessageSizeType_to_int(MessageSizeType size_type)
static uint32_t m_data_msg_size
NodeID getLocalNodeID(NodeID global_id) const
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
MachineType getType() const
std::unordered_map< NodeID, NodeID > globalToLocalMap
NodeID addressToNodeID(Addr addr, MachineType mtype)
Map an address to the correct NodeID.
const Params * params() const
virtual void setFromNetQueue(NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
void initNetworkPtr(Network *net_ptr)
static uint32_t m_virtual_networks
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
static uint32_t getBlockSizeBytes()