EDA技术(机械)实验报告--16-16点阵显示设计.docx
实验报告(计算机类)开课学院及实验室:实验时间:年月曰学生姓名学号9成绩学生所在学院年级/专业/班课程名称EDA技术(机械)课程代码实验项目名称16*16点阵显示设计项目代码指导教师项目学分一、实验目的1 .了解VHDL语言编程方法,学会熟练运用quartus软件2 .了解点阵显示原理3 .了解如何使用VHDL设计一个16*16点阵显示二、内容与设计思想本设计针对一个16*16的点阵使用逐列循环扫描的方式来不间断的显示VHDL这四个英文字母。三、使用环境WinXP或Win7QUartUSii编程环境四、核心代码及调试过程16*16点阵显示设计chw模块Iibraryieee;useieee.std_Iogic_1164.all;useieee.std_Iogic_unsigned.all;entitychwisport(elk:instd_logic;q:outstd_Iogic_vector(1downto0);endchw;architecturechw_arcofchwisbeginProcess(cIk)variabIeent:std_Iogic_vector(3downto0);variabIetmp:std_Iogic_vector(1downto0);beginifcIk,eventandcIk=,1,thenifcnt<,1111"thenent:=cnt+1;eIseent:="0000"iftmp=,11"thentmp:="00”;eIsetmp:=tmp+1;endif;endif;endif;q<=tmp;endprocess;endchw_arc;CNTA模块-Iibraryieee;useieee.std_Iogic_1164.aII;useieee.std_Iogic_unsigned.all;entitycntaisport(elk:instd_logic;q:outstd_Iogic_vector(3downto0);endcnta;architecturecnta_arcofcntaisbeginprocess(cIk)variabIetmp:std_Iogic_vector(3downto0);beginifcIk,eventandcIk=,1,theniftmp=',1111"thentmp:="0000',;eIsetmp:-tmp+1;endif;endif;q<-tmp-1;endprocess;endcnta_arc;CORA模块Iibraryieee;useieee.std_Iogic_1164.all;entitycoraisport(ch:instd_Iogic_vector(1downto0);seI:instd_Iogic_vector(3downto0);q:outstd_Iogic_vector(15downtoO);endcora;architecturecora_arcofcoraisbeginprocess(ch,seI)begincasechiswhen,00,1=>caseseIiswhen,0000,=>q<="0111000000000000"when,000,=>q<=,0111100000000000"when,0010,=>q<=,>0001111000000000"when"001'=>q<="0000011110000000"when-0100',=>q<=,0000000111100000"when"0101',=>q<=>,0000000001111000"when-0110',=>q<=,>0000000000011110"when"0111"=>q<=,>000000000000011,;when,1000,=>q<=,000000000000011,;when,1001,=>q<=>,0000000000011110"when"1010"=>q<="0000000001111000"when"1011"=>q<=,0000000111100000"when-1100',=>q<="0000011110000000"when,110,=>q<=>,0001111000000000"when-1110',=>q<=>,0111100000000000"when-111,=>q<=,0111000000000000"whenothers=>nuII;endcase;when"01'1=>caseseIiswhen,0000,=>q<=,0000000000000000,1;when"0001"=>q<="0000000000000000"when"0010',=>q<="111111111111111,;when"0011',=>q<="111111111111111,;when"0100',=>q<="0000001110000000"when"0101"=>q<="0000001110000000"when"0110',=>q<=,0000001110000000"when-011,=>q<=,0000001110000000"when,1000,=>q<="0000001110000000"when,100'=>q<=,>0000001110000000"when"1010',=>q<=,<0000001110000000,1;when"1011"=>q<=,>0000001110000000"when,1100"=>q<="111111111111111,;when"110,=>q<="111111111111111,;when"1110',=>q<="0000000000000000"when"1111',=>q<=,>0000000000000000"whenothers=>nulI;endcase;when,10"=>caseseIiswhen"0000"=>q<=,0000000000000000,1;when"0001"=>q<="0000000000000000"when"0010"=>q<=,111111111111111,;when"0011"=>q<=,1111111111111111;when"0100',=>q<=,1100000000000011"when"010,=>q<="1100000000000011"when',0110,=>q<=,1100000000000011"when"0111',=>q<=,0110000000000110"when,1000,=>q<=,0110000000000110"when"1001',=>q<=,0110000000000110"when,1010"=>q<=,0011000000001100"when,1011,=>q<=,0001100000011000;when,1100"=>q<=,0000111111110000n;when,110,=>q<="0000011111100000h;when"1110"=>q<=,>0000000000000000,1;when"1111',=>q<="0000000000000000,;whenothers=>nuII;endcase;when"1,=>caseseIiswhen"0000"=>q<="0000000000000000"when"0001',=>q<="0000000000000000,;when,0010,=>q<=,10000000000000000"when"001,=>q<=,111111111111111,;when"0100',=>q<=,1111111111111111"when"0101',=>q<=,0000000000000011"when"0110',=>q<=,0000000000000011;when,0111"=>q<=,000000000000001,;when"1000',=>q<=,>000000000000001,;when"1001',=>q<="0000000000000011"when,1010,=>q<=,>0000000000000011,1;when"1011"=>q<=,>000000000000011,;when,1100,=>q<=,000000000000111,;when"1101"=>q<=>,0000000000000000"when-1110',=>q<="0000000000000000"when"1111"=>q<=,>0000000000000000"whenothers=>nuII;1 Ch(I .O15.0endcase;whenothers=>nuII;endcase;endprocess;endcoraarc;总体框图:五、总结六、附录(仿真结果)J.lc._J-U11JU.-LHHrnC.r_HLJI.T-J-U-LrT-L-Lr-UU-LTClrmJCJICJU.L.-LCIJLJU.ljLJLIlLLIT.-T-LrIILJLILJhLr-U-T3匚&EIEra1?r÷1FC上运【第sc«*4复,f眼Nao-*z2o-<3ao-8ZHcO-OerSO-3rSO-O二