aslant.vhd
来自「采用VHDL语言写了一个函数发生器的程序。内含有各个模块」· VHDL 代码 · 共 36 行
VHD
36 行
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity aslant is
Port (clock,reset :in std_logic;
dd:out std_logic_vector(8 downto 0));
end aslant;
architecture Behavioral of aslant is
SIGNAL Qt : INTEGER RANGE 200 DOWNTO -1 ;
begin
PROCESS(clock,Qt)
BEGIN
if reset='0' then
Qt<=0;
elsif rising_edge(clock) then
Qt<=Qt+1;
if Qt>180 then Qt<=0;
end if;
end if;
END PROCESS;
dd<=conv_std_logic_vector(Qt,9);
end Behavioral;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?