DMux8Way.cmp

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

DMux8Way.cmp

easytiger
I'm implementing the DMux8Way (the last one!) and have noticed that the truth table in the cmp file has 2 characters in the sel column:

| in  | sel  |  a  |  b  |  c  |  d  |  e  |  f  |  g  |  h  |
|  0  |  00  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  01  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  10  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  11  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  00  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  01  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  10  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  0  |  11  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  1  |  00  |  1  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|  1  |  01  |  0  |  1  |  0  |  0  |  0  |  0  |  0  |  0  |
|  1  |  10  |  0  |  0  |  1  |  0  |  0  |  0  |  0  |  0  |
|  1  |  11  |  0  |  0  |  0  |  1  |  0  |  0  |  0  |  0  |
|  1  |  00  |  0  |  0  |  0  |  0  |  1  |  0  |  0  |  0  |
|  1  |  01  |  0  |  0  |  0  |  0  |  0  |  1  |  0  |  0  |
|  1  |  10  |  0  |  0  |  0  |  0  |  0  |  0  |  1  |  0  |
|  1  |  11  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  1  |


this is contrary to my expectations as this chip has sel[3] in the pin declarations. Am I missing something (quite likely)
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

ybakos
You're not missing anything. (but it is a good question, hmm.)
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

gcheong
In reply to this post by easytiger
In the DMux8Way.tst file the output-list format only outputs the first two bits of sel.  That should probably be changed to sel%B2.3.2 instead of sel%B2.2.2. The test body does set all three bits though. Good catch.
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

linuxford
In reply to this post by ybakos
Could you please re-confirm DMux8Way.cmp file is correct, and only two selection bits are needed, even though it is an 8 way. I expected 3 bits also.
For instance,
000 - a
001 -b
010 -c
011 -d
100 - e
101 - f
110 - g
111 -h
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

ybakos
The cmp file is correct.
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

cadet1620
Administrator
In reply to this post by linuxford
As noted in other posts on this thread, the DMux8Way chip is correctly tested, just the sel column in the output and compare files is affected.

Here are test and compare files that will fix the problem:
    DMux8Way.tst
    DMux8Way.cmp

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

linuxford
In reply to this post by gcheong
gcheong wrote
In the DMux8Way.tst file the output-list format only outputs the first two bits of sel.  That should probably be changed to sel%B2.3.2 instead of sel%B2.2.2. The test body does set all three bits though. Good catch.
Thanks for this tip. I tried to >> simulate and it kept stopping at each step. After I fixed the .tst file by making this one change as noted above, it played all the way through.

Also, thanks Mark for all your help and insights. I am really enjoying going through this book, and this forum is extremely helpful in assisting me to succeed. The software that was written is so cool, it makes the material very accessible, convenient and helps to learn the material without getting bogged down in trying to figure out some extravagant simulator. Thanks to all of the team that brought this project together. Wow! Very impressed.
Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

Drew
In reply to this post by cadet1620
Hi,

This correction still has not been added to the latest zip file on the site. :-(
Spent a while trying to figure out why I only had to selection bits in the tests for ages...

Reply | Threaded
Open this post in threaded view
|

Re: DMux8Way.cmp

bizobo
An update on April 6, 2013 - the correct DMux8Way.tst and DMux8Way.cmp files are still not part of the zip file package on the nand2tetris homepage :(