|
12 | 12 | // Date: 12.01.2021 |
13 | 13 | // Description: round robin distributor |
14 | 14 |
|
| 15 | +/// The rr_distributor forwards requests to individual outputs in a round robin fashion. |
15 | 16 | module rr_distributor # ( |
16 | | - parameter int unsigned NumOut = 1, |
17 | | - parameter int unsigned Width = 1, |
18 | | - parameter type payload_t = logic [Width-1:0], |
19 | | - parameter int unsigned IdxWidth = (NumOut > 32'd1) ? unsigned'($clog2(NumOut)) : 32'd1, |
20 | | - parameter type idx_t = logic [IdxWidth-1:0] |
| 17 | + /// Number of outputs to distribute to. |
| 18 | + parameter int unsigned NumOut = 1, |
| 19 | + /// Data width of the payload in bits. Not needed if `payload_t` is overwritten. |
| 20 | + parameter int unsigned Width = 1, |
| 21 | + /// Data type of the payload, can be overwritten with a custom type. Only use of `Width`. |
| 22 | + parameter type payload_t = logic [Width-1:0], |
| 23 | + /// Dependent parameter, do **not** overwrite. |
| 24 | + /// Width of the selected index |
| 25 | + parameter int unsigned IdxWidth = (NumOut > 32'd1) ? unsigned'($clog2(NumOut)) : 32'd1, |
| 26 | + /// Dependent parameter, do **not** overwrite. |
| 27 | + /// type of the selected index |
| 28 | + parameter type idx_t = logic [IdxWidth-1:0] |
21 | 29 | ) ( |
| 30 | + input logic clk_i, |
| 31 | + input logic rst_ni, |
22 | 32 | // input stream |
23 | | - input logic clk_i, |
24 | | - input logic rst_ni, |
25 | | - input logic valid_i, |
26 | | - output logic ready_o, |
27 | | - input payload_t payload_i, |
| 33 | + input logic valid_i, |
| 34 | + output logic ready_o, |
| 35 | + input payload_t payload_i, |
28 | 36 | // output stream |
29 | 37 | output logic [NumOut-1:0] valid_o, |
30 | 38 | input logic [NumOut-1:0] ready_i, |
|
0 commit comments