0% found this document useful (0 votes)
0 views

Combinational Logic in VHDL

Uploaded by

Edanur Sonumut
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Combinational Logic in VHDL

Uploaded by

Edanur Sonumut
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Combinational Logic in VHDL

Designing Combinational Logic in VHDL

-------------------------------------

- Combinational logic has no memory; output depends only on input.

- Examples: Adders, multiplexers, and decoders.

Example: 4-to-1 Multiplexer

---------------------------

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

entity mux4to1 is

Port (

a, b, c, d : in STD_LOGIC;

sel : in STD_LOGIC_VECTOR(1 downto 0);

y : out STD_LOGIC

);

end mux4to1;

architecture Behavioral of mux4to1 is

begin

process(a, b, c, d, sel)

begin

case sel is

when "00" => y <= a;


when "01" => y <= b;

when "10" => y <= c;

when "11" => y <= d;

when others => y <= '0';

end case;

end process;

end Behavioral;

You might also like