Skip to content

Commit

Permalink
src/axi_dw_upsizer.sv: avoid unnecessarily wide indices into r_data
Browse files Browse the repository at this point in the history
Using indices of type `addr_t` (aka `logic [AxiAddrWidth-1:0]`) for indexing into `r_data` causes issues with Verilator v5.028+, as the `r_data` array has only `AxiSlvPortStrbWidth` entries.
  • Loading branch information
michael-platzer authored Dec 19, 2024
1 parent bbe468e commit 1549c95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/axi_dw_upsizer.sv
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ module axi_dw_upsizer #(
// Request was accepted
if (!r_req_q.ar_valid)
if (mst_resp.r_valid && (idx_r_upsizer == t) && r_upsizer_valid) begin
automatic addr_t mst_port_offset = AxiMstPortStrbWidth == 1 ? '0 : r_req_q.ar.addr[idx_width(AxiMstPortStrbWidth)-1:0];
automatic addr_t slv_port_offset = AxiSlvPortStrbWidth == 1 ? '0 : r_req_q.ar.addr[idx_width(AxiSlvPortStrbWidth)-1:0];
automatic logic [idx_width(AxiMstPortStrbWidth)-1:0] mst_port_offset = AxiMstPortStrbWidth == 1 ? '0 : r_req_q.ar.addr[idx_width(AxiMstPortStrbWidth)-1:0];
automatic logic [idx_width(AxiSlvPortStrbWidth)-1:0] slv_port_offset = AxiSlvPortStrbWidth == 1 ? '0 : r_req_q.ar.addr[idx_width(AxiSlvPortStrbWidth)-1:0];

// Valid output
slv_r_valid_tran[t] = 1'b1 ;
Expand Down

0 comments on commit 1549c95

Please sign in to comment.