广工数字逻辑实验六Word格式文档下载.docx

上传人:b****1 文档编号:4390640 上传时间:2023-05-03 格式:DOCX 页数:23 大小:217.78KB
下载 相关 举报
广工数字逻辑实验六Word格式文档下载.docx_第1页
第1页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第2页
第2页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第3页
第3页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第4页
第4页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第5页
第5页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第6页
第6页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第7页
第7页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第8页
第8页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第9页
第9页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第10页
第10页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第11页
第11页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第12页
第12页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第13页
第13页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第14页
第14页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第15页
第15页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第16页
第16页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第17页
第17页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第18页
第18页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第19页
第19页 / 共23页
广工数字逻辑实验六Word格式文档下载.docx_第20页
第20页 / 共23页
亲,该文档总共23页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

广工数字逻辑实验六Word格式文档下载.docx

《广工数字逻辑实验六Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《广工数字逻辑实验六Word格式文档下载.docx(23页珍藏版)》请在冰点文库上搜索。

广工数字逻辑实验六Word格式文档下载.docx

(一)74HC148

1、模块及测试平台代码

//HC148.v

moduleHC148(DataIn,EO,Dataout,EI,GS);

input[7:

0]DataIn;

inputEI;

outputEO;

output[2:

0]Dataout;

outputGS;

reg[2:

regEO;

regGS;

integerI;

always@(DataInorEI)

begin

if(EI)

Dataout=7;

EO=1;

GS=1;

end

elseif(DataIn==8'

b11111111)

EO=0;

else

for(I=0;

I<

8;

I=I+1)

if(~DataIn[I])

Dataout=~I;

GS=0;

endmodule

//testbench.v

`timescale1ns/100ps

moduletestbench;

reg[7:

regEI;

wire[2:

wireGS,EO;

HC148u1(DataIn,EO,Dataout,EI,GS);

initial

EI=1;

DataIn=8'

b11111111;

#10EI=0;

repeat(8)

#10DataIn=DataIn<

<

1;

2、第一次仿真结果

3、综合结果

4、第二次仿真结果(综合后)。

回答输出信号是否有延迟,延迟时间约为多少?

延迟:

398ps

5、第三次仿真结果(布局布线后)。

分析是否有出现竞争冒险。

5893ps。

有竞争冒险。

6、引脚分配表

(二)74HC138

//HC138.v

moduleHC138(DataIn,Enable,Dataout);

input[2:

inputEnable;

output[7:

always@(DataInorEnable)

if(Enable)

Dataout=0;

I<

=7;

I=I+1)

if(DataIn==I)

Dataout[I]=1;

Dataout[I]=0;

//testbench.v

`timescale1ns/10ps

0]in;

regenable;

wire[7:

0]out;

HC138u1(in,enable,out);

in=0;

repeat(20)

#20in=$random;

enable=1;

#40enable=0;

300ps

7836ps。

(三)74HC153

//HC153.v

moduleHC153(In,Sel,Out,EI);

input[3:

0]In;

input[1:

0]Sel;

outputOut;

regOut;

always@(InorSelorEI)

if(EI)

Out=0;

Out=In[Sel];

`timescale1ns/1ns

reg[3:

0]Data;

reg[1:

regG;

wireOut;

HC153u1(Data,Sel,Out,G);

G=1;

Data=4'

b1011;

Sel=4'

b00;

#40G=0;

#10Sel=Sel+1;

291ps

3000ps。

(四)74HC85

//HC85.v

moduleHC85(DataA,DataB,AGEB);

0]DataA,DataB;

outputAGEB;

regAGEB;

always@(DataAorDataB)

if(DataA>

=DataB)

AGEB=1;

AGEB=0;

0]ina,inb;

wireAGEB;

HC85u1(ina,inb,AGEB);

ina=0;

#20ina=$random;

#20$finish;

inb=0;

repeat(10)

#40inb=$random;

500ps

6274ps。

(五)74HC283

//HC283.v

moduleHC283(A,B,Cin,Sum,Cout);

parameterN=4;

input[N-1:

0]A,B;

inputCin;

output[N-1:

0]Sum;

reg[N-1:

outputCout;

regCout;

reg[N:

0]q;

always@(AorBorCin)

begin:

adder

integeri;

q[0]=Cin;

for(i=0;

i<

=N;

i=i+1)

begin

q[i+1]=(A[i]&

B[i])|(A[i]&

q[i])|(B[i]&

q[i]);

Sum[i]=A[i]^B[i]^q[i];

end

Cout=q[N];

end

regcin;

wire[3:

0]sum;

wirecout;

HC283u1(ina,inb,cin,sum,cout);

ina=0;

#20ina=$random;

inb=0;

#40inb=$random;

cin=0;

#200cin=1;

597ps

8295ps。

(六)74HC4511

//HC4511.v

moduleHC4511(A,Seg,LT_N,BI_N,LE);

inputLT_N,BI_N,LE;

input[3:

0]A;

output[7:

0]Seg;

reg[7:

always@(AorLT_NorBI_NorLE)

if(!

LT_N)

Seg=8'

elseif(!

BI_N)

b00000000;

elseif(LE)

Seg=Seg;

case(A)

4'

d0:

Seg=8'

b00111111;

d1:

b00000110;

d2:

b01011011;

d3:

b01001111;

d4:

b01100110;

d5:

b01101101;

d6:

b01111101;

d7:

b00000111;

d8:

b01111111;

d9:

b01101111;

d10:

b01110111;

d11:

b01111100;

d12:

b00111001;

d13:

b01011110;

d14:

b01111001;

d15:

b01110001;

default:

;

endcase

reg[3:

regLT_N,BI_N,LE;

wire[7:

HC4511u1(A,Seg,LT_N,BI_N,LE);

initial

LT_N=0;

BI_N=0;

LE=0;

A=$random;

#20LT_N=1;

#20BI_N=1;

#20A=$random;

490ps

6495ps。

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

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2