Guest User

Untitled

a guest
Apr 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 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 primitiv IS PORT(
  8. a: IN STD_LOGIC_VECTOR(1 DOWNTO 0);
  9. b: IN STD_LOGIC_VECTOR(1 DOWNTO 0);
  10. r: OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
  11. cin: IN STD_LOGIC;
  12. cout: OUT STD_LOGIC;
  13. oper: IN STD_LOGIC
  14. );
  15. END primitiv;
  16.  
  17. ARCHITECTURE arch OF primitiv IS
  18.  
  19. signal I: std_logic_vector(3 downto 0);
  20.  
  21. BEGIN
  22.  
  23. komplement: ENTITY WORK.b1kompl port map(b(1 downto 0),i(1 downto 0));
  24. demultipleksor: ENTITY WORK.dmux port map(b(1 downto 0),i(1 downto 0),oper,i(3 downto 2));
  25. fulladder: ENTITY WORK.FA port map(a(1 downto 0),i(3 downto 2),cin,r(1 downto 0),cout );
  26. END arch;
Add Comment
Please, Sign In to add comment