Mux4Way16 Comparison Failure

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mux4Way16 Comparison Failure

rosey_118
Hi All,

First post on here, hope someone can help.

I have constructed the Mux4Way16 using 3x Mux16. I have set the first 2 Muxes as MuxAB & MuxCD, using Sel[1]. The then the 3rd Mux using the outputs of these and Sel[0].

However it is giving me Comparison failure at line 7.

I have checked the .cmp file at line 7 and it expects 1010101010101010, this what my HDL produces in the simulator, so i am stumped by the error

Any help would be greatly appreciated

Thanks,
Shaun
Reply | Threaded
Open this post in threaded view
|

Re: Mux4Way16 Comparison Failure

rosey_118
Solved, i had sel[0] and sel[1] the wrong way around, doh!
Reply | Threaded
Open this post in threaded view
|

Re: Mux4Way16 Comparison Failure

cadet1620
Administrator
In reply to this post by rosey_118
You are off a line.  The expected output for line 7 is 1001100001110110 (b input value) and your output is the c input value.

Check the order of the sel bits.  Note that in hardware speak, bit 0 is the rightmost, least significant, bit.

--Mark

[Edit:  Argh! start to respond, go get a cup of coffee, get distracted, and the poster solves his own problem!
Congratulations. --M]