logo资料库

EDA 检测序列 111.doc

第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
资料共3页,全文预览结束
《电子设计自动化》课程实验报告(七) 实验名称 实验时间 实 验 人 姓 名 学 号 序列检测器设计 实验地点 合 作 者 实验小组 第 组 实验性质 □验证性 □设计性 □综合性 □ 应用性 检测序列“111” 一.预习实验原理,画出序列检测器状态转换图。 d=’0’ rst=’1’ d=’1’ S0 q=’0’ d=’1’ d=’0’ S1 q=’0’ d=’0’ d=’0’ S3 q=’1’ d=’1’ d=’1’ S2 q=’0’ 二.根据状态转移图写出序列检测器的源程序。 library ieee; use ieee.std_logic_1164.all; entity xljc is
port(clk,rst:in std_logic; d:in std_logic; q:out std_logic); end xljc; architecture y of xljc is type st is (s0,s1,s2,s3); signal st0,st1:st; begin process(clk,rst) begin if rst='1' then st0<=s0; elsif clk='1'and clk'event then st0<=st1; end if; end process; process(st0,d) begin case st0 is when s0=>q<='0'; if d='1'then st1<=s1; else st1<=s0; end if; when s1=>q<='0'; if d='1'then st1<=s2; else st1<=s0; end if; when s2=>q<='0'; if d='1'then st1<=s3; else st1<=s0; end if; when s3=>q<='1'; if d='1'then st1<=s3; else st1<=s0; end if; end case; end process; end y; 三.在 QuartusII 上对该工程文件进行编辑、编译、综合、适配、仿真,给出其 输入输出信号的仿真波形图。
四.总结实验过程遇到的问题和解决方法,并写出经验和体会。 仿真时,总出不来效果 经老师检查发现,程序有错误 改正后,实验正常 以后编程要仔细认真
分享到:
收藏