第一范文网 - 专业文章范例文档资料分享平台

排队电路的EDA课程设计报告 (4)

来源:用户分享 时间:2020-06-22 本文由拧巴小姐 分享 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

华东交通大学

elsif newcustom_hh<\ then newcustom_hh<=newcustom_hh+1; newcustom_hl<=\

elsif (newcustom_ll<=\ newcustom_hl<=\ waitcustom_ll<=waitcustom_ll+1; If waitcustom_ll<\ then

waitcustom_ll<=waitcustom_ll+1;newcustom_ll<=\ newcustom_lh<=\ newcustom_hh<=\

elsif waitcustom_lh<\ then

waitcustom_lh<=waitcustom_lh+1; waitcustom_ll<=\ elsif waitcustom_hl<\ then

waitcustom_hl<=waitcustom_hl+1; waitcustom_lh<=\ elsif waitcustom_hh<\ then

waitcustom_hh<=waitcustom_hh+1; waitcustom_hl<=\

elsif(waitcustom_ll<=\ waitcustom_hl<=\ newcustom_ll<=\

第 14 页 共 22 页

华东交通大学

newcustom_hl<=\ waitcustom_ll<=\ waitcustom_hl<=\ end if; end if; end if; end process p1;

p2:process(rst,clk,waiter) begin

if rst='0' then curcustom_ll<=\ curcustom_hl<=\ Elsif clk'event and clk='1' then if waiter<='0' then

curcustom_ll<=\ curcustom_hl<=\ elsif waiter<='1' then ——柜台可以为客人服务; if curcustom_ll<\ then

curcustom_ll<=curcustom_ll+1; elsif curcustom_lh<\

curcustom_lh<=curcustom_lh+1; curcustom_ll<=\ elsif curcustom_hl<\

第 15 页 共 22 页

华东交通大学

curcustom_hl<=curcustom_hl+1; curcustom_lh<=\

elsif curcustom_hh<\——顾客的编号都小 于9999,开始加1; curcustom_hh<=curcustom_hh+1; curcustom_hl<=\

Elsif (curcustom_ll<=\ andcurcustom_hl<=\ curcustom_ll<=\ curcustom_hl<=\ end if;——当前顾客的编号都大于9999;全都至为0000; end if; end if; end process p2; p3:process(rst,tmpclk) begin

if rst='0' then cnt4<=0; ——当复位rst=0时,cnt4=0; elsif tmpclk'event and tmpclk='1' then ——时钟上升沿; if cnt4<8 then

cnt4<=cnt4+1; ——cnt4<8,cnt4的值为cnt4加1,一直加到7; Else cnt4<=0; end if; end if;

第 16 页 共 22 页

华东交通大学

end process p3; free_counter:block

signal q:std_logic_vector(24 downto 0); begin

p4:process(clk,rst) begin

if rst='0' then q<=(OTHERS=>'0'); elsif clk'event and clk='1' then q<=q+1; end if; end process p4; selout<=sel;

sel<=\ ——倒数第一个数码管cnt4=0; \ ——倒数第二个数码管cnt4=1; \ ——倒数第三个数码管cnt4=2; \ ——倒数第四个数码管cnt4=3; \ ——第四个数码管cnt4=4; \ ——第三个数码管cnt4=5; \ ——第二个数码管cnt4=6 \ ——第一个数码管cnt4=7; \end block free_counter; P5:process(rst,clk)

第 17 页 共 22 页

华东交通大学

begin

If rst='0' then cnt10<=\ elsif clk'event and clk='1' then if cnt10<3 then cnt10<=cnt10+1; Else cnt10<=\ end if; end if; end process p5;

tmpclk<=cnt10(1); ——tmpclk是clk的二分频; P6:process(rst,clk,waiter) begin

if rst='0' then ——复位为零,其他均设为零 ; length_ll<=\ length_hl<=\ Elsif clk'event and clk='1' then ——上升沿到时,队长开始计算; if waiter<='0' then length_ll<=\ length_hl<=\ elsif waiter<='1' then ——柜台已经服务完上一任顾客,有空位时,四

位分别相减;

length_ll<=newcustom_ll-curcustom_ll; length_lh<=newcustom_lh-curcustom_lh; length_hl<=newcustom_hl-curcustom_hl; length_hh<=newcustom_hh-curcustom_hh;

第 18 页 共 22 页

搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新幼儿教育排队电路的EDA课程设计报告 (4)全文阅读和word下载服务。

排队电路的EDA课程设计报告 (4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/wenku/1094876.html(转载请注明文章来源)
热门推荐
Copyright © 2018-2022 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top