Understanding Multi Sel pins

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

Understanding Multi Sel pins

Zakadion
I have worked through all of chapter one and have successfully completed all the chips for the chapter. I was able to understand the chips and how to make them up until I reached the Mux4Way16, Mux8Way16, DMux4Way, DMux8Way. These chips use multiple sel pins and even though I was able to make these chips by looking at questions here on the forum and trial and error. I still do not fully understand implementing multiple sel pins and know how to form these chips without guessing and trial and error. If someone could help me find a source or explain some things themselves to help me understand implementing and using the multi sel pins better I would greatly appreciate it. Thank You.
Reply | Threaded
Open this post in threaded view
|

Re: Understanding Multi Sel pins

cadet1620
Administrator
Here's the interface to the Mux8Way16:
CHIP Mux8Way16 {
    IN  a[16], b[16], c[16], d[16], e[16], f[16], g[16], h[16], sel[3];
    OUT out[16];
sel[3] is a 3-bit bus. A bus is a collection of signals that can be referred to as a group or as individual signals. Buses are documented in Appendix A.5.3. Using the bus notation is basically a shortcut that saves a lot of individual signal connections. The interface could have been:
    IN  a[16], b[16], c[16], d[16], e[16], f[16], g[16], h[16], sel0, sel1, sel2;
The multiplexor would have worked the same way, but would have required more connections when it was used.

Notice that in the truth tables for the Mux4Way16 and DMux4Way the the order of the select bus indices is decending from left to right. This is backwards from the software convention of array indexing.

When considered as binary numbers, the select values in the truth tables are the numbers 0, 1, 2, 3, corresponding to inputs A, B, C, D.

If you write out the truth table for the Mux8Way you can see the 2 Mux4Ways that can be used in its implementation and how the select bits need to be connected to them.

sel[2]   sel[1] sel[0] || out
          (=sel[0..1]) ||
        ---------------------
  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 |
        ---------------------
(Binary numbers are covered in Chapter 2 if you aren't already familiar with them.)

--Mark