cndm_proto: 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:35 -08:00
parent 0ab7538e24
commit 191f7940b3
4 changed files with 27 additions and 23 deletions

View File

@@ -64,13 +64,14 @@ taxi_dma_desc_if #(
) dma_desc();
// Transmit datapath control state machine
localparam [2:0]
STATE_IDLE = 0,
STATE_READ_DESC = 1,
STATE_READ_DATA = 2,
STATE_TX_DATA = 3;
typedef enum logic [1:0] {
STATE_IDLE,
STATE_READ_DESC,
STATE_READ_DATA,
STATE_TX_DATA
} state_t;
logic [2:0] state_reg = STATE_IDLE;
state_t state_reg = STATE_IDLE;
logic desc_req_reg = 1'b0;