Nand
Nand
Nand
VHDL
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.NUMERIC_STD.ALL;
--library UNISIM;
--use UNISIM.VComponents.all;
entity nand3 is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c : out STD_LOGIC);
end nand3;
architecture Behavioral of nand3 is
begin
c<= a nand b;
end Behavioral;
DIAGRAM
1. Click on simulation and right click behaviour model source and select new source.
2. Select VHDL test bench, enter the file name with tbw extension (nand3_tbw) and click on
next, finish.
3. Enter the program with input conditions by taking 100 ns as the time period.
4. Comment the clock instructions in the whole program and save it.
5. Click on behavioural model and click check syntax.
6. Click Simulate the behavioural model and verify the output waveforms.
USE ieee.std_logic_1164.ALL;
--USE ieee.numeric_std.ALL;
ENTITY nand3_tbw IS
END nand3_tbw;
COMPONENT nand3
PORT(
a : IN std_logic;
b : IN std_logic;
c : OUT std_logic
);
END COMPONENT;
--Inputs
--Outputs
signal c : std_logic;
BEGIN
a => a,
b => b,
c => c
);
-- <clock>_process :process
-- begin
-- end process;
--
-- Stimulus process
stim_proc: process
begin
a<='0';
b<='0';
a<='0';
b<='1';
-- hold reset state for 100 ns.
a<='1';
b<='0';
a<='1';
b<='1';
wait;
end process;
END;
RESULT