I tried synthesizing the below code in vivado, it doesn’t show expected results, albeit i am using 2013 version, hence i am curious if industry standard tools would have issue synthesizing it
sel is one-hot encoded
always_comb
begin
Out = ‘0; //32 bit
for(int i = 0; i < NUM_PORTS; i++) begin
if (sel[i])
Out = i_data[i]; //32 bits with x ports
end
end
i was expecting 2:1 Muxes that are connected to each select line
New contributor
Nidwho is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1