📄 division4.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity division4 is
port(lin:in std_logic_vector(3 downto 0);
clock:in std_logic;
lout:out std_logic
);
end division4;
architecture beh of division4 is
begin
process(clock)
variable count:std_logic_vector(3 downto 0);
variable ll:std_logic;
begin
if clock'event and clock='0' then
if(count<lin) then
ll:='0';
count:=count+'1';
elsif(count>=lin) then
ll:='1';
count:="0000";
end if;
end if;
lout<=ll;
end process;
end beh;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -