Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Name : Md Ashraful Islam
- --Id : 180041122
- -sec :sec a
- LIBRARY ieee;
- USE ieee.std_logic_1164.ALL;
- ENTITY comparater IS
- PORT(a,b : IN std_logic_vector(7 downto 0);
- agb,aeb,alb :OUT std_logic);
- END comparater;
- ARCHITECCHTURE arc of comaparater IS
- SIGNAL result : std_logic_vector(2 down to 0);
- BEGIN
- Process(a,b)
- BEGIN IF a<b THEN
- result <="001";
- ELSIF a=b THEN
- result <="010";
- ELSIF a>b THEN
- result <="100";
- ELSE
- result <="000";
- END IF;
- agb<=result(2);
- aeb <= result(1);
- alb <=result(0);
- END process;
- END arc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement