Relay

Represents port with flit buffers. Must be connected with another relay. Used for transmitting flits between routers and processors.

Method

void SetLocalID(std::int32_t id)

Sets owner Router id for the Relay

Method

void SetVirtualChannels(std::size_t vcs)	

Sets number of virtual channels

Method

std::size_t Size()

Returns number of virtual channels

Method

void Bind(Relay& r)

Pairs current Relay with provided one

Method

bool Bound()

Returns true if array is bound to another Relay

Method

void Disable()

Allows to leave Relay unbound (binds it to itself)

Method

void Reset()

Performs reset

Method

void Update()

Performs per-cycle update

Method

bool CanSend(const Flit &flit)

Returns true if Flit can be send

Method

bool CanSend(std::size_t vc)

Returns true if Flit can be send through specified virtual channel

Method

bool Send(Flit flit)

Tries to send Flit. Returns true on success

Method

bool CanReceive()

Returns true if Flit can be received

Method

Flit Receive()

Returns Flit if receive succeed, otherwise returns invalid Flit instance

Method

std::size_t GetFreeSlots(std::size_t vc)

Returns number of free slots in the Buffer for given virtual channel

Method

Flit Front()

Returns front Flit from the Buffer of current virtual channel

Method

void Skip()

Skips current virtual channel

Method

Flit Pop()

Removes Flit from the current virtual channel Buffer

Method

Buffer& operator[](std::size_t i)

Overloaded operator for accessing Buffer of specified virtual channel