Old changes to old files

This commit is contained in:
cturek 2022-09-03 22:09:55 +00:00
parent 41448663b9
commit 254bb8e0a0
2 changed files with 6 additions and 6 deletions

View File

@ -163,7 +163,7 @@ module srtpreproc (
assign D = {4'b0001, Int ? PreprocB : PreprocY};
// Integer exponent and sign calculations
assign intExp = zeroCntB - zeroCntA - Mod + (PreprocA >= PreprocB);
assign intExp = zeroCntB - zeroCntA + (PreprocA >= PreprocB);
assign intSign = Signed & (SrcA[`XLEN - 1] ^ SrcB[`XLEN - 1]);
// Number of cycles of divider
@ -462,7 +462,7 @@ module srtpostproc(
end
assign floatRes = S[`DIVLEN] ? S[`DIVLEN:1] : S[`DIVLEN-1:0];
assign intRes = intS[`DIVLEN] ? intS[`DIVLEN:1] : intS[`DIVLEN-1:0];
assign shiftRem = (intRem >> (zeroCntD));
assign shiftRem = (intRem >> (zeroCntD+1));
always_comb begin
if (Int) begin
if (Mod) Result = shiftRem[`DIVLEN-1:0];

View File

@ -70,9 +70,9 @@ module testbench;
integer testnum, errors;
// Equip Int, Sqrt, or IntMod test
assign Int = 1'b0;
assign Mod = 1'b0;
assign Sqrt = 1'b1;
assign Int = 1'b1;
assign Mod = 1'b1;
assign Sqrt = 1'b0;
// Divider
srt srt(.clk, .Start(req),
@ -101,7 +101,7 @@ module testbench;
begin
testnum = 0;
errors = 0;
$readmemh ("sqrttestvectors", Tests);
$readmemh ("modtestvectors", Tests);
Vec = Tests[testnum];
a = Vec[`mema];
{asign, aExp, afrac} = a;