4way 16 bit multiplexer

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

4way 16 bit multiplexer

Leroy
This post was updated on .
I tested the following implementation and it failed.  I haven't had this issue yet, at least where I didn't know what I needed to fix after rechecking my implementation.    

CHIP Mux4Way16 {


    IN a[16], b[16], c[16], d[16], sel[2];

    OUT out[16];

    PARTS:
    [Functional implementation removed by admin.]

I also loaded the built-in version and when comparing it with the .tst file, it also failed?????  I will delete the code from the post if it turns out to be the correct implementation.  
Reply | Threaded
Open this post in threaded view
|

Re: 4way 16 bit multiplexer

cadet1620
Administrator
Your Mux4Way16 is a correct solution; it passes on my system.

Usually, when a correct part fails its test it is due to a problem in one of the underlying parts that it uses in its implementation.

Note that if you just loaded the built-in Mux4Way16 into the simulator and reran the test, the first thing the test does is reload your HDL so you would still be seeing the result of testing your Mux4Way16.

The way to track this down is to create a test subdirectory under your project 1 directory and copy Mux4Way16.tst and Mux4Way16.cmp into the test directory.  Don't copy any of your HDLs yet.

Run Mux4Way16.tst; it will use the built-in part and should pass.

Copy your Mux4Way16.hdl into the test directory and rerun the test; it should still pass.

Copy your Mux16.hdl into the test directory and rerun the Mux4Way16 test.  If the test fails, there is a problem in Mux16 that the Mux16 test didn't catch.  If it passes, the problem must be in one of the parts that Mux16 uses.

Keep copying HDL files one at a time into the test directory and rerunning the Mux4Way16 test until you find the defective part.

My guess is that one of your Xxx16 parts has a typo in one of the [] indexes that didn't get caught by the Xxx16 test script.

--Mark




Reply | Threaded
Open this post in threaded view
|

Re: 4way 16 bit multiplexer

Leroy
Yeah, it was a problem with the Mux16.  

I tried going back to delete the implementation on the first message, but it wouldn't let me after you replied.  

Thanks again for your help.