Simple Mux implemetation

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

Simple Mux implemetation

savage
Hello Forum,

I've just recently started on the project - so very much a newbie.
I am trying to implement Mux, but I get a failure when running the test script.
I ran the built-in chip for Mux, and the test script failed in the same place.
I'm sure my gate logic is OK.
Can anyone offer a suggestion please?

Thanks to all
Reply | Threaded
Open this post in threaded view
|

Re: Simple Mux implemetation

hwan
Hello,

Here's my implementation which passed the test.
I'm also a novice in the subject, so any advice or suggestion welcomed!

Regards,

-------------------------------------------
I'm sorry I didn't know there was a forum rule.
I've erased my implementation in order to respect the forum rule.
Instead, I'll email it to savage.

Reply | Threaded
Open this post in threaded view
|

Re: Simple Mux implemetation

cadet1620
Administrator
In reply to this post by savage
savage wrote
Hello Forum,

I've just recently started on the project - so very much a newbie.
I am trying to implement Mux, but I get a failure when running the test script.
I ran the built-in chip for Mux, and the test script failed in the same place.
I'm sure my gate logic is OK.
Can anyone offer a suggestion please?

Thanks to all
Usually when the built-in chips fail a test it is because one of the sub-chips you've built is subtly defective.  Here's how to proceed to debug this:

Create a subdirectory under project/01.  I'd call it 'mux' since that's what you are testing.

Copy Mux.tst and Mux.cmp into this subdirectory.  These should be the only files in the subdirectory.  Run the Hardware Simulator on the the Mux.tst in this subdirectory.  It will use only the built-in chips to run the test.  If it fails, there is some other problem.

Copy your Mux.hdl into the subdirectory and test it.  This will use the built-in chips to test your Mux.  Debug it in this subdirectory if you need to.

Copy your other chips' HDL files into the subdirectory one by one, running the Mux test after copying each file to find the problem chip.

Once you find the problem chip,
{
    Create a subdirectory under project/01...
}
(Have you done recursive programming?  Now you're doing recursive debugging.)

Happy bug hunting!
--Mark