EDA多路选择器设计实验报告Word文档下载推荐.docx

上传人:b****5 文档编号:20986973 上传时间:2023-01-26 格式:DOCX 页数:11 大小:309.43KB
下载 相关 举报
EDA多路选择器设计实验报告Word文档下载推荐.docx_第1页
第1页 / 共11页
EDA多路选择器设计实验报告Word文档下载推荐.docx_第2页
第2页 / 共11页
EDA多路选择器设计实验报告Word文档下载推荐.docx_第3页
第3页 / 共11页
EDA多路选择器设计实验报告Word文档下载推荐.docx_第4页
第4页 / 共11页
EDA多路选择器设计实验报告Word文档下载推荐.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

EDA多路选择器设计实验报告Word文档下载推荐.docx

《EDA多路选择器设计实验报告Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《EDA多路选择器设计实验报告Word文档下载推荐.docx(11页珍藏版)》请在冰豆网上搜索。

EDA多路选择器设计实验报告Word文档下载推荐.docx

QuartusII程序:

modulemux41a(a,b,c,d,s0,s1,y);

inputa,b,c,d;

inputs0,s1;

outputy;

regy;

always@(a,b,c,d,s0,s1)

begin:

mux41

case({s0,s1})

2'

b00:

y<

=a;

b01:

=b;

b10:

=c;

b11:

=d;

default:

endcase

end

endmodule

modelsim程序:

//Copyright(C)1991-2012AlteraCorporation

//YouruseofAlteraCorporation'

sdesigntools,logicfunctions//andothersoftwareandtools,anditsAMPPpartnerlogic//functions,andanyoutputfilesfromanyoftheforegoing//(includingdeviceprogrammingorsimulationfiles),andany//associateddocumentationorinformationareexpresslysubject//tothetermsandconditionsoftheAlteraProgramLicense//SubscriptionAgreement,AlteraMegaCoreFunctionLicense//Agreement,orotherapplicablelicenseagreement,including,//withoutlimitation,thatyouruseisforthesolepurposeof//programminglogicdevicesmanufacturedbyAlteraandsoldby

//Alteraoritsauthorizeddistributors.Pleaserefertothe//applicableagreementforfurtherdetails.

//

*****************************************************************************

//ThisfilecontainsaVerilogtestbenchtemplatethatisfreelyeditableto

//suituser'

sneeds.Commentsareprovidedineachsectiontohelptheuser

//filloutnecessarydetails.

//Generatedon"

10/11/201521:

31:

33"

//VerilogTestBenchtemplatefordesign:

mux41a

//Simulationtool:

ModelSim-Altera(Verilog)

`timescale1us/1ps

modulemux41a_vlg_tst();

//constants//generalpurposeregisters

//regeachvec;

//testvectorinputregisters

rega;

regb;

regc;

regd;

regs0;

regs1;

//wireswirey;

//assignstatements(ifany)mux41ai1(

//portmap-connectionbetweenmasterportsandsignals/registers

.a(a),

.b(b),

.c(c),

.d(d),

.s0(s0),

.s1(s1),

.y(y)

);

initial

begin

a=0;

b=0;

c=0;

d=0;

s0=0;

s1=0;

#20s0=0;

s1=1;

#20s0=1;

#20$stop;

always#2a=~a;

always#4b=~b;

always#6c=~c;

always#8d=~d;

四、实验步骤:

1、打开QuartusII,点击“file”中的“NewProjectWizard”,新建工程到指定文

件夹中

2、点击“New”新建工作簿,写入程序

3、点击“compiledesign”进行编译

方法一:

联合仿真

1、点击“processing”中的“start”

2、点击“file”中的“open”,找到“modelsim”,查找“.vt”文件

3、打开“mux41a”文件

4、修改文件中的程序

5、打开“Assignments”,点击“setting”,修改时间

6、点击“testbenches”后再点击“New”添加“mux41a”文件

7、再进行编译

8、点击“Tools”,打开“RunSimulationTool”,再选择“RTLSimulation”

方法二:

modelsim单独仿真

1、在modelsim中新建“sim”文件

2、打开“modelsim”,创建工程

3、点击“createnewfile”,新建两个工作簿

4、分别添加相应程序进去,进行编译

5、选择library,点击work,之后再右击add?

towave?

selectedsignals,最后选

择simulate点击run?

runall

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 信息与通信

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1