Mux4Way16

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

Mux4Way16

mor3dr3ad
Hey,

seems i have a knot in my brain. I am trying to implement the Mux4Way16. In my head it only makes sense to use the second bit of the sel for choosing within the groups. The first bit (so sel[0]) needs to be used to decide between the two groups.

So this is my thinking:

        Mux16(a=a, b=b, sel=[1], out=Muxab) \\First select the winner of the first group using the second bit
        Mux16(a=c, b=d, sel=[1], out=Muxcd) \\Then select the winner of the second group using the second bit
        Mux16(a=Muxab, b=Muxcd, sel=[0], out=out) \\ Feed in winners of each group into the 'final decider' and use the first bit to decide

However, this fails and the opposite solution works. I just cannot merge this with my logic. Can someone help me out?
Reply | Threaded
Open this post in threaded view
|

Re: Mux4Way16

mor3dr3ad
Okay, it turns out I am an idiot. I have realized that the Prof said at some point to read the inputs from right to left...
Reply | Threaded
Open this post in threaded view
|

Re: Mux4Way16

WBahn
Administrator
Glad you got it figured out.

For the most part, you can order signals in either direction, as long as you are consistent in everything you do. The big exception will be in the instruction decoding, where you have to be sure to pull the individual signals out in the same order described by the spec.
Reply | Threaded
Open this post in threaded view
|

Re: Mux4Way16

JamieO
In reply to this post by mor3dr3ad
My god - I'm so glad I found this post. I'm also an idiot and this was driving me insane!! Thanks for coming back to reply to yourself and save me 3 years later!!
Reply | Threaded
Open this post in threaded view
|

Re: Mux4Way16

mor3dr3ad
really happy this helped someone out - really frustrating if you have this kind of knot in your brean