I am just learning vhdl, and am trying to use a 3-input nand gate. The code I have is:
G => (A nand B nand C) after 3 ns;
but this does not compile.
A three-input gate has eight possibilities (000, 001, 010, 011, 100, 101, 110, and 111) for input states. The number of possible input states is equal to two to the power of the number of inputs: This increase in the number of possible input states obviously allows for more complex gate behavior.
As with the OR function, the NOR function can also have any number of individual inputs and commercial available IC's are available in standard 2, 3, or 4 input types. If additional inputs are required, then the standard NOR gates can be cascaded together to provide more inputs for example.
As with the AND function seen previously, the NAND function can also have any number of individual inputs and commercial available NAND Gate IC's are available in standard 2, 3, or 4 input types.
Making Multi Input Gates Multi input gates can be made by joining gates of the same type with less inputs. The diagrams below shows how a three input AND gate and and a four input AND gate can be made out of two input AND gates.
I'm not an expert on VHDL but I think you have a couple of mistakes there - it should probably be:
G <= not (A and B and C) after 3 ns;
i.e. the assignment is in the wrong direction and I'm not sure that nand commutes in the way that you need it to for 3 inputs, hence the use of and
for the inputs and then not
to invert the output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With