No Mux8Way builtin chip

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

No Mux8Way builtin chip

DaveDoesThis
Hi,

There's not a Mux8Way chip in the builtin chips folder. This isn't a huge problems since I can just use my custom-made chip, but I'm pretty sure it should be there according to the chip api.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: No Mux8Way builtin chip

cadet1620
Administrator
DaveDoesThis wrote
There's not a Mux8Way chip in the builtin chips folder. This isn't a huge problems since I can just use my custom-made chip, but I'm pretty sure it should be there according to the chip api.
The book does not have you build Mux4Way or Mux8Way.  The required chips are Mux4Way16 and Mux8Way16. You can build them using the Mux16 as a building block.

Once you've written your Mux8Way16, if you have a specific need for a 1-bit 8-way multiplexor you can use one bit of the 16-bit part:
    Mux8Way16(sel=foo, a[0]=bar, ..., out[0]=whatever);
HDL doesn't care if you leave unused bits of buses unconnected.

It's OK, by the way, to write your own parts that aren't mentioned in the book.  You can put regular HDL in the n2t/tools/builtInChips directory and they'll be available everywhere just like the other built-ins.  I added And3Way, And8Way and Or3Way to my built-ins since they are standard parts that I've designed with for years.

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

Re: No Mux8Way builtin chip

DaveDoesThis
Thanks for the quick response! I ended up making a Mux8Way chip and putting it in the builtInChips directory like you said.

The reason I thought there would be a built-in Mux8Way chip is it's in the Hack chip-set api in the HDL Survival Guide: http://www.nand2tetris.org/software/HDL%20Survival%20Guide.html
Reply | Threaded
Open this post in threaded view
|

Re: No Mux8Way builtin chip

cadet1620
Administrator
DaveDoesThis wrote
The reason I thought there would be a built-in Mux8Way chip is it's in the Hack chip-set api in the HDL Survival Guide: http://www.nand2tetris.org/software/HDL%20Survival%20Guide.html
Thanks for the report. I copied that list into the Survival Guide from another user. I'll need to give it a good eyeballing to check for any other "typos".

--Mark