Advertisement
Doda94

funkcijaLabos

Dec 5th, 2023
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.80 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 funkcijaLabos IS PORT(
  8.     a: IN std_logic;
  9.     b: IN std_logic;
  10.     c: IN std_logic;
  11.     f: OUT std_logic
  12. );
  13. END funkcijaLabos;
  14.  
  15. ARCHITECTURE arch OF funkcijaLabos IS
  16.     signal tmp1: std_logic;
  17.     signal tmp20, tmp21, tmp22: std_logic;
  18.     signal tmp3: std_logic_vector(0 to 7);
  19.  
  20. BEGIN
  21.     tmp1 <= '1';
  22.     tmp20 <= a;
  23.     tmp21 <= b;
  24.     tmp22 <= c;
  25.    
  26.     d1: entity work.dekoder38 port map(tmp1, tmp20, tmp21, tmp22, tmp3);
  27.    
  28.     f <= tmp3(2) or tmp3(3) or tmp3(5);
  29.  
  30. END arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement