Credit-Based Flow Control

In CHI, you can't just send data whenever you want. You need to have "Credits".

Why Credits?

In AXI, we use VALID/READY. If READY is low, the Master must wait. In a huge network (NoC), this is inefficient because the "Wait" signal takes too long to travel back to the Master.

CHI Solution: The receiver tells the sender: "I have space for 5 packets." The sender takes these 5 credits. Every time it sends a packet, it subtracts 1. When it reaches 0, it stops. When the receiver clears space, it sends more credits back.

Deadlock Avoidance

In a large NoC, circular dependencies between message types can cause a total system freeze. CHI solves this using Independent Virtual Channels:

  • REQ (Request): Master to Home Node.
  • SNP (Snoop): Home Node to other Masters.
  • RSP (Response): Master/Home Node completion.
  • DAT (Data): Actual data movement.
Rule: A higher-layer message (like Snoop) must never be blocked by a lower-layer message (like Request). Each channel has its own dedicated buffers to ensure forward progress.

Livelock & Retry Mechanism

What if a Home Node (HN-F) is too busy to handle a request? Instead of stalling the bus, it sends a Retry response.

  • The Problem: If multiple Masters keep retrying blindly, they might starve each other (Livelock).
  • The Solution: CHI uses a Protocol Credit (P-Credit) mechanism. The HN-F tracks which Masters are waiting and sends a "Credit" when space is available, guaranteeing that the Master will succeed on its next try.

System Integration Bottlenecks

When integrating CHI in a SoC, watch out for these performance killers:

  • HN-F Congestion: The Home Node is the brain of CHI. If it lacks enough trackers (to track outstanding transactions), the whole system slows down.
  • DVM Latency: Distributed Virtual Memory (DVM) transactions can be very slow as they must reach every node in the system. High DVM traffic can tank performance.
  • Quality of Service (QoS): Without proper QoS tokens, a "noisy neighbor" (like a GPU) could hog the NoC bandwidth, starving the CPU cores.
Critical for Verification: Credit leakage and buffer overflows are the most common CHI bugs. Always verify that TGTID (Target ID) and SRCTID (Source ID) are correctly routed through the NoC.