From 3804f255f9874d904f3cd8d99009be0e342c36c8 Mon Sep 17 00:00:00 2001 From: Luca Zulberti Date: Sat, 30 Jan 2021 19:27:54 +0100 Subject: [PATCH] axi_dw_downsizer: Remove forward reference Signed-off-by: Luca Zulberti --- src/axi_dw_downsizer.sv | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/axi_dw_downsizer.sv b/src/axi_dw_downsizer.sv index 7c370bc08..8000ba4f5 100644 --- a/src/axi_dw_downsizer.sv +++ b/src/axi_dw_downsizer.sv @@ -256,6 +256,20 @@ module axi_dw_downsizer #( logic injected_aw ; } r_req_t; + // Write-related type, but w_req_q is referenced from Read logic + typedef struct packed { + aw_chan_t aw ; + logic aw_valid ; + logic aw_throw_error ; + burst_len_t burst_len ; + axi_pkg::len_t orig_aw_len ; + axi_pkg::burst_t orig_aw_burst; + axi_pkg::resp_t burst_resp ; + axi_pkg::size_t orig_aw_size ; + } w_req_t; + + w_req_t w_req_d, w_req_q; + // Decide which downsizer will handle the incoming AXI transaction logic [AxiMaxReads-1:0] idle_read_downsizer; tran_id_t idx_ar_downsizer; @@ -614,19 +628,7 @@ module axi_dw_downsizer #( W_SPLIT_INCR_DOWNSIZE } w_state_e; - typedef struct packed { - aw_chan_t aw ; - logic aw_valid ; - logic aw_throw_error ; - burst_len_t burst_len ; - axi_pkg::len_t orig_aw_len ; - axi_pkg::burst_t orig_aw_burst; - axi_pkg::resp_t burst_resp ; - axi_pkg::size_t orig_aw_size ; - } w_req_t; - w_state_e w_state_d, w_state_q; - w_req_t w_req_d, w_req_q; // This FIFO holds the number of bursts generated by each write transactions handled by this downsizer. // This is used to forward only the correct B beats to the slave.