Professional Documents
Culture Documents
determined from only the present combination of inputs and they have no
memory.
These circuits developed using AND, OR, NOT, NAND and NOR logic gates.
These logic gates are building blocks of combinational circuits. A
combinational circuit consists of input variables and output variables. Since
these circuits are not dependent upon previous input to generate any output,
so are combinational logic circuits. A combinational circuit can have an n
number of inputs and m number of outputs. In combinational circuits, the
output at any time is a direct function of the applied external inputs.
Q. Write VHDL code & design Circuit for the given equation “ (A or B) and (B or C) ”
-- Project Name:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity comb_entitty is
Port ( A : in STD_LOGIC;
B : in STD_LOGIC;
C : in STD_LOGIC;
end comb_entitty;
architecture Behavioral of comb_entitty is
begin
-- (A or B) and (B or C)
out1 <= A or B;
out2 <= B or C;
end Behavioral;
--------------------------------------------------------------------------------
-- Design Name:
--------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY comb_tb IS
END comb_tb;
PORT(
A : IN std_logic;
B : IN std_logic;
C : IN std_logic;
);
END COMPONENT;
--Inputs
--Outputs
BEGIN
A => A,
B => B,
C => C,
);
-- Stimulus process
stim_proc: process
begin
A <= '0';
B <= '0';
C <= '0';
A <= '0';
B <= '0';
C <= '1';
A <= '0';
B <= '1';
C <= '0';
A <= '0';
B <= '1';
C <= '1';
A <= '1';
B <= '0';
C <= '0';
A <= '1';
B <= '0';
C <= '1';
A <= '1';
B <= '1';
C <= '0';
wait for 1 ps;
A <= '1';
B <= '1';
C <= '1';
end process;
END;