⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 divfre.vhd

📁 数字频率计~ VHDL 实现 可以实现频率的测量和现实的功能 8位
💻 VHD
字号:
library  ieee;
use ieee.std_logic_1164.all;

entity divfre is
   generic(rate: integer range 0 to 255 :=10);
   port(fin:in std_logic;
       fout:out std_logic);
end divfre;

architecture behav of divfre is
   signal cnt:integer range 0 to 255 :=0;
begin  
   p1:process(fin)
   begin 
      if fin'event and fin='1' then
         if cnt = rate then
            cnt <= 1;
         else
            cnt <= cnt + 1;
         end if;
      end if;
   end process;
   fout <= '1' when cnt = rate else '0';
end behav;

⌨️ 快捷键说明

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