Skip to content

Commit cf3bca5

Browse files
committed
axi_demux: Move typedef outside generate for VCS
1 parent a8cc199 commit cf3bca5

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717
has a single bit, and both values were correctly handled in synthesis. However, when starting
1818
simulation, the signal has an undefined value, and ModelSim threw warnings that this violated the
1919
`unique` condition.
20+
- `axi_demux`: Move `typedef` outside `generate` for compatibility with VCS.
2021
- `axi_id_prepend`:
2122
- Fix text of some assertion messages.
2223
- Fix case of prepending a single-bit ID.

src/axi_demux.sv

+13-12
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,25 @@ module axi_demux #(
5151

5252
localparam int unsigned IdCounterWidth = $clog2(MaxTrans);
5353

54+
//--------------------------------------
55+
// Typedefs for the FIFOs / Queues
56+
//--------------------------------------
57+
typedef logic [AxiIdWidth-1:0] axi_id_t;
58+
typedef struct packed {
59+
aw_chan_t aw_chan;
60+
select_t aw_select;
61+
} aw_chan_select_t;
62+
typedef struct packed {
63+
ar_chan_t ar_chan;
64+
select_t ar_select;
65+
} ar_chan_select_t;
66+
5467
// pass through if only one master port
5568
if (NoMstPorts == 32'h1) begin : gen_no_demux
5669
assign mst_reqs_o[0] = slv_req_i;
5770
assign slv_resp_o = mst_resps_i;
5871
// other non degenerate cases
5972
end else begin : gen_demux
60-
//--------------------------------------
61-
// Typedefs for the Fifo's / Queues
62-
//--------------------------------------
63-
typedef logic [AxiIdWidth-1:0] axi_id_t;
64-
typedef struct packed {
65-
aw_chan_t aw_chan;
66-
select_t aw_select;
67-
} aw_chan_select_t;
68-
typedef struct packed {
69-
ar_chan_t ar_chan;
70-
select_t ar_select;
71-
} ar_chan_select_t;
7273

7374
//--------------------------------------
7475
//--------------------------------------

0 commit comments

Comments
 (0)