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