📄 freq.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity freq is
port(fsin:in std_logic;
clk:in std_logic;
dout:out std_logic_vector(15 downto 0));
end freq;
architecture testbody of freq is
signal data:std_logic_vector(15 downto 0);
begin
process(clk)
begin
if rising_edge(clk) then
dout<=data;
data<="0000000000000000";
end if;
end process;
process(fsin)
begin
if rising_edge(fsin) then
if data(11 downto 0)="100110011001" then data<=data+"011001100111";
elsif data(7 downto 0)="10011001" then data<=data+"01100111";
elsif data(3 downto 0)="1001" then data<=data+"0111";
else data<=data+'1';
end if;
end if;
end process;
end testbody;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -