cndm: Use SV enums for state machines

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2026-03-03 12:05:14 -08:00
parent 902996e3bd
commit 0ab7538e24
4 changed files with 27 additions and 23 deletions

View File

@@ -54,12 +54,13 @@ taxi_axis_if #(
.USER_W(axis_cpl[0].USER_W)
) cpl_comb();
localparam [2:0]
STATE_IDLE = 0,
STATE_RX_CPL = 1,
STATE_WRITE_DATA = 2;
typedef enum logic [1:0] {
STATE_IDLE,
STATE_RX_CPL,
STATE_WRITE_DATA
} state_t;
logic [2:0] state_reg = STATE_IDLE;
state_t state_reg = STATE_IDLE;
logic [15:0] txcq_prod_ptr_reg = '0;
logic [15:0] rxcq_prod_ptr_reg = '0;