Advertisement
Doda94

dekoder24

Dec 5th, 2023
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.79 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 dekoder24 IS PORT(
  8.     e: IN std_logic;
  9.     a0, a1: IN std_logic;
  10.     y0, y1, y2, y3: OUT std_logic
  11. );
  12. END dekoder24;
  13.  
  14. ARCHITECTURE arch OF dekoder24 IS
  15.     signal c1,c2: std_logic;
  16.     signal o1,o2,o3,o4: std_logic;
  17. BEGIN
  18.     d1: entity work.dekoder12 port map (e, a1, c1, c2);
  19.    
  20.     d2: entity work.dekoder12 port map (c1, a0, o1, o2);
  21.     d3: entity work.dekoder12 port map (c2, a0, o3, o4);
  22.    
  23.     y0 <= o1;
  24.     y1 <= o2;
  25.     y2 <= o3;
  26.     y3 <= o4;
  27.  
  28. END arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement