temp.vhd

来自「EAS 的接收程序接收来自发射板的RF信号」· VHDL 代码 · 共 84 行

VHD
84
字号
--屏蔽躁声信号
library IEEE; 
use IEEE.STD_LOGIC_1164.ALL; 
use IEEE.STD_LOGIC_ARITH.ALL; 
use IEEE.STD_LOGIC_UNSIGNED.ALL; 
entity temp is 
 Port (temp_1 :in std_logic;
       --temp_2 :in std_logic;
      -- temp_3 :in std_logic;
       judge1:out std_logic;
      -- judge2:out std_logic;
      -- judge3:out std_logic
     );
end temp;

architecture behavioral of temp is
begin
process(temp_1)--,temp_2,temp_3
variable count1:std_logic_vector(1 downto 0):="00";
--variable count2:std_logic_vector(1 downto 0):="00";
--variable count3:std_logic_vector(1 downto 0):="00";

begin
--if judge='1' then
--WAIT UNTIL a = '1';
if rising_edge(temp_1) then
if count1="01" then
count1:="00";
else
count1:=count1+1;
end if;
end if;

--if rising_edge(temp_2) then
--if count2="01"then
--count2:="00";
--else
--count2:=count2+1;
--end if;
--end if;

--if rising_edge(temp_3) then
--if count3="01"then
--count3:="00";
--else
--count3:=count3+1;
--end if;
--end if;

--if judge='1' then
--if falling_edge(temp_1) then--then
--judge<='1';
--end if;
--end if;
--if count1="01" then
--judge1<='1';
--elsif count1="00" then
--judge1<='0';
--else
--NULL;
--end if;

--if count2="01" then
--judge2<='1';

--elsif count2="00" then
--judge2<='0';
--else
--NULL;
--end if;

--if count3="01" then
--judge3<='1';
--elsif count3="00" then
---judge3<='0';
--else
--NULL;
-- end if;


end process;
end behavioral;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?