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

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [verilog/] [fpSigmoid.v] - Diff between revs 18 and 26

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

Rev 18 Rev 26
Line 41... Line 41...
`define EIGHT32                         32'h42000000
`define EIGHT32                         32'h42000000
`define FIVETWELVE32    32'h48000000
`define FIVETWELVE32    32'h48000000
 
 
module fpSigmoid(clk, ce, a, o);
module fpSigmoid(clk, ce, a, o);
parameter WID = 128;
parameter WID = 128;
localparam MSB = WID-1;
`include "fpSize.sv"
localparam EMSB = WID==128 ? 14 :
 
                  WID==96 ? 14 :
 
                  WID==80 ? 14 :
 
                  WID==64 ? 10 :
 
                                  WID==52 ? 10 :
 
                                  WID==48 ? 11 :
 
                                  WID==44 ? 10 :
 
                                  WID==42 ? 10 :
 
                                  WID==40 ?  9 :
 
                                  WID==32 ?  7 :
 
                                  WID==24 ?  6 : 4;
 
localparam FMSB = WID==128 ? 111 :
 
                  WID==96 ? 79 :
 
                  WID==80 ? 63 :
 
                  WID==64 ? 51 :
 
                                  WID==52 ? 39 :
 
                                  WID==48 ? 34 :
 
                                  WID==44 ? 31 :
 
                                  WID==42 ? 29 :
 
                                  WID==40 ? 28 :
 
                                  WID==32 ? 22 :
 
                                  WID==24 ? 15 : 9;
 
input clk;
input clk;
input ce;
input ce;
input [WID-1:0] a;
input [WID-1:0] a;
output reg [WID-1:0] o;
output reg [WID-1:0] o;
 
 
Line 100... Line 78...
end
end
end
end
endgenerate
endgenerate
 
 
initial begin
initial begin
`include "D:\Cores6\rtfItanium\v1\rtl\fpUnit\SigTbl.ver"
`include "D:\Cores6\nvio\v1\rtl\fpUnit\SigTbl.ver"
end
end
 
 
// Quickly multiply number by 64 (it is in range -8 to 8) then convert to integer to get
// Quickly multiply number by 64 (it is in range -8 to 8) then convert to integer to get
// table index = add 6 to exponent then convert to integer
// table index = add 6 to exponent then convert to integer
wire sa;
wire sa;

powered by: WebSVN 2.1.0

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