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

📄 source1.vhd

📁 大屏幕led点阵显示的驱动时序。 使用vhdl语言描述。其中rom文件可以使用lpm_megcore自动生成。
💻 VHD
字号:
--Source1 地址寻址信号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity source1 is
port(clk:in std_logic;
     outer:out std_logic_vector(7 downto 0));
end source1;
architecture  behave of source1 is
signal temp1:std_logic_vector(3 downto 0);--temp1为地址低4位 代表一帧数据
signal temp2:std_logic_vector(3 downto 0);--temp1为地址高4位 代表帧数
signal time:integer range 0 to 15;--time为帧循环次数计数 每帧扫16遍
begin 
  process(clk)
  begin  
       if(clk'event and clk='1')then 
           if temp1="1111" then
               if time<15  then time<=time+1;
               else time<=0;temp2<=temp2+'1';
               end if;
           end if;
           temp1<=temp1+'1'; --转为下帧数据          
       end if;      
  end  process;  
outer<=temp2 & temp1;  
end behave;

⌨️ 快捷键说明

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