rfnoc: lib: introduce ctrl-port interface and BFM

Original-commit: 886cf97ad5d494b20c6fff0a53113f6096d458c7
This commit is contained in:
Max Köhler
2025-02-14 08:04:26 -06:00
committed by Wade Fife
parent c48f8bd5f1
commit f961936a43
12 changed files with 923 additions and 4 deletions
+30
View File
@@ -14,4 +14,34 @@ package ctrlport_pkg;
`include "ctrlport.vh"
// typedef for status
typedef enum logic [1:0] {
STS_OKAY = CTRL_STS_OKAY,
STS_CMDERR = CTRL_STS_CMDERR,
STS_TSERR = CTRL_STS_TSERR,
STS_WARNING = CTRL_STS_WARNING } ctrlport_status_t;
// Defining signals as defined in Table 18 of RFNoC Specification v.1.0.1.
// request related signals
typedef struct packed {
logic wr;
logic rd;
logic [ CTRLPORT_ADDR_W-1:0] addr;
logic [ CTRLPORT_PORTID_W-1:0] port_id;
logic [CTRLPORT_REM_EPID_W-1:0] remote_epid;
logic [ CTRLPORT_PORTID_W-1:0] remote_portid;
logic [ CTRLPORT_DATA_W-1:0] data;
logic [ CTRLPORT_BYTE_EN_W-1:0] byte_en;
logic has_time;
// signal time - renamed to timestamp to avoid conflict with SystemVerilog keyword time
logic [ CTRLPORT_TIME_W-1:0] timestamp;
} ctrlport_request_t;
// response related signals
typedef struct packed {
logic ack;
ctrlport_status_t status;
logic [CTRLPORT_DATA_W-1:0] data;
} ctrlport_response_t;
endpackage : ctrlport_pkg