forked from Github_Repos/cvw
Updated testbench/wave for fdivsqrt new start signals
This commit is contained in:
parent
55335d1db6
commit
3fbccbf119
@ -8,7 +8,7 @@ add wave -noupdate /testbenchfp/Z
|
|||||||
add wave -noupdate /testbenchfp/Res
|
add wave -noupdate /testbenchfp/Res
|
||||||
add wave -noupdate /testbenchfp/Ans
|
add wave -noupdate /testbenchfp/Ans
|
||||||
add wave -noupdate /testbenchfp/DivStart
|
add wave -noupdate /testbenchfp/DivStart
|
||||||
add wave -noupdate /testbenchfp/DivBusy
|
add wave -noupdate /testbenchfp/FDivBusyE
|
||||||
add wave -noupdate /testbenchfp/fdivsqrt/fdivsqrt/fdivsqrtfsm/state
|
add wave -noupdate /testbenchfp/fdivsqrt/fdivsqrt/fdivsqrtfsm/state
|
||||||
add wave -group {PostProc} -noupdate /testbenchfp/postprocess/*
|
add wave -group {PostProc} -noupdate /testbenchfp/postprocess/*
|
||||||
add wave -group {PostProc} -noupdate /testbenchfp/postprocess/specialcase/*
|
add wave -group {PostProc} -noupdate /testbenchfp/postprocess/specialcase/*
|
||||||
|
@ -82,7 +82,7 @@ module testbenchfp;
|
|||||||
logic [`LOGCVTLEN-1:0] CvtShiftAmtE; // how much to shift by
|
logic [`LOGCVTLEN-1:0] CvtShiftAmtE; // how much to shift by
|
||||||
logic [`DIVb:0] Quot;
|
logic [`DIVb:0] Quot;
|
||||||
logic CvtResDenormUfE;
|
logic CvtResDenormUfE;
|
||||||
logic DivStart, DivBusy;
|
logic DivStart, FDivBusyE;
|
||||||
logic reset = 1'b0;
|
logic reset = 1'b0;
|
||||||
logic [$clog2(`NF+2)-1:0] XZeroCnt, YZeroCnt;
|
logic [$clog2(`NF+2)-1:0] XZeroCnt, YZeroCnt;
|
||||||
logic [`DURLEN-1:0] Dur;
|
logic [`DURLEN-1:0] Dur;
|
||||||
@ -717,9 +717,9 @@ module testbenchfp;
|
|||||||
end
|
end
|
||||||
if (TEST === "div" | TEST === "sqrt" | TEST === "all") begin: fdivsqrt
|
if (TEST === "div" | TEST === "sqrt" | TEST === "all") begin: fdivsqrt
|
||||||
fdivsqrt fdivsqrt(.clk, .reset, .XsE(Xs), .FmtE(ModFmt), .XmE(Xm), .YmE(Ym), .XeE(Xe), .YeE(Ye), .SqrtE(OpCtrlVal[0]), .SqrtM(OpCtrlVal[0]),
|
fdivsqrt fdivsqrt(.clk, .reset, .XsE(Xs), .FmtE(ModFmt), .XmE(Xm), .YmE(Ym), .XeE(Xe), .YeE(Ye), .SqrtE(OpCtrlVal[0]), .SqrtM(OpCtrlVal[0]),
|
||||||
.XInfE(XInf), .YInfE(YInf), .XZeroE(XZero), .YZeroE(YZero), .XNaNE(XNaN), .YNaNE(YNaN), .DivStartE(DivStart),
|
.XInfE(XInf), .YInfE(YInf), .XZeroE(XZero), .YZeroE(YZero), .XNaNE(XNaN), .YNaNE(YNaN),
|
||||||
.MDUE(1'b0), .W64E(1'b0),
|
.FDivStartE(DivStart), .IDivStartE(1'b0), .MDUE(1'b0), .W64E(1'b0),
|
||||||
.StallE(1'b0), .StallM(1'b0), .DivSM(DivSticky), .DivBusy, .QeM(DivCalcExp),
|
.StallE(1'b0), .StallM(1'b0), .DivSM(DivSticky), .FDivBusyE, .QeM(DivCalcExp),
|
||||||
.QmM(Quot), .DivDone);
|
.QmM(Quot), .DivDone);
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -879,7 +879,7 @@ always @(negedge clk) begin
|
|||||||
|
|
||||||
// check if result is correct
|
// check if result is correct
|
||||||
// - wait till the division result is done or one extra cylcle for early termination (to simulate the EM pipline stage)
|
// - wait till the division result is done or one extra cylcle for early termination (to simulate the EM pipline stage)
|
||||||
// if(~((Res === Ans | NaNGood | NaNGood === 1'bx) & (ResFlg === AnsFlg | AnsFlg === 5'bx))&~((DivBusy===1'b1)|DivStart)&(UnitVal !== `CVTINTUNIT)&(UnitVal !== `CMPUNIT)) begin
|
// if(~((Res === Ans | NaNGood | NaNGood === 1'bx) & (ResFlg === AnsFlg | AnsFlg === 5'bx))&~((FDivBusyE===1'b1)|DivStart)&(UnitVal !== `CVTINTUNIT)&(UnitVal !== `CMPUNIT)) begin
|
||||||
ResMatch = (Res === Ans | NaNGood | NaNGood === 1'bx);
|
ResMatch = (Res === Ans | NaNGood | NaNGood === 1'bx);
|
||||||
FlagMatch = (ResFlg === AnsFlg | AnsFlg === 5'bx);
|
FlagMatch = (ResFlg === AnsFlg | AnsFlg === 5'bx);
|
||||||
divsqrtop = OpCtrlVal == `SQRT_OPCTRL | OpCtrlVal == `DIV_OPCTRL;
|
divsqrtop = OpCtrlVal == `SQRT_OPCTRL | OpCtrlVal == `DIV_OPCTRL;
|
||||||
@ -911,7 +911,7 @@ always @(negedge clk) begin
|
|||||||
$stop;
|
$stop;
|
||||||
end
|
end
|
||||||
|
|
||||||
if(~(DivBusy|DivStart)|(UnitVal != `DIVUNIT)) VectorNum += 1; // increment the vector
|
if(~(FDivBusyE|DivStart)|(UnitVal != `DIVUNIT)) VectorNum += 1; // increment the vector
|
||||||
|
|
||||||
if (TestVectors[VectorNum][0] === 1'bx & Tests[TestNum] !== "") begin // if reached the end of file
|
if (TestVectors[VectorNum][0] === 1'bx & Tests[TestNum] !== "") begin // if reached the end of file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user