- 102
- 0
- 约5.68万字
- 约 6页
- 2016-11-07 发布于贵州
- 举报
数电实验报告1.—四位减法器
熟悉QuartusII和Verilog HDL数字逻辑电路设计基础环境实验报告
学生姓名:
班级学号: 38033 9
指导老师:
实验报告内容
一、实验名称:
1.进一步学习quartusII的基本功能和使用方法,完成四位减法器原理图输入和文本输入、编译校验及功能仿真
2.进一步学习quartusII的基本功能和使用方法,完成所对应逻辑电路设计及功能仿真。
二、实验学时:4学时
三、实验目的:熟悉Quartus II基本功能和使用方法,掌握原理图输入、文本输入的步骤。
四、实验内容:
完成四位减法器原理图输入和文本输入、编译校验及功能仿真 ;完成所对应逻辑电路设计及功能仿真。
五、实验原理:数字逻辑电路中各种门电路的功能和使用方法及quartusII的运用。
六、实验步骤:
1)原理图输入方法:通过本部分重点学习元器件的放置、连线、电源、地的表示,标号的使用,输入、输出的设置,以及各种元件库的使用等。
①创建文件② 创建元器件③ 设置输入输出④ 添加连接线:将选定期间及设置好的输入输出按照设计好的原理图进行正确连线。
2)文本输入方式(Verilog HDL)
学习verilog语言的扩展文件名位.v,verilog 文件名必须与实体文件名保持一致,文件必须放在一个工程中。
① 创建verilog HDL源程序文件②用verilog HDL进行二选一数据选择器逻辑功能描述
设计编译校验
①建立仿真波形文件
② 添加仿真测试点
③ 添加输入端仿真信号
④ 开始仿真
七、实验结果:
A.四位减法器
原理图:
文本:
波形图:
B.完成所对应逻辑电路设计及功能仿真。
原理图:
波形图:
八、心得体会:这是使用这个软件的第三次实验对于软件的使用已经比较熟练能够很快连接好电路进行试验
九、附录:程序代码
四位减法器
module fourbit(A,B,CI,CO,S);
parameter size=4;
input [size:1]A,B;
output [size:1]S;
input CI;
output CO;
wire [1:size-1]Temp;
onebit
add1(A[1],B[1],CI,S[1],Temp[1]),
add2(A[2],B[2],Temp[1],S[2],Temp[2]),
add3(A[3],B[3],Temp[2],S[3],Temp[3]),
add4(A[4],B[4],Temp[3],S[4],CO);
endmodule
module onebit(A,B,CI,CO,S);
input A,B,CI;
output CO,S;
wire n1,n2,n3,out1,out2,out3,out4,out5,out6,out7;
not
noti1(n1,CI),
noti2(n2,A),
noti3(n3,B);
and
and1(out1,n1,n2),
and2(out2,n2,n3),
and3(out3,n1,n3),
and4(out4,CI,A,B),
and5(out5,n1,A,B),
and6(out6,n1,n2,n3),
and7(out7,CI,B,n3);
nor
nor1(CO,out1,out2,out3),
nor2(S,out4,out5,out6,out7);
endmodule
relationship between Government and business. The two sessions, General Secretary of Pro, clear the word succinctly summarized the new relationship between Government and business, as pure politics, reshaping the political relationship specified in the direction. District leaders in handling political and business relations, engage in trading power for money, and finally stumbled, we a lesson, always keep in mind that Pro, clean practicing Pro, clear. Pro is to open a sincere engagement
原创力文档

文档评论(0)