count60s.vhd

来自「大家一定要看 哦 程序在与多看多练 我找了好久才找到呢」· VHDL 代码 · 共 41 行

VHD
41
字号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
--*************************
entity count60s is
port(
    clk:in std_logic;
    resets:in std_logic;
    rcos:out std_logic;
   qh,ql:buffer std_logic_vector(3 downto 0)
   );
end count60s;
--******************************
architecture datablow of count60s is
begin
process(clk,resets)
begin
wait until(clk'event and clk='1');
if resets='1'or (qh="0101"and ql="1001")then
qh<="0000";
ql<="0000";
rcos<='1';
else
if ql="1001"then
   ql<="0000";
qh<=qh+1;
if qh="0101"then
qh<="0000";
else
qh<=qh+1;
end if;
else
ql<=ql+1;
end if;
rcos<='0';
end if;
end process;
end datablow;

⌨️ 快捷键说明

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