52#ifndef __MEM_RUBY_NETWORK_NETWORK_HH__
53#define __MEM_RUBY_NETWORK_NETWORK_HH__
57#include <unordered_map>
68#include "mem/ruby/protocol/LinkDirection.hh"
69#include "mem/ruby/protocol/MessageSizeType.hh"
70#include "params/RubyNetwork.hh"
102 int network_num, std::string vnet_type);
114 virtual void print(std::ostream& out)
const = 0;
122 {
fatal(
"Functional read not implemented.\n"); }
124 {
fatal(
"Masked functional read not implemented.\n"); }
126 {
fatal(
"Functional write not implemented.\n"); }
174 std::unordered_multimap<MachineType, AddrMapNode>
addrMap;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
ClockedObjectParams Params
Parameters of ClockedObject.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
void setToNetQueue(NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
virtual void setFromNetQueue(NodeID global_id, bool ordered, int netNumber, std::string vnet_type, MessageBuffer *b)
std::unordered_multimap< MachineType, AddrMapNode > addrMap
virtual bool functionalRead(Packet *pkt)
std::vector< bool > m_ordered
Network & operator=(const Network &obj)
static uint32_t m_data_msg_size
static uint32_t m_control_msg_size
static uint32_t getNumberOfVirtualNetworks()
Topology * m_topology_ptr
virtual void checkNetworkAllocation(NodeID local_id, bool ordered, int network_num, std::string vnet_type)
virtual uint32_t functionalWrite(Packet *pkt)
Network(const Network &obj)
static uint32_t m_virtual_networks
static uint32_t MessageSizeType_to_int(MessageSizeType size_type)
virtual void print(std::ostream &out) const =0
std::vector< std::vector< MessageBuffer * > > m_fromNetQueues
std::unordered_map< NodeID, NodeID > globalToLocalMap
virtual void makeInternalLink(SwitchID src, SwitchID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry, PortDirection src_outport, PortDirection dst_inport)=0
NodeID getLocalNodeID(NodeID global_id) const
virtual bool functionalRead(Packet *pkt, WriteMask &mask)
virtual void makeExtOutLink(SwitchID src, NodeID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry)=0
virtual void collateStats()=0
NodeID addressToNodeID(Addr addr, MachineType mtype)
Map an address to the correct NodeID.
std::vector< std::vector< MessageBuffer * > > m_toNetQueues
virtual void makeExtInLink(NodeID src, SwitchID dest, BasicLink *link, std::vector< NetDest > &routing_table_entry)=0
Port & getPort(const std::string &, PortID idx=InvalidPortID) override
Get a port with a given name and index.
std::vector< std::string > m_vnet_type_names
static RubyDummyPort & instance()
ClockedObject declaration and implementation.
#define fatal(...)
This implements a cprintf based fatal() function.
std::string PortDirection
std::ostream & operator<<(std::ostream &os, const BoolVec &myvector)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Declaration of the Packet class.