跳转至

Link Layer Controller LinkMonitor

Function Description

The LinkMonitor module converts messages based on Valid-Ready handshake into handshake based on L-Credit, and simultaneously maintains the power state of the TX and RX links. For specific details, please refer to the CHI Spec Link Handshake chapter.

Feature 1: Decoupled Handshake to L-Credit Handshake Conversion

The Decoupled handshakes from the three TX channels are converted to L-Credit handshakes via the Decoupled2LCredit module. The Decoupled2LCredit module records the number of LCredit received by the downstream ICN (lcreditPool). Only when lcreditPool is greater than 0 can it accept upstream Decoupled requests; when a Decoupled request handshake is successful, the lcreditPool count decreases by one.

Impact of TX link state: If the TX link state is STOP or ACTIVATE, it should stop accepting Decoupled messages. If the TX link state is STOP, it should stop accepting LCredit. Even if the downstream lcrdv signal is asserted high, lcreditPool should remain unchanged.

Feature 2: L-Credit Handshake to Decoupled Handshake Conversion

The L-Credit handshakes received from the three RX channels are converted to Decoupled handshakes via the LCredit2Decoupled module. The LCredit2Decoupled module maintains a queue, with a default size of 4 items (lcreditNum is configurable, required lcreditNum ≤ 15), used to temporarily store messages. This means an RX channel can send a maximum of lcreditNum outstanding LCredit downstream. Simultaneously, it maintains a counter initialized to lcreditNum (lcreditPool) to record how many LCredit the current channel can send at most. When lcreditPool > queue valid entry count (queueCnt), it indicates that the number of outstanding LCredit sent by this channel is less than the number of messages the channel's queue can receive, at which point this channel can send LCredit downstream. When lcreditPool < lcreditNum, this channel should unconditionally accept valid requests from downstream, i.e., requests where flitv is asserted high and flitpending was asserted high in the previous cycle.

Impact of RX link state: If the RX link state is not RUN, this channel should not send LCredit downstream, even if lcreditPool > queue valid entry count.

Feature 3: TXSACTIVE and RXSACTIVE

TXSACTIVE is always asserted high. RXSACTIVE is currently not used.

Feature 4: Interface activation and deactivation

TXLINKACTIVEREQ is kept asserted high after reset. RXLINKACTIVEACK is set to true in the cycle after RXLINKACTIVEREQ is set to true; when RXLINKACTIVEREQ is set to false, starting from the next cycle, it monitors the state of the three RX channels. When each RX channel has returned all outstanding LCredit (i.e., lcreditPool equals lcreditNum), RXLINKACTIVEACK can be set to false.

Overall Block Diagram

LinkMonitor