计算机组成原理课程设计报告-基于vhdl的楼梯照明灯的控制的实现内容摘要:
0,lamp :out std_logic)。 end。 architecture fsm_arch of fsm is type zt_type is (s1,s2,s3,s4,s5,s6,s7,s8,s9)。 signal zt_now, zt_next : zt_type。 begin n1:process(clk) 状态寄存进程 begin if clk39。 event and clk=39。 139。 then zt_now=zt_next。 end if。 end process。 n2:process(key,zt_now) 次态逻辑和梅里输出 begin case zt_now is when s1= if key=39。 139。 then lamp=39。 139。 st240=39。 139。 st2=39。 039。 zt_next=s2。 elsif key=39。 039。 then lamp=39。 039。 st240=39。 039。 st2=39。 039。 zt_next=s1。 end if。 when s2= if key=39。 039。 then lamp=39。 139。 st240=39。 139。 st2=39。 139。 zt_next=s3。 elsif key=39。 139。 then lamp=39。 139。 st240=39。 139。 st2=39。 039。 zt_next=s2。 end if。 when s3= if key=39。 139。 then lamp=39。 139。 st240=39。 139。 st2=39。 039。 zt_next=s7。 elsif (key=39。 039。 ) and (td2=39。 139。 ) then lamp=39。 139。 st240=39。 139。 st2=39。 139。 zt_next=s4。 else lamp=39。 139。 st240=39。 139。 st2=39。 139。 zt_next=s3。 基于 VHDL 的楼梯照明灯的控制的实现 第 7 页 共 18 页 end if。 when s4= if key=39。 139。 then lamp=39。 139。 st240=39。 139。 st2=39。 139。 zt_next=s5。 elsif (key=39。 039。 ) and (td240=39。 139。 ) then lamp=39。 039。 st240=39。 139。 st2=39。 039。 zt_next=s1。 else lamp=39。 139。 st240=39。 139。 st2=39。 039。 zt_next=s4。 end if。 when s5= if (key=39。 139。 ) and (td2=39。 139。 ) then lamp=39。 039。 st240=39。 039。 st2=39。 139。 zt_next=s6。 elsif key=39。 039。 then lamp=39。 139。 st240=39。 139。 st2=39。 039。 zt_next=s4。 else lamp=39。 139。 st240=39。 139。 st2=39。 139。 zt_next=s5。 end if。 when s6= if key=39。 039。 then lamp=39。 039。 st240=39。 039。 st2=39。 039。 zt_next=s1。 else lamp=39。 039。 st240=39。 039。 st2=39。 039。 zt_next=s6。 end if。 when s7= if key=39。 139。 then lamp=39。 139。 st240=39。 039。 st2=39。 139。 zt_next=s8。 else lamp=39。 139。 st240=39。 039。 st2=39。 039。 zt_next=s7。 end if。 when s8= if (key=39。 139。 ) and (td2=39。 139。 ) then lamp=39。 039。 st240=39。 039。 st2=39。 139。 zt_next=s9。 elsif (key=39。 039。 ) then lamp=39。 139。 st240=39。 139。计算机组成原理课程设计报告-基于vhdl的楼梯照明灯的控制的实现
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。