Baseline router - Project-Bonfire/Bonfire GitHub Wiki
Fig. 1 shows an overview of the same router architecture with credit-based flow control.
Figure 1. High level overview of the NoC router with credit-based flow control
Router specifications
- 5 port router. 5 input ports and 5 output ports. It is designed for a 2D Mesh NoC.
- Uses credit-based flow control and wormhole switching.
- The packet format is available online. A packet consists of one header flit (necessary), zero, one or more body flits (optional), and one tail flit (necessary).
- Takes 3 clock cycles for a flit from the time it enters the router until it exits the router.
- Routing is implemented as logic-based in the router (no routing table used).
- Router uses round-robin arbitration (with dynamic prioritization and fairness, avoiding starvation).
Customizable parameters of the router
- Data width of the router via DATA_WIDTH parameter (default value: 32)
- The address of the router via current_address parameter
- Connectivity bits (Cx) of routing logic via Cx_rst parameter
- The size of the network (network can only have a size of N x N) (possible values in our case: 2, and 4)
The credit-based flow control works as follows:
- Transmitter has a credit counter, which is initially equal to the number of free slots in the FIFO of the next router (in our case, it is initially equal to 3, which is the FIFO depth - 1).
- Every time a flit is sent, the counter gets decremented by one.
- The credit counter must also be updated in case the receiver (next router) reads a flit from its FIFO, since its buffer space is increased.
- In case the next router reads the flit, it sends a credit back to the sender (upstream) router. This can be implemented in two ways, either just a one bit credit would be send, which increments the value of the counter in the upstream router by one, or it can also be a credit value (larger than one), which indicates how many slots of the input FIFO of the next router have been freed. In our router, we have opted for the first approach, therefore, a single credit bit is sent back from the downstream router to the upstream (sender).
- In case the counter value in the current router (sender) becomes zero, transmission is stalled.
- Transmission continues again when the credit counter value increases (the next router's FIFO is not full).