焊接完板子也有段时间了,一直在搞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;
我要赚赏金打赏帖 |
|
|---|---|
| STM32C0116DK开发探索记(3)被打赏¥30元 | |
| STM32C0116DK开发探索记(2)被打赏¥24元 | |
| STM32C0116DK开发探索记(1)被打赏¥29元 | |
| 谨防极海G32M3101电机评估板易跌落的陷阱被打赏¥24元 | |
| 【全网首拆】M5STACK ATOM系列开发板拆解 / AtomS3R-CAM摄像头更换方法(提高10倍像素)被打赏¥26元 | |
| 基于MCP23S17的输入输出功能模块控制被打赏¥20元 | |
| 【S32K3XX】SPD 软件包使用Link文件修改被打赏¥22元 | |
| Switch-Case局部变量定义问题被打赏¥23元 | |
| 基于米尔TIAM62L开发板的串口通信及应用被打赏¥20元 | |
| PCF8574功能模块及其使用被打赏¥20元 | |
我要赚赏金
