📄 bps.vhdl
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity bps is
Port ( clk : in std_logic;
enclk : in std_logic;
clktr : out std_logic);
end bps;
architecture main of bps is
signal count : std_logic_vector(7 downto 0);
signal temp : std_logic :='0';
begin
process(enclk,clk)
begin
if enclk='0' then
count<="00000000";
temp<='0';
clktr<=not temp;
elsif clk='1' and clk'event then
if count="00000001" then
temp<= not temp;
clktr<=temp;
count<="00000000";
else
count<=count+1;
end if;
end if;
end process;
end main;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -