EDA课程设计拔河游戏机(4)

2021-04-05 06:12

eda课程设计,游戏机!vhdl语言,Quartus II 7.0

architecture division_body of division is signal count1:integer range 0 to 4999; --signal count1:integer range 0 to 1; signal count2:integer range 0 to 124999; signal count3:integer range 0 to 49; --signal count3:integer range 0 to 1;

signal clk1,clk2,clk3:std_logic; begin

--得到100HZ的频率 process(clk) begin

if(clk'event and clk='1')then if(count1=4999)then count1<=0;

clk1<=not clk1; else count1<=count1+1; end if; end if; end process;

--得到4HZ的频率 process(clk) begin

if(clk'event and clk='1') then if(count2=124999) then count2<=0;

clk2<=not clk2; else count2<=count2+1; end if; end if; end process;

--得到1HZ的频率 process(clk1) begin

if(clk1'event and clk1='1') then if(count3=49) then count3<=0;

clk3<=not clk3; else count3<=count3+1;

end if;

图3 分频器


EDA课程设计拔河游戏机(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:第7章 面向对象程序设计

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: