findmax.vhd.bak
来自「2008年北京市大学生电子设计竞赛程序源代码[测频率」· BAK 代码 · 共 40 行
BAK
40 行
-- Zhen --
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity findmax is
port(clk : in std_logic;
feqin : in std_logic;
datain : in std_logic_vector(7 downto 0);
dataout : out std_logic_vector(7 downto 0)
);
end;
architecture behav of findmax is
signal outbuff : std_logic_vector(7 downto 0);
begin
process(clk)
begin
if clk 'event and clk ='1' then
if feqin = '0' then outbuff <= "00000000";
else
if datain > outbuff then outbuff <= datain; end if;
end if;
end if;
end process;
process(feqin)
begin
if feqin 'event and feqin ='0' then
dataout <= outbuff;
end if;
end process;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?