QUOTE(charge-n-go @ Dec 3 2005, 09:59 AM)
lol, i was so blur to notice last nite

btw, i'm using a NAND b NAND l3 at 1st, but the NAND syntax doesnt allow me to do so, and the compiler asked me to put into bracket form.
thanx for your long feedback

anyway, i think my de morgan should be ok (pls refer to the diagram attached). I've tested with a set of input and it is identical to the original AND-OR. Maybe i should try your method as quoted above

Hmm... how about building custom gate with vhdl

maybe i'll js define NAND3 component with this function:
output <= NOT (x AND y AND z);
well, fishy, we not only celebrate here if u win, but oso in the pizza

Actually i meant the demorgan of A AND B AND S3; it should be A NAND S3 NOR B_not and not
A NAND B NAND S3
Err I am confused... according to your diagram S0-S3 is an input not the output of the AND3, anyway, from the circuit diagram i can see some possible optimization opportunity using Quin-McClusky.
Without using the 3-fanin logics, i believe that the equations i gave one of the most simplified. (of course O = NAND(NAND(A,B,S3),NAND(A,B',S2),NAND(A',B,S1),NAND(A',B',S0)) is even better than what anybody else here can give
I agree, a NAND3 macro will make your life a lot easier; (build the NAND4 and NOR3 and NOR4 while you are at it)
Btw, this is a mux right? why don't you use the case statement instead?
(have to look it up.. but it looks something like)
select := A & B; (concatenate the 2 bits)
CASE select IS
WHEN "00" => O <= S0;
WHEN "01" => O <= S1;
WHEN "10" => O <= S2;
WHEN "11" => O <= S3;
END CASE;
(Or are you trying to synthesize the codes?)
This post has been edited by martianunlimited: Dec 3 2005, 10:31 AM