OpenCores
URL https://opencores.org/ocsvn/ft816float/ft816float/trunk

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [positVerilog/] [positSqrt.sv] - Diff between revs 41 and 48

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 41 Rev 48
Line 3... Line 3...
//   \\__/ o\    (C) 2020  Robert Finch, Waterloo
//   \\__/ o\    (C) 2020  Robert Finch, Waterloo
//    \  __ /    All rights reserved.
//    \  __ /    All rights reserved.
//     \/_//     robfinch@finitron.ca
//     \/_//     robfinch@finitron.ca
//       ||
//       ||
//
//
//      positSqrt.v
//      positSqrt.sv
//    - posit number square root function
//    - posit number square root function
//    - parameterized width
//    - parameterized width
//
//
//
//
// This source file is free software: you can redistribute it and/or modify
// This source file is free software: you can redistribute it and/or modify
Line 23... Line 23...
// You should have received a copy of the GNU General Public License
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see .
// along with this program.  If not, see .
//
//
// ============================================================================
// ============================================================================
 
 
`include "positConfig.sv"
import posit::*;
 
 
module positSqrt(clk, ce, i, o, start, done, zero, inf);
module positSqrt(clk, ce, i, o, start, done, zero, inf);
`include "positSize.sv"
 
localparam rs = $clog2(PSTWID-1)-1;
localparam rs = $clog2(PSTWID-1)-1;
input clk;
input clk;
input ce;
input ce;
input [PSTWID-1:0] i;
input [PSTWID-1:0] i;
output reg [PSTWID-1:0] o;
output reg [PSTWID-1:0] o;
Line 47... Line 46...
wire zeri;
wire zeri;
wire infi;
wire infi;
wire inf = infi;
wire inf = infi;
wire zero = zeri;
wire zero = zeri;
 
 
positDecompose #(PSTWID,es) u1 (
positDecompose #(PSTWID) u1 (
  .i(i),
  .i(i),
  .sgn(si),
  .sgn(si),
  .rgs(rgsi),
  .rgs(rgsi),
  .rgm(rgmi),
  .rgm(rgmi),
  .exp(expi),
  .exp(expi),

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.