5#include "debug/HMCController.hh"
12 numMemSidePorts(
p.port_mem_side_ports_connection_count),
15 assert(
p.port_cpu_side_ports_connection_count == 1);
22 if (mem_side_port_id == 0)
54 if (!
reqLayers[mem_side_port_id]->tryTiming(src_port)) {
86 bool success =
memSidePorts[mem_side_port_id]->sendTimingReq(pkt);
96 reqLayers[mem_side_port_id]->failedTiming(src_port,
103 if (expect_response) {
108 reqLayers[mem_side_port_id]->succeededTiming(packetFinishTime);
111 pktCount[cpu_side_port_id][mem_side_port_id]++;
112 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
std::vector< RequestPort * > memSidePorts
const Cycles frontendLatency
Cycles of front-end pipeline including the delay to accept the request and to decode the address.
statistics::Vector transDist
Stats for transaction distribution and data passing through the crossbar.
std::unordered_map< RequestPtr, PortID > routeTo
Remember where request packets came from so that we can route responses to the appropriate port.
statistics::Vector2d pktCount
std::vector< QueuedResponsePort * > cpuSidePorts
The memory-side ports and CPU-side ports of the crossbar.
const Cycles forwardLatency
statistics::Vector2d pktSize
std::vector< bool > gotAddrRanges
Remember for each of the memory-side ports of the crossbar if we got an address range from the connec...
virtual void recvRangeChange(PortID mem_side_port_id)
Function called by the port when the crossbar is recieving a range change.
void calcPacketTiming(PacketPtr pkt, Tick header_delay)
Calculate the timing parameters for the packet.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Cycles is a wrapper class for representing cycle counts, i.e.
HMC Controller, in general, is responsible for translating the host protocol (AXI for example) to ser...
HMCController(const HMCControllerParams &p)
virtual bool recvTimingReq(PacketPtr pkt, PortID cpu_side_port_id)
virtual void recvRangeChange(PortID mem_side_port_id)
Function called by the port when the crossbar is recieving a range change.
int rotate_counter()
Function for rotating the round robin counter.
A non-coherent crossbar connects a number of non-snooping memory-side ports and cpu_sides,...
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests and one for responses.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
bool needsResponse() const
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
int cmdToIndex() const
Return the index of this command.
RequestPtr req
A pointer to the original request.
bool isExpressSnoop() const
bool cacheResponding() const
const std::string name() const
Return port name (for DPRINTF).
A ResponsePort is a specialization of a port.
HMCController declaration.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.