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

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [verilog/] [fpSize.sv] - Blame information for rev 83

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 robfinch
// This file contains defintions for fields to ease dealing with different fp
2
// widths. Some of the code still needs to be modified to support widths
3
// other than standard 32,64 or 80 bit.
4
localparam MSB = WID-1;
5
localparam EMSB = WID==128 ? 14 :
6
          WID==96 ? 14 :
7
          WID==84 ? 14 :
8
          WID==80 ? 14 :
9
          WID==64 ? 10 :
10
                                  WID==52 ? 10 :
11
                                  WID==48 ? 10 :
12
                                  WID==44 ? 10 :
13
                                  WID==42 ? 10 :
14
                                  WID==40 ?  9 :
15
                                  WID==32 ?  7 :
16
                                  WID==24 ?  6 : 4;
17
localparam FMSB = WID==128 ? 111 :
18
          WID==96 ? 79 :
19
          WID==84 ? 67 :
20
          WID==80 ? 63 :
21
          WID==64 ? 51 :
22
                                  WID==52 ? 39 :
23
                                  WID==48 ? 35 :
24
                                  WID==44 ? 31 :
25
                                  WID==42 ? 29 :
26
                                  WID==40 ? 28 :
27
                                  WID==32 ? 22 :
28
                                  WID==24 ? 15 : 9;
29
localparam FX = (FMSB+2)*2;     // the MSB of the expanded fraction
30
localparam EX = FX + 1 + EMSB + 1 + 1 - 1;

powered by: WebSVN 2.1.0

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