LIBRARY IEEE; --使用的库和程序包
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
entity VH8 is --VH8的外部说明
port(clk_in,control:in std_logic;
output:out std_logic_vector(8 downto 0));
end VH8 ;
architecture lsy of VH8 is
signal cnt:integer range 0 to 24999999;
signal clk_out,CON:std_logic;
signal P:std_logic_vector(8 downto 0);
begin
process(clk_in)
begin
if (clk_in'event and clk_in='1') then --分频器
if cnt=24999999 then
cnt<=0;
clk_out<= not clk_out;
else
cnt<=cnt+1;
end if;
end if;
end process;
process(clk_out)
BEGIN
IF (CONTROL'EVENT AND CONTROL='1') THEN
CON<=NOT CON;
ELSE CON <=CON;
END IF;
if (clk_out'event and clk_out='1') then --单点移动模式
if CON='0' then P<="000000000";
case P is
when"000000000"=>P<="010000000";
when"010000000"=>P<="001000000";
when"001000000"=>P<="000100000";
when"000100000"=>P<="000010000";
when"000010000"=>P<="000001000";
when"000001000"=>P<="000000100";
when"000000100"=>P<="000000010";
when"000000010"=>P<="000000001";
when"000000001"=>P<="100000010";
when"100000010"=>P<="100000100";
when"100000100"=>P<="100001000";
when"100001000"=>P<="100010000";
when"100010000"=>P<="100100000";
when"100100000"=>P<="101000000";
when"101000000"=>P<="110000000";
when"110000000"=>P<="000000000";
when others=>P<="000000000";
end case;
else
P<="000000000"; --幕布式
case P is
when"000000000"=>P<="000011000";
when"000011000"=>P<="000111100";
when"000111100"=>P<="001111110";
when"001111110"=>P<="011111111";
when"011111111"=>P<="101111110";
when"101111110"=>P<="100111100";
when"100111100"=>P<="100011000";
when"100011000"=>P<="000000000";
when others=>P<="000000000";
end case;
end if;
end if;
end process;
output<=P;
END lsy;
小波思基
- 粉丝: 89
- 资源: 1万+
最新资源
- 五一活动-“劳有所得 不止5折”-纯线上预充值+群裂变+秒杀(美妆行业活动SOP).xlsx
- 一图读懂品牌营销.png
- 8.18发烧购物节活动SOP - 电商日化行业+电商引流转化(5张子表全案).xlsx
- 【必存】22张活动执行全套表格.xlsx
- 9月开学季教育行业-社群活动增长+转化SOP-换季X开学季,福利不停,优惠不断.xlsx
- 520-大胆说爱,用力表白-线上线下-群裂变SOP.xlsx
- 520告白节 - 线上互动 - 所爱跨山海,隔空相拥群活动SOP.xlsx
- 618预售-预售嗨购618,超级福利抢先GO-权益包+阶梯群裂变裂变活动SOP.xlsx
- 618预售-线上任务裂变+直播-618超值福利·相约直播间活动策划SOP.xlsx
- 2020年双十一全网销售数据复盘分析报告-星图数据-202012.pdf
- 三维几何图形绘制工具软件-几何图霸
- 《私域流量爆款案例库3》电子版.pdf
- 《私域流量爆款案例库2》电子版.pdf
- 《私域流量爆款案例库》电子版.pdf
- 2021抖音时代详解品牌商家加速布局抖音的商业逻辑 .pdf
- 2021连锁品牌私域经营⽩⽪书-(压缩版).pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0