diff --git a/pipelined/srt/srt.sv b/pipelined/srt/srt.sv index 7e6d22a41..1037c9e24 100644 --- a/pipelined/srt/srt.sv +++ b/pipelined/srt/srt.sv @@ -92,10 +92,10 @@ module srt ( csa #(`DIVLEN+4) csa(WS, WC, Dsel, qp, WSA, WCA); // If only implementing division, use divide otfc - // otfc2 #(`DIVLEN) otfc2(clk, Start, qp, qz, qm, Quot); + otfc2 #(`DIVLEN) otfc2(clk, Start, qp, qz, qm, Quot); // otherwise use sotfc - creg sotfcC(clk, Start, C); - sotfc2 #(`DIVLEN) sotfc2(clk, Start, qp, qn, C, Quot); + // creg sotfcC(clk, Start, C); + // sotfc2 #(`DIVLEN) sotfc2(clk, Start, qp, qn, C, Quot); expcalc expcalc(.XExp, .YExp, .calcExp, .Sqrt); @@ -272,7 +272,7 @@ module sotfc2( flopr #(`DIVLEN+4) Sreg(clk, Start, SMNext, SM); mux2 #(`DIVLEN+4) Smux(SNext, {4'b0001, (`DIVLEN){1'b0}}, Start, SMux); - flop #(`DIVLEN+4) SMreg(clk, SMux, M); + flop #(`DIVLEN+4) SMreg(clk, SMux, S); always_comb begin if (sp) begin diff --git a/pipelined/srt/testbench.sv b/pipelined/srt/testbench.sv index 83f337073..1f6f15616 100644 --- a/pipelined/srt/testbench.sv +++ b/pipelined/srt/testbench.sv @@ -82,7 +82,7 @@ module testbench; // Equip Int test or Sqrt test assign Int = 1'b0; - assign Sqrt = 1'b1; + assign Sqrt = 1'b0; // Divider srt srt(.clk, .Start(req), @@ -111,7 +111,7 @@ module testbench; begin testnum = 0; errors = 0; - $readmemh ("sqrttestvectors", Tests); + $readmemh ("testvectors", Tests); Vec = Tests[testnum]; a = Vec[`mema]; {asign, aExp, afrac} = a;