frequency_control.vhdl
来自「相位差测试」· VHDL 代码 · 共 27 行
VHDL
27 行
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity control is
Port ( Bsignal : in std_logic;
Gate : out std_logic;
Reset : out std_logic;
latch : out std_logic);
end control;
architecture Behavioral of control is
signal G1,G2: std_logic:='0';
begin
process(Bsignal,G1)
begin
if rising_edge(Bsignal) then
G1<=not G1;
end if;
if falling_edge(bsignal) then
G2<=not G1;
end if;
end process;
gate<=G1;
latch<=G2;
reset<=(not bsignal)and(not G1)and (G2);
end Behavioral;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?