Henry-Galleguillos

Sensores.vhd - Código principal

Oct 19th, 2020
1,083
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. -- Uncomment the following library declaration if using
  5. -- arithmetic functions with Signed or Unsigned values
  6. --use IEEE.NUMERIC_STD.ALL;
  7.  
  8. -- Uncomment the following library declaration if instantiating
  9. -- any Xilinx leaf cells in this code.
  10. --library UNISIM;
  11. --use UNISIM.VComponents.all;
  12.  
  13. entity Sensores is
  14.   port ( L: in std_logic;
  15.          R: in std_logic;
  16.          D: in std_logic;  
  17.          T: in std_logic;
  18.          L1: in std_logic;
  19.          L2: in std_logic;
  20.          C1: out std_logic;
  21.          C2: out std_logic;
  22.          C3: out std_logic;
  23.          C4: out std_logic);
  24. end Sensores;
  25.  
  26. architecture Behavioral of Sensores is
  27. begin
  28.         C1 <=R and D;
  29.         C2 <=L and T;
  30.         C3 <=L1 or L2;
  31.         C4 <=(D or T or L1 or L2) and (L nor R);
  32. end Behavioral;
  33.  
RAW Paste Data