Question about Mux4Way16 sel pin

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

Question about Mux4Way16 sel pin

gs99
I have the 3-line solution using Mux16, but I don’t understand how it works.

The Mux16 config:
CHIP Mux16 {
    IN a[16], b[16], sel;
    OUT out[16];
    PARTS:
    // Put your code here.
}

I understand how the 16-bit a pin of Mux16 is represented by single letter a (Mux16(a=...
But I don’t understand the sel pin.
Mux16 sel pin is 1-bit; Mux4Way16 sel pin is 2-bit.

How does the Mux16 1-bit sel pin match up with the 2-bit sel pin?
   
Reply | Threaded
Open this post in threaded view
|

Re: Question about Mux4Way16 sel pin

cadet1620
Administrator
gs99 wrote
I have the 3-line solution using Mux16, but I don’t understand how it works.

The Mux16 config:
CHIP Mux16 {
    IN a[16], b[16], sel;
    OUT out[16];
    PARTS:
    // Put your code here.
}

I understand how the 16-bit a pin of Mux16 is represented by single letter a (Mux16(a=...
But I don’t understand the sel pin.
Mux16 sel pin is 1-bit; Mux4Way16 sel pin is 2-bit.

How does the Mux16 1-bit sel pin match up with the 2-bit sel pin?
The Mux16s' sel pins are connected to either sel[0] or sel[1]. For each line of the truth table for Mux4Way16, trace through the circuit based on the individual sel bit values.

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

Re: Question about Mux4Way16 sel pin

gs99
Mark:
Thanks, I figured it out.

I use Logisim to draw the graphics before trying the hdl here.
The semantics there are closer to hardware, I think.
I key in the values from .cmp file to test the circuit in Logisim, then write the hdl.
 
Are students expected to do these exercises without seeing the answers?
Different people learn in different ways. There’s no way I could have learned this on my own.
It would be like trying to do trigonometry without knowing the formulas.  

However, I did the Mux all by myself; not looking at the answer first!

Thanks for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Question about Mux4Way16 sel pin

Maesltrom
This post was updated on .
I'm in the same exercise now. I made in a paper the schematic of 4way mux and it worked but with 16 bits I'm facing a lot of problems trying to writing the hdl. I have no idea in how i will use the 16 bits chips with the 2 bits sel
Reply | Threaded
Open this post in threaded view
|

Re: Question about Mux4Way16 sel pin

cadet1620
Administrator
I can't tell what you are trying to do from this post. If you email your HDL I'll try to steer you in the right direction.


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

Re: Question about Mux4Way16 sel pin

Maesltrom
I can't think in a logic which i could join the two mux, because the sel is 2 bits and the other chips are 16