Advertisement
Guest User

comp

a guest
May 24th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.63 KB | None | 0 0
  1. entity comparator_pe_1_bit is
  2.     port(A,B: in BIT;
  3.     X,Y,Z: out BIT);
  4. end comparator_pe_1_bit;
  5.  
  6. architecture flux_de_date of comparator_pe_1_bit is
  7. begin
  8.     Y<=A xnor B;           -- A = B
  9.     X<=(not (A))and B;     -- A < B
  10.     Z<=(not(B))and A;      -- A > B
  11. end flux_de_date;
  12.  
  13. entity modul_comp is
  14. end modul_comp;
  15. architecture arh_mod of modul_comp is  
  16. component comparator_pe_1_bit
  17.     port(A,B: in BIT;
  18.     X,Y,Z: out BIT);
  19. end component comparator_pe_1_bit;
  20. signal A,B,X,Y,Z: BIT;
  21. begin
  22.     UST: comparator_pe_1_bit port map(A,B,X,Y,Z);
  23.     A<='0', '1' after 20 ns;
  24.     B<='0', '1' after 10 ns, '0' after 20 ns, '1' after 30 ns;
  25. end arh_mod;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement