EDA技术(机械)实验报告--十三进制计数器(状态机方法).docx
实验报告(计算机类)学生姓名学号成绩学生所在学院年级/专业/班课程名称EDA技术(机械)课程代码实验项目名称十三进制计数器(状态机方法)项目代码指导教师项目学分开课学院及实验室:实验时间:一、实验目的年月日1 .了解VHDL语言编程方法,学会熟练运用quartus软件2 .了解如何使用状态机方法设计十三进制计数器二、内容与设计思想1.用状态机给出的状态转换图2.十三进制计数器引脚图三、使用环境WinXP或Win7、quartusii编程环境四、核心代码及调试过程状态机方法设计十三进制计数器Iibraryieee;useieee.std_Iogic_1164.all;useieee.std_Iogic_arith.all;useieee.std_Iogic_unsigned.all;entityh31isport(cp:instd_logic;clocksignaIq:outstd_Iogic_vector(3downtoO);stateoutputop:outstd_logiccarryoutput);endh31;architecturert1ofh31istypestateis(s,s1,s2,s3,s4,s5,s6,s7,s8,s9ts10,s111s12);stateasenumerationsignaIpresentstate:state;signaInextstate:state;signaIqn:std_Iogic_vector(3downtoO);beginswiChtonextstate:Process(cp)beginifcp,eventandcp='1,thenpresentstate<=nextstate;endif;endprocessswiChtonextstate;changestatemode:process(presentstate)begincasepresentstateiswhens=>nextstate<=s1;qn<="OOO,;op<=,0'whens1=>nextstate<=s2;qn<="0010"op<=,0'whens2=>nextstate<=s3;qn<=,001,;op<=<0'whens3=>nextstate<=s4;qn<="0100”;op<=,0'whens4=>nextstate<=s5;qn<=,010'op<=,0'whens5=>nextstate<=s6;qn<="0110"op<=,0'whens6=>nextstate<=s7;qn<="011,;op<=,0'whens7=>nextstate<=s8;qn<二"1000”;op<=,0,;whens8=>nextstate<=s9;qn<=,100,;op<=,0'whens9=>nextstate<=s10;qn<二“1010”;op<=,0'whens10=>nextstate<=s11;qn<="101,;op<=,0'whens11=>nextstate<=s12;qn<=F100"op<=,0,;whens12=>nextstate<=s0;qn<="0000”;op<='endcase;endprocesschangestatemode;q<=qn;endrt1;五、总结六、附录(仿真结果)SimulationWaveformsSinulfttionmod。:Functional