- #1
EvLer
- 458
- 0
I have this ABEL file but can't figure out where 0, 1, 2, 3 come from in "when-then" statements...
"The following ABEL code demonstrates how to implement a combinatorial multiplexer.
" 4 to 1 multiplexer design
SEL0..SEL1 pin;
A,B,C,D pin;
MUX_OUT pin istype 'com';
SEL = [SEL1,SEL0];
equations
when SEL==0 then MUX_OUT = A;
else when SEL==1 then MUX_OUT = B;
else when SEL==2 then MUX_OUT = C;
else when SEL==3 then MUX_OUT = D;
thanks beforehand.
"The following ABEL code demonstrates how to implement a combinatorial multiplexer.
" 4 to 1 multiplexer design
SEL0..SEL1 pin;
A,B,C,D pin;
MUX_OUT pin istype 'com';
SEL = [SEL1,SEL0];
equations
when SEL==0 then MUX_OUT = A;
else when SEL==1 then MUX_OUT = B;
else when SEL==2 then MUX_OUT = C;
else when SEL==3 then MUX_OUT = D;
thanks beforehand.