Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library IEEE;
- use IEEE.std_logic_1164.all;
- use IEEE.numeric_std.all;
- architecture behavior of demux is
- begin
- process (SEL, IN1) is begin
- if(SEL = "00") then
- OUT1<=IN1;
- OUT2<="00000000";
- OUT3<="00000000";
- OUT4<="00000000";
- elsif(SEL = "01") then
- OUT2<=IN1;
- OUT1<="00000000";
- OUT3<="00000000";
- OUT4<="00000000";
- elsif(SEL = "10") then
- OUT3<=IN1;
- OUT2<="00000000";
- OUT1<="00000000";
- OUT4<="00000000";
- elsif(SEL = "11") then
- OUT4<=IN1;
- OUT2<="00000000";
- OUT3<="00000000";
- OUT1<="00000000";
- else
- OUT1<="00000000";
- OUT2<="00000000";
- OUT3<="00000000";
- OUT4<="00000000";
- end if;
- end process;
- end behavior;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement