Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. ENTITY mux41n IS
  2. GENERIC (n: INTEGER:=4);
  3. PORT (a : IN BIT_VECTOR (N-1 downto 0);
  4. b : IN BIT_VECTOR (N-1 downto 0);
  5. control1 : IN BIT_VECTOR (1 downto 0);
  6. s: OUT BIT;
  7. END mux41n;
  8.  
  9. ARCHITECTURE estructural OF mux41n IS
  10. COMPONENT mux21
  11.  
  12. PORT (e1, e2, c: IN BIT; sal: OUT BIT);
  13.  
  14. END COMPONENT;
  15.  
  16. signal salmux1 : bit_vector(N-1 downto 0);
  17.  
  18. BEGIN
  19.  
  20.  
  21. G : for i in 0 to N-1 GENERATE
  22. MULt1 : mux21 port map (a(n-i),b(n-i),control1,salmux1);
  23. END GENERATE;
  24.  
  25. END estructural;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement