Advertisement
Doda94

dekoder416

Dec 4th, 2023
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 2.65 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. --(b) izgradnja dek 4/16 pomocu dek 1/2
  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 dek416e IS port(
  8. e: in std_logic;
  9. a: in std_logic_vector(0 to 3);
  10. y: out std_logic_vector(0 to 15) );
  11. END dek416e;
  12.  
  13. ARCHITECTURE arch OF dek416e IS
  14.     signal wire_00: std_logic;
  15.     signal wire_01: std_logic;
  16.     signal wire_02: std_logic;
  17.     signal wire_03: std_logic;
  18.     signal wire_04: std_logic;
  19.     signal wire_05: std_logic;
  20.     signal wire_06: std_logic;
  21.     signal wire_07: std_logic;
  22.     signal wire_08: std_logic;
  23.     signal wire_09: std_logic;
  24.     signal wire_10: std_logic;
  25.     signal wire_11: std_logic;
  26.     signal wire_12: std_logic;
  27.     signal wire_13: std_logic;
  28.                                                            
  29.     signal izl_00: std_logic;
  30.     signal izl_01: std_logic;
  31.     signal izl_02: std_logic;
  32.     signal izl_03: std_logic;
  33.     signal izl_04: std_logic;
  34.     signal izl_05: std_logic;
  35.     signal izl_06: std_logic;
  36.     signal izl_07: std_logic;
  37.     signal izl_08: std_logic;
  38.     signal izl_09: std_logic;
  39.     signal izl_10: std_logic;
  40.     signal izl_11: std_logic;
  41.     signal izl_12: std_logic;
  42.     signal izl_13: std_logic;
  43.     signal izl_14: std_logic;
  44.     signal izl_15: std_logic;
  45.                                                                    
  46.     BEGIN
  47.     c1: entity work.dekoder12 port map (e, a(0), wire_00, wire_01 );
  48.            
  49.     c2: entity work.dekoder12 port map (wire_00, a(1), wire_02, wire_03 );
  50.     c3: entity work.dekoder12 port map (wire_01, a(1), wire_04, wire_05 );
  51.            
  52.     c4: entity work.dekoder12 port map (wire_02, a(2), wire_06, wire_07 );
  53.     c5: entity work.dekoder12 port map (wire_03, a(2), wire_08, wire_09 );
  54.     c6: entity work.dekoder12 port map (wire_04, a(2), wire_10, wire_11 );
  55.     c7: entity work.dekoder12 port map (wire_05, a(2), wire_12, wire_13 ); 
  56.                    
  57.     c8: entity work.dekoder12 port map (wire_06, a(3),izl_00, izl_01 );
  58.     c9: entity work.dekoder12 port map (wire_07, a(3),izl_02, izl_03 );
  59.     c10: entity work.dekoder12 port map (wire_08, a(3), izl_04, izl_05);
  60.     c11: entity work.dekoder12 port map (wire_09, a(3), izl_06, izl_07);
  61.     c12: entity work.dekoder12 port map (wire_10, a(3), izl_08, izl_09);
  62.     c13: entity work.dekoder12 port map (wire_11, a(3), izl_10, izl_11);
  63.     c14: entity work.dekoder12 port map (wire_12, a(3), izl_12, izl_13);
  64.     c15: entity work.dekoder12 port map (wire_13, a(3), izl_14, izl_15);
  65.                                    
  66.     y <= izl_00 & izl_01 & izl_02 & izl_03 & izl_04 & izl_05 & izl_06 & izl_07 & izl_08 & izl_09 & izl_10 & izl_11 & izl_12 & izl_13 & izl_14 & izl_15;
  67.            
  68. END arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement