Repository navigation
The semantics of $pmux #6335
Replies: 1 comment
|
That is why Priority comes from how
So between groups you get a chain of
always @* begin
y = 0;
case (1'b1) // s[0] and s[1] may both be 1
s[0]: y = a;
s[1]: y = b;
endcase
end
// -> 2 x $mux (priority chain)
// with (* parallel_case *) before `case` -> 1 x $pmuxA |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Greetings everyone!
Currently if we print
$pmuxhelp message & Verilog simulation model, we get a straight-forward priority encoder:At the same time, if we check what's actually done in simplemap_pmux, we can see it's a parallel multiplexer, not a generic priority encoder.
To make matters worse, if we check what is done in proc_mux, we can see that the cases are converted in reverse, which given the simulation model above
evaluates
if (A) ... else if (B) ... else if (C)in reverse. A simple changebreaks something down the line in
opt- at this point I did not even bother to check what exactly is broken.So I wanted to clarify - what is
$pmuxactually? It is a general-use priority encoder, or a specific parallel multiplexer? If it's a parallel multiplexer, what use is there forparallel_caseattributes?Thanks in advance!
All reactions