library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity dientuaz is
port (
Q: in std_logic_vector(7 downto 0); --dau vao
z: out std_logic_vector(7 downto 0); --dau ra neu so chan
x: out std_logic_vector(7 downto 0); --dau ra neu so le
c: out std_logic_vector(7 downto 0); --dau ra neu > 100
v: out std_logic_vector(7 downto 0); --dau ra neu < 100
b: out std_logic_vector(7 downto 0) --dau ra neu = 100
);
end dientuaz;
architecture dientuaz of dientuaz is
begin
process(Q)
begin
if Q(0 downto 0)="0" then z<=Q;
elsif Q(0 downto 0)= "1" then x<=Q;
end if;
if Q>100 then c<=Q;
elsif Q<100 then v<=Q;
else b<=Q;
end if;
end process;
end dientuaz;
--- Model Sim Clock Q : 10,20, ... 80
0 nhận xét:
Đăng nhận xét