Issue with the 8 Way Mux

6 messages
Open this post in threaded view
|

Issue with the 8 Way Mux

 I think I understand what needs to happen but it seems that sel[3] settings in the hardware simulator are backwards. I'm I wrong Or do I need to just flip all the select code? I put n0, n1 and n2 but for the third one it is flipping n0 and n1 one not n1 and n2 if that makes since with out posting any code.
Open this post in threaded view
|

Re: Issue with the 8 Way Mux

 Administrator It's important to understand that the convention for hardware bit numbering is that bit 0 is the least significant bit. If the 3-bit sel bus is carrying the number 4, then sel[2]=1, sel[1]=0, and sel[0]=0. This makes the relationship between bit number (n) and bit value (v) easy to remember: v=2n. In the early days of computing different manufacturers used different schemes, some 1-based, some left-to-right, and as you can imagine, it was rather confusing. --Mark [It is OK to post snippets of code, just don't post entire solutions.]
Open this post in threaded view
|

Re: Issue with the 8 Way Mux

 I used the built in Mux8Way16 and it worked like I thought it should. When sel[3] is set to 001 it selects B but for mine to select B I need it to be 100. What could cause it?
Open this post in threaded view
|

Re: Issue with the 8 Way Mux

 Administrator kingpinzs wrote I used the built in Mux8Way16 and it worked like I thought it should. When sel[3] is set to 001 it selects B but for mine to select B I need it to be 100. What could cause it? If you built your Mux8Way16 using Mux16 and/or Mux4Way16s, check which of the 3 sel signals go to which Muxes.  It might help to draw a sketch of how the a through h signals get routed through the muxes as sel takes on various values. Remember that sel[0] is the least significant bit. If you need further help feel free to send my code and I'll take a look at it (More|Reply to Author). --Mark