frequency.vhd

来自「显示频率测量」· VHDL 代码 · 共 27 行

VHD
27
字号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity  frequency is 
  prot (treset:in std_logic;--异步复位端口
		tclk:in std_logic;--时钟输入	
		tsig:in std_logic;--信号输入
		tkeep1:out std_logic_vector(3 downto 0);--j记数值个位
		tkeep2:out std_logic_vector(3 downto 0);--记数值十位
		tkeep3:out std_logic_vector(3 downto 0));--记数值百位
end entity frequency;

archtecture one of frequency  is 
signal tcou1:std_logic_vetor(3 downto 0); --记数个位
signal tcou2:std_logic_vetor(3 downto 0);--十位
signal tcou3:std_logic_vetor(3 downto 0);--百位
 begin
  ctrcou:process(treset,tclk) --控制记数功能的进程
   begin 
	if treset=1 then 
		tcou1<="000";tcou2<="000";tcou3<="000";	
	else
	  if tclk'event and tclk='1' then 
		if tsig='1' then --时基信号高电平为判断条件
             --有

⌨️ 快捷键说明

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