mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
fixed port mismatch and conditional postprocessing
This commit is contained in:
parent
24576f5b0c
commit
8094c12c80
@ -651,7 +651,7 @@ module testbenchfp;
|
||||
end
|
||||
if (TEST === "divremsqrttest") begin // if unified div sqrt is being tested
|
||||
Tests = {Tests, f16sqrt};
|
||||
OpCtrl = {OpCtrl, `DIV_OPCTRL};
|
||||
OpCtrl = {OpCtrl, `SQRT_OPCTRL};
|
||||
WriteInt = {WriteInt, 1'b0};
|
||||
for(int i = 0; i<5; i++) begin
|
||||
Unit = {Unit, `DIVUNIT};
|
||||
@ -660,7 +660,7 @@ module testbenchfp;
|
||||
end
|
||||
if (TEST === "custom") begin // if unified div sqrt is being tested
|
||||
Tests = {Tests, custom};
|
||||
OpCtrl = {OpCtrl, `DIV_OPCTRL};
|
||||
OpCtrl = {OpCtrl, `SQRT_OPCTRL};
|
||||
WriteInt = {WriteInt, 1'b0};
|
||||
Unit = {Unit, `DIVUNIT};
|
||||
Fmt = {Fmt, 2'b10};
|
||||
@ -746,7 +746,7 @@ module testbenchfp;
|
||||
.ASticky);
|
||||
end
|
||||
|
||||
postprocess #(P) postprocess(.Xs(Xs), .Ys(Ys), .PostProcSel(UnitVal[1:0]),
|
||||
/*postprocess #(P) postprocess(.Xs(Xs), .Ys(Ys), .PostProcSel(UnitVal[1:0]),
|
||||
.OpCtrl(OpCtrlVal), .DivQm(Quot), .DivQe(DivCalcExp),
|
||||
.Xm(Xm), .Ym(Ym), .Zm(Zm), .CvtCe(CvtCalcExpE), .DivSticky(DivSticky), .FmaSs(Ss),
|
||||
.XNaN(XNaN), .YNaN(YNaN), .ZNaN(ZNaN), .CvtResSubnormUf(CvtResSubnormUfE),
|
||||
@ -755,7 +755,7 @@ module testbenchfp;
|
||||
.XSNaN(XSNaN), .YSNaN(YSNaN), .ZSNaN(ZSNaN), .CvtLzcIn(CvtLzcInE), .IntZero,
|
||||
.FmaASticky(ASticky), .FmaSe(Se),
|
||||
.FmaSm(Sm), .FmaSCnt(SCnt), .FmaAs(As), .FmaPs(Ps), .Fmt(ModFmt), .Frm(FrmVal),
|
||||
.PostProcFlg(Flg), .PostProcRes(FpRes), .FCvtIntRes(IntRes));
|
||||
.PostProcFlg(Flg), .PostProcRes(FpRes), .FCvtIntRes(IntRes));*/
|
||||
|
||||
if (TEST === "cvtfp" | TEST === "cvtint" | TEST === "all") begin : fcvt
|
||||
fcvt #(P) fcvt (.Xs(Xs), .Xe(Xe), .Xm(Xm), .Int(SrcA), .ToInt(WriteIntVal),
|
||||
@ -782,6 +782,33 @@ module testbenchfp;
|
||||
.Funct3E(Funct3E), .IntDivE(1'b0), .FIntDivResultM(FIntDivResultM),
|
||||
.FDivDoneE(FDivDoneE), .IFDivStartE(IFDivStartE));
|
||||
end
|
||||
if (TEST === "divremsqrt" | TEST === "divremsqrttest") begin: divremsqrt
|
||||
drsu #(P) drsu(.clk, .reset, .XsE(Xs), .YsE(Ys), .FmtE(ModFmt), .XmE(Xm), .YmE(Ym),
|
||||
.XeE(Xe), .YeE(Ye), .SqrtE(OpCtrlVal[0]), .SqrtM(OpCtrlVal[0]),
|
||||
.XInfE(XInf), .YInfE(YInf), .XZeroE(XZero), .YZeroE(YZero),
|
||||
.PostProcSel(UnitVal[1:0]),
|
||||
.XNaNE(XNaN), .YNaNE(YNaN),
|
||||
.OpCtrl(OpCtrlVal),
|
||||
.XSNaNE(XSNaN), .YSNaNE(YSNaN),
|
||||
.Frm(FrmVal),
|
||||
.FDivStartE(DivStart), .IDivStartE(1'b0), .W64E(1'b0),
|
||||
.StallM(1'b0), .FDivBusyE,
|
||||
.FlushE(1'b0), .ForwardedSrcAE('0), .ForwardedSrcBE('0), .Funct3M(Funct3M),
|
||||
.Funct3E(Funct3E), .IntDivE(1'b0),
|
||||
.FDivDoneE(FDivDoneE), .IFDivStartE(IFDivStartE), .FResM(FpRes), .FIntDivResultM(IntRes), .FlgM(Flg));
|
||||
end
|
||||
else begin: postprocess
|
||||
postprocess #(P) postprocess(.Xs(Xs), .Ys(Ys), .PostProcSel(UnitVal[1:0]),
|
||||
.OpCtrl(OpCtrlVal), .DivQm(Quot), .DivQe(DivCalcExp),
|
||||
.Xm(Xm), .Ym(Ym), .Zm(Zm), .CvtCe(CvtCalcExpE), .DivSticky(DivSticky), .FmaSs(Ss),
|
||||
.XNaN(XNaN), .YNaN(YNaN), .ZNaN(ZNaN), .CvtResSubnormUf(CvtResSubnormUfE),
|
||||
.XZero(XZero), .YZero(YZero), .CvtShiftAmt(CvtShiftAmtE),
|
||||
.XInf(XInf), .YInf(YInf), .ZInf(ZInf), .CvtCs(CvtResSgnE), .ToInt(WriteIntVal),
|
||||
.XSNaN(XSNaN), .YSNaN(YSNaN), .ZSNaN(ZSNaN), .CvtLzcIn(CvtLzcInE), .IntZero,
|
||||
.FmaASticky(ASticky), .FmaSe(Se),
|
||||
.FmaSm(Sm), .FmaSCnt(SCnt), .FmaAs(As), .FmaPs(Ps), .Fmt(ModFmt), .Frm(FrmVal),
|
||||
.PostProcFlg(Flg), .PostProcRes(FpRes), .FCvtIntRes(IntRes));
|
||||
end
|
||||
|
||||
assign CmpFlg[3:0] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user