EDA技术(机械)实验报告--自动售邮票的控制电路.docx
实验报告(计算机类)开课学院及实验室:实验时间:年月日学生姓名学号成绩学生所在学院年级/专业/班课程名称EDA技术(机械)课程代码实验项目名称自动售邮票的控制电路项目代码指导教师项目学分一、实验目的1 .了解VHDL语言编程方法,学会熟练运用quartus软件2 .了解如何使用VHDL设计一个自动售邮票的控制电路二、内容与设计思想三、使用环境WinXP或Win7QUartUSii编程环境四、核心代码及调试过程设计一个自动售票在控制电路solda模块Iibraryieee;useieee.std_Iogic_1164.aII;useieee.std_Iogic_unsigned.all;entitysoldaisport(ml,f115,m10:instd_logic;t6,t8:instd_logic;reset:instd_logic;elk:instd_logic;56, s8:outstd_logic;ch:outstd_Iogic_vector(4downto0);endsolda;architecturesolda_arcofsoldaisbeginprocess(cIk,ml,m5lmlO,t6,t8,reset)variabIemoney:std_Iogic_vector(4downtoO);variabIea:std_logic;variabIeent:integerrangeOto60;beginifcIk,eventandcIk=,1,thenifa='1'thenifm1='0,thenmoney:=money+1;eIsifm5='0,thenmoney:=money+5;eIsifm10='0,thenmoney:=money+10;eIsifreset='0'thendeaIcanceIedch<=money;a:='O"eIsift6='0,andmoney>5thenonestampof6ch<=money_6;s6<=,;a:='0'eIsift8=,0,andmoney>7thenonestampof8ch<=money_8;s8<=,;a:='0'endif;de I ayifcnt<60thenent:=cnt+1;eIseent:=0;money:="00000"s6<=,0,;s8<=,0,;ch<=,00000,;a:='1'endif;endif;endif;endprocess;endsoIda_arc;ciao模块Iibraryieee;useieee.std_Iogic_1164.aII;entityciaoisport(a,cIk:instd_logic;q:outstd_logic);endciao;architectureciao_arcofciaoissignaItmp1:std_logic;beginprocess(cIk,a)variabIetmp3,tmp2:std_logic;beginifcIk,eventandcIk=,0'thentmp1<=a;tmp2:=tmp1;tmp3:=nottmp2;endif;q<=tmp1andtmp3andelk;endprocess;endciao_arc;总体框图:五、总结六、附录(仿真结果)