Is there a way in Verilog or SystemVerilog to insert generate statement inside case statement to generate all the possible input combinations. For example a typical use case would be for a N:1 mux.
case(sel)
generate
for(i = 0; i < N; i += 1)
i: out = q[i];
endgenerate
endcase
I tried this, but the tool gives error. An alternate syntax is available which is
out <= q[sel];
But, my tool is not understanding this(the mux is fully decoded) and generating combinational loops. I can use if
statement to get the expected mux. But, I was wondering if there was a better way to do it.
wire [WIDTH-1:0] q[NO_PAGES-1]
. The q output is coming from different memory pages. I need to route particular page output based on page select signal (which is select line of mux). It is expected to be pure combinatorial logic. Actually I'm using synplify_pro, which is giving me this issue. – siu