Advertisement
Doda94

dekoder38

Dec 5th, 2023
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.91 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. -- warning: this file will not be saved if:
  5. --     * following entity block contains any syntactic errors (e.g. port list isn't separated with ; character)
  6. --     * following entity name and current file name differ (e.g. if file is named mux41 then entity must also be named mux41 and vice versa)
  7. ENTITY dekoder38 IS PORT(
  8.     e: IN std_logic;
  9.     a0, a1, a2: IN std_logic;
  10.     y: OUT std_logic_vector(0 to 7)
  11. );
  12. END dekoder38;
  13.  
  14. ARCHITECTURE arch OF dekoder38 IS
  15.     signal c1,c2,c3,c4: std_logic;
  16.     signal o1,o2,o3,o4,o5,o6,o7,o8: std_logic;
  17. BEGIN
  18.     d1: entity work.dekoder24 port map (e,a2,a1,c1,c2,c3,c4);
  19.    
  20.     d2: entity work.dekoder12 port map (c1,a0,o1,o2);
  21.     d3: entity work.dekoder12 port map (c2,a0,o3,o4);
  22.     d4: entity work.dekoder12 port map (c3,a0,o5,o6);
  23.     d5: entity work.dekoder12 port map (c4,a0,o7,o8);
  24.    
  25.     y <= o1 & o2 & o3 & o4 & o5 & o6 & o7 & o8;
  26.    
  27. END arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement