数字系统设计技术实验指导书.docx
- 文档编号:11605424
- 上传时间:2023-06-01
- 格式:DOCX
- 页数:19
- 大小:57.42KB
数字系统设计技术实验指导书.docx
《数字系统设计技术实验指导书.docx》由会员分享,可在线阅读,更多相关《数字系统设计技术实验指导书.docx(19页珍藏版)》请在冰点文库上搜索。
数字系统设计技术实验指导书
Experiment2DesigningNumberComparer
实验目的:
熟悉QuartusII的开发环境
熟练掌握编程开发流程
学习VHDL的基本语法
学习VHDL编程设计
实验内容:
数值比较器设计
实验要求:
熟练掌握QuartusII开发环境下对可编程逻辑器件进行程序化设计的整套流程
设计输入使用插入模板(InsertTemplate)
在QuartusII开发环境下对设计程序进行时序仿真
将生成的配置文件下载到实验板,进行最终的实物测试验证
实验原理:
根据两位二进制数的大小得到对应的比较结果,其电路示意图及电路特性表为:
比较器特性表
ABIn_sIn_lIn_e
A>B×××
001
A
100
A=B010
001
A=B100
100
A=B001
010
A=B000
×××
A=B×11
×××
A=B1×1
×××
A=B11×
×××
比较器电路示意图
实验报告内容要求:
(1)实验目的;
(2)实验内容;
(3)实验要求;
(4)实验原理;
(5)程序编写;
(6)
Y
程序编译(首先选择器件具体型号);
(7)功能仿真和芯片时序仿真;
(8)芯片引脚设定;
(9)适配下载结果及结论。
Experiment3Designing8to1-Multiplxer
实验目的:
熟悉QuartusII的开发环境
熟练掌握编程开发流程
学习VHDL的基本语法
学习VHDL编程设计
实验内容:
八选一数据选择器设计。
实验要求:
熟练掌握QuartusII开发环境下对可编程逻辑器件进行程序化设计的整套流程
设计输入使用插入模板(InsertTemplate)
在QuartusII开发环境下对设计程序进行时序仿真
将生成的配置文件下载到实验板,进行最终的实物测试验证
实验原理:
电路功能表及其电路外部符号如下:
电路功能表
SbA2A1A0
Y
1×××
0000
D0
0001
D1
0010
D2
0011
D3
0100
D4
0101
D5
0110
D6
0111
D7
实验报告内容要求:
(1)实验目的;
(2)实验内容;
(3)实验要求;
(4)实验原理;
(5)程序编写;
(6)程序编译(首先选择器件具体型号);
(7)功能仿真和芯片时序仿真;
(8)芯片引脚设定;
(9)适配下载结果及结论。
Experiment4Designingmodule_60
实验目的:
熟悉QuartusII的开发环境
熟练掌握编程开发流程
学习数字系统中层次化设计技巧
学习显示译码电路分频电路、计数电路的VHDL程序设计
学习结构化设计的VHDL程序设计
实验内容:
基于数码管显示的60进制计数器设计
实验要求:
熟练掌握QuartusII开发环境下对可编程逻辑器件进行程序化设计的整套流程
将50MHz信号分频为1Hz信号
以1Hz为60进制计数器使能信号,实现60进制计数功能
计数结果用两位数码管显示
计数进位持续时间1s用LED显示
设计位同步时序电路
在QuartusII开发环境下对设计程序进行时序仿真
将生成的配置文件下载到实验板,进行最终的实物测试验证
实验原理:
先对50MHz时钟信号分频得到1Hz,然后调用两个10进制计数器,计数到59时回到初始0的计数状态,每个10进制计数的技术结果通过显示译码送到两位数码管上显示,结构框图如下:
数码管
数码管
50MHz
实验报告内容要求:
(1)实验目的;
(2)实验内容;
(3)实验要求;
(4)实验原理;
(5)程序编写;
(6)程序编译(首先选择器件具体型号);
(7)功能仿真和芯片时序仿真;
(8)结论。
Experiment5Designingshift_register
实验目的:
熟悉QuartusII的开发环境
熟练掌握编程开发流程
学习VHDL的基本语法
学习数字系统中移位寄存器设计及其VHDL编程
实验内容:
移位寄存器设计
实验要求:
熟练掌握QuartusII开发环境下对可编程逻辑器件进行程序化设计的整套流程
设计输入使用插入模板(InsertTemplate)
在QuartusII开发环境下对设计程序进行时序仿真
将生成的配置文件下载到实验板,进行最终的实物测试验证
实验原理:
根据两位二进制数的大小得到对应的比较结果,其电路示意图及电路特性表为:
比较器特性表
clrClkloadctr
0×××
复位
10×
置数
110
右移
111
左移
Data_in(3..0)
clk
clr
load
ctr
比较器电路示意图
实验报告内容要求:
(9)实验目的;
(10)实验内容;
(11)实验要求;
(12)实验原理;
(13)程序编写;
(14)程序编译(首先选择器件具体型号);
(15)功能仿真和芯片时序仿真;
(16)芯片引脚设定;
(17)适配下载结果及结论。
实验2考程序
Libraryieee;
Useieee.std_logic_1164.all;
Entitycompare_2is
Port(data_a,data_b:
instd_logic_vector(3downto0);
In_s,In_l,In_e:
instd_logic;
Ys,Yl,Ye:
outstd_logic);
Endcompare_2;
Architecturertlofcompare_2is
Signaltmps,tmpe:
std_logic;
Begin
Ys<=tmps;
Ye<=tmpe;
Yl<=tmpsnortmpe;
Aa:
process(data_a,data_b,In_e)
Begin
If(data_a=data_bandIn_e=‘1’)then
tmpe<=’1’;
else
tmpe<=’0’;
Endif;
Endprocessaa;
bb:
process(data_a,data_b,In_s)
Begin
If(data_a tmps<=’1’; elsif(data_a=data_bandIn_s=’1’)then tmps<=’1’; Else tmps<=’0’; Endif; Endprocessbb; Endrtl; 实验3参考程序 ENTITYmux8_1IS PORT(d: INSTD_LOGIC_VECTOR(7DOWNTO0); sel: INSTD_LOGIC_VECTOR(2DOWNTO0); sb: INSTD_LOGIC; y: OUTSTD_LOGIC); ENDmux8_1; ARCHITECTURErtlOFmux8_1IS BEGIN PROCESS(d,sel,sb) BEGIN If(sb=’0’)then Case(sel) When"000"=>y<=d(0); When"001"=>y<=d (1); When"010"=>y<=d (2); When"011"=>y<=d(3); When"100"=>y<=d(4); When"101"=>y<=d(5); When"110"=>y<=d(6); When"111"=>y<=d(7); Whenothers=>y<=’X’; endcase; else y<=’0’; endif; ENDPROCESS; ENDrtl; 实体(entity)名称与文件名称一致; 时序仿真时,波形编辑后先保存波形文件再进行时序仿真; 分配管脚后,需要重现编译,然后才能下载。 设计流程: 新建项目新建源文件输入语言编译仿真分配管脚编译下载 仿真流程: 新建波形文件导入管脚信号并编辑输入信号仿真 下载的时候选择硬件为: BytebBlaster[LPT1] 实验4参考程序 libraryieee; useieee.std_logic_1164.all; entitycount_60is port(clk,rst: instd_logic; count_data10,count_data1: outstd_logic_vector(6downto0); en_out: outstd_logic ); endcount_60; architecturertlofcount_60is componentsec_outport(clk,rst: instd_logic; en_out: outstd_logic ); endcomponent; componentcount_10port(clk,rst,en_in,ld: instd_logic; data_in: instd_logic_vector(3downto0); data_out: outstd_logic_vector(3downto0); en_out: outstd_logic ); endcomponent; componentdis_decodeport(data_in: instd_logic_vector(3downto0); dis_num: outstd_logic_vector(6downto0) ); endcomponent; signalcont_tmp10,cont_tmp1,data_in: std_logic_vector(3downto0); signalld,sec_en,sec_en10,min_out: std_logic; begin ld<=sec_en10andcont_tmp10 (2)andcont_tmp10(0); data_in<="0000"; en_out<=cont_tmp10 (2)andcont_tmp10(0)andcont_tmp1(3)andcont_tmp1(0); U0: sec_outportmap(clk,rst,sec_en); U1: count_10portmap(clk,rst,sec_en,ld,data_in,cont_tmp1,sec_en10); U2: count_10portmap(clk,rst,sec_en10,ld,data_in,cont_tmp10,min_out); U3: dis_decodeportmap(cont_tmp1,count_data1); U4: dis_decodeportmap(cont_tmp10,count_data10); endrtl; libraryieee; useieee.std_logic_1164.all; useieee.std_logic_unsigned.all; useieee.std_logic_arith.all; entitycount_10is port(clk,rst,en_in,ld: instd_logic; data_in: instd_logic_vector(3downto0); data_out: outstd_logic_vector(3downto0); en_out: outstd_logic ); endcount_10; architecturertlofcount_10is signalcont_tmp: std_logic_vector(3downto0); begin en_out<=en_inandcont_tmp(3)andcont_tmp(0); data_out<=cont_tmp; process(clk,rst) begin if(rst='0')then cont_tmp<="0000"; elsif(clk'eventandclk='1')then if(ld='1')then cont_tmp<=data_in; elsif(en_in='1')then if(cont_tmp="1001")then cont_tmp<="0000"; else cont_tmp<=cont_tmp+'1'; endif; endif; endif; endprocess; endrtl; libraryieee; useieee.std_logic_1164.all; entitydis_decodeis port(data_in: instd_logic_vector(3downto0); dis_num: outstd_logic_vector(6downto0) ); enddis_decode; architecturertlofdis_decodeis begin withdata_inselect dis_num<="0111111"WHEN"0000", "0000110"WHEN"0001", "1011011"WHEN"0010", "1001111"WHEN"0011", "1100110"WHEN"0100", "1101101"WHEN"0101", "1111101"WHEN"0110", "0000111"WHEN"0111", "1111111"WHEN"1000", "1100111"WHEN"1001", "0000000"WHENothers; endrtl; libraryieee; useieee.std_logic_1164.all; entitysec_outis port(clk,rst: instd_logic; en_out: outstd_logic ); endsec_out; architecturertlofsec_outis componentdivide_5port(clk,rst,en_in: instd_logic; en_out: outstd_logic ); endcomponent; componentdivide_10port(clk,rst,en_in: instd_logic; en_out: outstd_logic ); endcomponent; signalen0,en1,en2,en3,en4,en5,en6: std_logic; begin U0: divide_5portmap(clk,rst,'1',en0); U1: divide_10portmap(clk,rst,en0,en1); U2: divide_10portmap(clk,rst,en1,en2); U3: divide_10portmap(clk,rst,en2,en3); U4: divide_10portmap(clk,rst,en3,en4); U5: divide_10portmap(clk,rst,en4,en5); U6: divide_10portmap(clk,rst,en5,en6); U7: divide_10portmap(clk,rst,en6,en_out); endrtl; libraryieee; useieee.std_logic_1164.all; useieee.std_logic_unsigned.all; useieee.std_logic_arith.all; entitydivide_5is port(clk,rst,en_in: instd_logic; en_out: outstd_logic ); enddivide_5; architecturertlofdivide_5is signalcont_tmp: std_logic_vector(2downto0); begin en_out<=en_inandcont_tmp (2); process(clk,rst) begin if(rst='0')then cont_tmp<="000"; elsif(clk'eventandclk='1')then if(en_in='1')then if(cont_tmp="100")then cont_tmp<="000"; else cont_tmp<=cont_tmp+'1'; endif; endif; endif; endprocess; endrtl; libraryieee; useieee.std_logic_1164.all; useieee.std_logic_unsigned.all; useieee.std_logic_arith.all; entitydivide_10is port(clk,rst,en_in: instd_logic; en_out: outstd_logic ); enddivide_10; architecturertlofdivide_10is signalcont_tmp: std_logic_vector(3downto0); begin en_out<=en_inandcont_tmp(3)andcont_tmp(0); process(clk,rst) begin if(rst='0')then cont_tmp<="0000"; elsif(clk'eventandclk='1')then if(en_in='1')then if(cont_tmp="1001")then cont_tmp<="0000"; else cont_tmp<=cont_tmp+'1'; endif; endif; endif; endprocess; endrtl; 实验5参考程序 libraryieee; useieee.std_logic_1164.all; ENTITYshiftIS PORT(clr,clk,load,shift_en,ctr,sr,sl: INSTD_LOGIC; data_in: INSTD_LOGIC_VECTOR(7downto0); data_q: OUTSTD_LOGIC_VECTOR(7downto0)); ENDshift; ARCHITECTUREarcOFshiftIS SIGNALdata_tmp: STD_LOGIC_VECTOR(7downto0); Signalen_tmp1,en_tmp2,en_tmp: std_logic; BEGIN PROCESS(clr,clk) BEGIN IF(clr='0')THEN en_tmp1<=’0’; else en_tmp1<=shift_en; endif; endprocess; PROCESS(clr,clk) BEGIN IF(clr='0')THEN en_tmp2<=’0’; else en_tmp2<=en_tmp1; endif; endprocess; en_tmp<=(noten_tmp1)anden_tmp2; data_q<=data_tmp; PROCESS(clr,clk) BEGIN IF(clr='0')THEN data_tmp<="00000000"; ELSIF(clk'EVENTANDclk='1')THEN IFload='0'THEN data_tmp<=data_in; ELSIF(en_tmp='1'ANDctr='0')THEN data_tmp<=sr&data_tmp(7downto1); ELSIF(en_tmp='1'ANDctr='1')THEN data_tmp<=data_tmp(6downto0)&sl; ENDIF; ENDIF; ENDPROCESS; ENDarc;
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 系统 设计 技术 实验 指导书