mux8way16

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

mux8way16

daveduggan
I have two mux4way16's wired to a mux16 then out.

But I am confused on how to wire the sel wires.

the mux8way16 takes a sel[3]. which means index 0,1,2

But the mux4way16 takes a self[2]. means index 0,1

then the mux16 just takes sel.

uuugg - this is very confusing to me

help please

May I post my code?
Reply | Threaded
Open this post in threaded view
|

Re: mux8way16

cadet1620
Administrator
It sounds like you are on the right track.  Consider the truth table:
    sel
[2] [1] [0] | out
 0   0   0  |  a
 0   0   1  |  b
 0   1   0  |  c
 0   1   1  |  d
 1   0   0  |  e
 1   0   1  |  f
 1   1   0  |  g
 1   1   1  |  h
One of the 4ways selects a, b, c or d based on sel[0] and sel[1]. Use the sub-bus syntax (Appendix A.5.3) to select those 2 sel bits and connect them to the 4Way's 2-bit sel.

If you want to, you may email me your hdl.

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

Re: mux8way16

daveduggan
I think it is the sel[] syntax that is hanging me up on this one.

mux8way16 has a 3 bit sel

but the mux4way16 only has a 2 bit sel and the mux16 only has a single bit sel

selecting a,b,c,d only requires 2 bit

e,f,c,d also only require two bit sell because both utilize the mux4way16.

However; in order to select the correct mux4way16 we need a mux16 which only requires a single bit for selecting or choosing between the two inputs from each mux4way16. And this selection chooses between a,bc,d or e,f,g,h.

the truth table shows 3 sel bits (total) required to choose a,b,c,d,e,f,g or h

But to select between the two mux4way16's we would need to use the most significant bit from the truth table.

I am not sure how to do this.

I am struggling on this one.

help please
 
Reply | Threaded
Open this post in threaded view
|

Re: mux8way16

cadet1620
Administrator
I think it is the sel[] syntax that is hanging me up on this one.

mux8way16 has a 3 bit sel

but the mux4way16 only has a 2 bit sel and the mux16 only has a single bit sel
See appendix A.5.3 for subbus syntax.

Basically, to connect only part of a bus you want something like
    twoBitBus = wideBus[3..4]
which would connect only bits 3 and 4 of wideBus to twoBitBus.

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

Re: mux8way16

daveduggan
In reply to this post by daveduggan
I got it finally -

that was the tufts one so far for me

I was hung up on these syntax

thank you for help cadet1620
Reply | Threaded
Open this post in threaded view
|

Re: mux8way16

Bambi56
In reply to this post by cadet1620
Thanks, that helped a lot, given that I was stuck on MUX8WAY16 with exactly the same problem.