Guest User

Untitled

a guest
Nov 22nd, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity Carry_Look_Ahead_adder is
  5. port (A0,A1,A2,A3,B0,B1,B2,B3,SEL : in std_logic;
  6. ZO,Z1,Z2,Z3: out std_logic);
  7. end Carry_Look_Ahead_adder;
  8.  
  9. architecture behavior of Carry_Look_Ahead_adder is
  10. begin
  11. if (SEL = '1') then
  12. Z0 <= A0 and B0;
  13. Z1 <= A1 and B1;
  14. Z2 <= A2 and B2;
  15. Z3 <= A3 and B3;
  16. end if ;
  17. if (SEL = '0') then
  18. Z0 <= A0 or B0;
  19. Z1 <= A1 or B1;
  20. Z2 <= A2 or B2;
  21. Z3 <= A3 or B3;
  22. end if ;
  23. end behavior;
Advertisement
Add Comment
Please, Sign In to add comment