焊接完板子也有段时间了,一直在搞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;
打赏帖 | |
---|---|
汽车电子中巡航控制系统的使用被打赏10分 | |
分享汽车电子中巡航控制系统知识被打赏10分 | |
分享安全气囊系统的检修注意事项被打赏10分 | |
分享电子控制安全气囊计算机知识点被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【OZONE】使用方法总结被打赏20分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K314】芯片启动流程分析被打赏40分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K146】S32DS RTD 驱动环境搭建被打赏12分 | |
【分享开发笔记,赚取电动螺丝刀】【IAR】libc标注库time相关库函数使用被打赏23分 | |
LP‑MSPM0L1306开发版试用结果被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【LP-MSPM0L1306】适配 RT-Thread Nano被打赏23分 |