焊接完板子也有段时间了,一直在搞ARM的设计没的时间来学习。今天有时间做了个流水灯顺便测试板子。
--库函数
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
--实体
entity led is
port(clk : in std_logic;
led : out std_logic_vector(10 downto 0));
end led;
--结构体描述
architecture behave of led is
signal cnt:std_logic_vector (23 downto 0);
signal data :std_logic_vector(10 downto 0):="11111111110";
begin
process(clk)
begin
if clk'event and clk='1'then
cnt<=cnt+1;
if cnt="111111111111111111111111" then
data<=std_logic_vector(unsigned(data)rol 1);
cnt<="000000000000000000000000";
end if;
end if;
led<=data;
end process ;
end behave;
打赏帖 | |
---|---|
嵌入式LinuxC语言程序调试和宏使用技巧被打赏50分 | |
让代码中包含最新的编译时间信息被打赏50分 | |
rtthread硬件加密--2crc加密分析被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】mcxa156使用低功耗定时器适配硬件RTC框架被打赏26分 | |
【STM32F769】AI之与本地deepseek对接被打赏50分 | |
Buck电路工作在CCM模式下电感电流的计算公式是什么?被打赏5分 | |
buck电路工作原理被打赏5分 | |
基于MSPM0L1306的MODBUS-RTU协议通讯实验被打赏100分 | |
我想要一部加热台+多合一调试工具被打赏18分 | |
每周了解几个硬件知识+485硬件知识分享被打赏10分 |