焊接完板子也有段时间了,一直在搞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;
我要赚赏金打赏帖 |
|
|---|---|
| 基于ArduinoUNO开发板的AT24C02读写测试被打赏¥16元 | |
| TCS3472S传感器及其色彩检测被打赏¥19元 | |
| 【S32DS】S32K3 RTD7.0.1 HSE 组件配置报错问题解决被打赏¥27元 | |
| 【S32K3XX】MCME 启动 CORE1被打赏¥23元 | |
| AG32VH407下温度大气压传感器及其检测被打赏¥20元 | |
| AG32VH407下光照强度传感器BH1750及其检测被打赏¥22元 | |
| AT32VH407下使用温湿度传感器DHT22进行检测被打赏¥20元 | |
| DIY一个婴儿澡盆温度计被打赏¥34元 | |
| 【FreeRtos】FreeRtos+MPU region 配置规则被打赏¥23元 | |
| 【分享开发笔记,赚取电动螺丝刀】三分钟快速上手驱动墨水屏(ArduinoIDE)被打赏¥28元 | |
我要赚赏金
