Having trouble with DMux4way implementation.

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

Having trouble with DMux4way implementation.

bigmit37
This post was updated on .
I"m getting a comparison failure at line 7. I had written out a logic table consisting of

columns : input, sec[0], sec[1],  a, b, c, d

and 8 rows (4 x 0 , 4 x 1's ) .

I feel like my code should work, but I can't seem to find the error. Any suggestions?

Thank you.




EDIT: So the fact that hardware reads from left to right, is an important part I missed.
And it solved my problem.
Reply | Threaded
Open this post in threaded view
|

Re: Having trouble with DMux4way implementation.

cadet1620
Administrator
Look at the comapre file and output file at the point of failure.
sel = 01. The compare file has b=1. The output file (your part) has c=1.

When the script miscompares, you can step it to see the output from the rest of the test script. This may give you more clues about your failure.

One thing that can be confusing to people with programming experience is that hardware numbers the bits from right to left. This is so that bit n in a binary number is the bit with value 2^n.

Please edit your post to remove the HDL once you have solved your problem.

--Mark