URL
https://opencores.org/ocsvn/ft816float/ft816float/trunk
Show entire file |
Details |
Blame |
View Log
Rev 43 |
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
|
// ||
|
// ||
|
//
|
//
|
// positDivide.sv
|
// div_lut.sv
|
// - posit number division function
|
// - divide reciprocal lookup table
|
// - parameterized width
|
// - 2048 entries (1 block ram)
|
//
|
//
|
//
|
//
|
// 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
|
// it under the terms of the GNU Lesser General Public License as published
|
// it under the terms of the GNU Lesser General Public License as published
|
// by the Free Software Foundation, either version 3 of the License, or
|
// by the Free Software Foundation, either version 3 of the License, or
|
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 .
|
//
|
//
|
// ============================================================================
|
// ============================================================================
|
|
|
module div_lut(clk, i, o);
|
module div_lut(clk, ce, i, o);
|
input clk;
|
input clk;
|
|
input ce;
|
input [10:0] i;
|
input [10:0] i;
|
output reg [15:0] o;
|
output reg [15:0] o;
|
|
|
always @(posedge clk)
|
always @(posedge clk)
|
|
if (ce)
|
case(i)
|
case(i)
|
11'h000: o <= 16'hFFFF;
|
11'h000: o <= 16'hFFFF;
|
11'h001: o <= 16'hFFE0;
|
11'h001: o <= 16'hFFE0;
|
11'h002: o <= 16'hFFC0;
|
11'h002: o <= 16'hFFC0;
|
11'h003: o <= 16'hFFA0;
|
11'h003: o <= 16'hFFA0;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.