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

📄 sepratef.vhd

📁 一个使用VHDL编写的音乐芯片的程序有很好的使用价值
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
entity sepratef is
    port(clk,sw:    in std_logic;  --1000hz
         clk125f:out std_logic);--8 or 4hz putout
end;

architecture behav of sepratef is 
    signal clk8hz:std_logic;
   
begin
  divideclk:process(clk,sw)
     variable ff, count125: integer range 0 to 255;
    begin

     clk8hz<='0'; clk125f<='0';
        if sw='0' then ff:=125;else ff:=250;
        end if;
     if count125>ff then clk8hz<='1'; clk125f<='1'; count125:=0;
     elsif clk'event and clk='1' then count125:=count125+1;
     end if;
  end process;
end;

⌨️ 快捷键说明

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