Mux8Way16 Gate's Sel

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

Mux8Way16 Gate's Sel

erwinleonardy
Hi guys, I am attempting to implement Mux8Way16.

My question is, how do we get the first two bits of the sel and store it in another variable?

This is what I currently have:
Mux4Way16 (a=a, b=b, c=c, d=d, sel[0..1]=w, sel=w, out=x1);
This gives me an error of 'w has no source pin'

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Mux8Way16 Gate's Sel

cadet1620
Administrator
erwinleonardy wrote
My question is, how do we get the first two bits of the sel and store it in another variable?

This is what I currently have:
Mux4Way16 (a=a, b=b, c=c, d=d, sel[0..1]=w, sel=w, out=x1);
This gives me an error of 'w has no source pin'
You are most of the way there; sel[0..1] is what you want to create a 2-bit sub-bus from the INPUT sel bus. You just need to connect it directly to the Mux4Way16's sel pin. Remember that part pins are always on the left of the '=' and the wires/buses they connect to are always on the right.

Appendix A.5.3 is about sub-busing. The example shows some interesting features of sub-busing and is worth studying.

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

Re: Mux8Way16 Gate's Sel

erwinleonardy
Thanks Mark! It works like a charm now!