Skip to content

Commit 3736c4c

Browse files
committed
Change license of package
1 parent 962b37d commit 3736c4c

File tree

1 file changed

+67
-71
lines changed

1 file changed

+67
-71
lines changed

hdl/defs_div_sqrt_mvp.sv

Lines changed: 67 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,83 @@
1-
///////////////////////////////////////////////////////////////////////////////
2-
// This file contains all div_sqrt_top_mvp parameters
1+
// Copyright 2018 ETH Zurich and University of Bologna.
2+
// Copyright and related rights are licensed under the Solderpad Hardware
3+
// License, Version 0.51 (the “License”); you may not use this file except in
4+
// compliance with the License. You may obtain a copy of the License at
5+
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
6+
// or agreed to in writing, software, hardware and materials distributed under
7+
// this License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
8+
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
9+
// specific language governing permissions and limitations under the License.
310
//
11+
// This file contains all div_sqrt_top_mvp parameters
412
// Authors : Lei Li (lile@iis.ee.ethz.ch)
5-
//
6-
//
7-
// Copyright (c) 2018 Integrated Systems Laboratory, ETH Zurich
8-
///////////////////////////////////////////////////////////////////////////////
9-
1013

1114
package defs_div_sqrt_mvp;
1215

1316
// op command
17+
localparam C_RM = 3;
18+
localparam C_RM_NEAREST = 3'h0;
19+
localparam C_RM_TRUNC = 3'h1;
20+
localparam C_RM_PLUSINF = 3'h2;
21+
localparam C_RM_MINUSINF = 3'h3;
22+
localparam C_PC = 6; // Precision Control
23+
localparam C_FS = 2; // Format Selection
24+
localparam C_IUNC = 2; // Iteration Unit Number Control
25+
localparam Iteration_unit_num_S = 2'b10;
1426

15-
parameter C_RM = 3;
16-
parameter C_RM_NEAREST = 3'h0;
17-
parameter C_RM_TRUNC = 3'h1;
18-
parameter C_RM_PLUSINF = 3'h2;
19-
parameter C_RM_MINUSINF = 3'h3;
20-
parameter C_PC = 6; //Precision Control
21-
parameter C_FS = 2; //Format Selection
22-
parameter C_IUNC = 2; //Iteration Unit Number Control
23-
parameter Iteration_unit_num_S = 2'b10;
2427
// FP64
25-
26-
parameter C_OP_FP64 = 64;
27-
parameter C_MANT_FP64 = 52;
28-
parameter C_EXP_FP64 = 11;
29-
parameter C_BIAS_FP64 = 1023;
30-
parameter C_BIAS_AONE_FP64 = 11'h400;
31-
parameter C_HALF_BIAS_FP64 = 511;
32-
parameter C_EXP_ZERO_FP64 = 11'h000;
33-
parameter C_EXP_ONE_FP64 = 13'h001; // Bit width is in agreement with in norm
34-
parameter C_EXP_INF_FP64 = 11'h7FF;
35-
parameter C_MANT_ZERO_FP64 = 52'h0;
36-
parameter C_MANT_NAN_FP64 = 52'h8_0000_0000_0000;
37-
parameter C_PZERO_FP64 = 64'h0000_0000_0000_0000;
38-
parameter C_MZERO_FP64 = 64'h8000_0000_0000_0000;
39-
parameter C_QNAN_FP64 = 64'h7FF8_0000_0000_0000;
28+
localparam C_OP_FP64 = 64;
29+
localparam C_MANT_FP64 = 52;
30+
localparam C_EXP_FP64 = 11;
31+
localparam C_BIAS_FP64 = 1023;
32+
localparam C_BIAS_AONE_FP64 = 11'h400;
33+
localparam C_HALF_BIAS_FP64 = 511;
34+
localparam C_EXP_ZERO_FP64 = 11'h000;
35+
localparam C_EXP_ONE_FP64 = 13'h001; // Bit width is in agreement with in norm
36+
localparam C_EXP_INF_FP64 = 11'h7FF;
37+
localparam C_MANT_ZERO_FP64 = 52'h0;
38+
localparam C_MANT_NAN_FP64 = 52'h8_0000_0000_0000;
39+
localparam C_PZERO_FP64 = 64'h0000_0000_0000_0000;
40+
localparam C_MZERO_FP64 = 64'h8000_0000_0000_0000;
41+
localparam C_QNAN_FP64 = 64'h7FF8_0000_0000_0000;
4042

4143
// FP32
42-
43-
parameter C_OP_FP32 = 32;
44-
parameter C_MANT_FP32 = 23;
45-
parameter C_EXP_FP32 = 8;
46-
parameter C_BIAS_FP32 = 127;
47-
parameter C_BIAS_AONE_FP32 = 8'h80;
48-
parameter C_HALF_BIAS_FP32 = 63;
49-
parameter C_EXP_ZERO_FP32 = 8'h00;
50-
parameter C_EXP_INF_FP32 = 8'hFF;
51-
parameter C_MANT_ZERO_FP32 = 23'h0;
52-
parameter C_PZERO_FP32 = 32'h0000_0000;
53-
parameter C_MZERO_FP32 = 32'h8000_0000;
54-
parameter C_QNAN_FP32 = 32'h7FC0_0000;
55-
44+
localparam C_OP_FP32 = 32;
45+
localparam C_MANT_FP32 = 23;
46+
localparam C_EXP_FP32 = 8;
47+
localparam C_BIAS_FP32 = 127;
48+
localparam C_BIAS_AONE_FP32 = 8'h80;
49+
localparam C_HALF_BIAS_FP32 = 63;
50+
localparam C_EXP_ZERO_FP32 = 8'h00;
51+
localparam C_EXP_INF_FP32 = 8'hFF;
52+
localparam C_MANT_ZERO_FP32 = 23'h0;
53+
localparam C_PZERO_FP32 = 32'h0000_0000;
54+
localparam C_MZERO_FP32 = 32'h8000_0000;
55+
localparam C_QNAN_FP32 = 32'h7FC0_0000;
5656

5757
// FP16
58-
59-
parameter C_OP_FP16 = 16;
60-
parameter C_MANT_FP16 = 10;
61-
parameter C_EXP_FP16 = 5;
62-
parameter C_BIAS_FP16 = 15;
63-
parameter C_BIAS_AONE_FP16 = 5'h10;
64-
parameter C_HALF_BIAS_FP16 = 7;
65-
parameter C_EXP_ZERO_FP16 = 5'h00;
66-
parameter C_EXP_INF_FP16 = 5'h1F;
67-
parameter C_MANT_ZERO_FP16 = 10'h0;
68-
parameter C_PZERO_FP16 = 16'h0000;
69-
parameter C_MZERO_FP16 = 16'h8000;
70-
parameter C_QNAN_FP16 = 16'h7E00;
71-
58+
localparam C_OP_FP16 = 16;
59+
localparam C_MANT_FP16 = 10;
60+
localparam C_EXP_FP16 = 5;
61+
localparam C_BIAS_FP16 = 15;
62+
localparam C_BIAS_AONE_FP16 = 5'h10;
63+
localparam C_HALF_BIAS_FP16 = 7;
64+
localparam C_EXP_ZERO_FP16 = 5'h00;
65+
localparam C_EXP_INF_FP16 = 5'h1F;
66+
localparam C_MANT_ZERO_FP16 = 10'h0;
67+
localparam C_PZERO_FP16 = 16'h0000;
68+
localparam C_MZERO_FP16 = 16'h8000;
69+
localparam C_QNAN_FP16 = 16'h7E00;
7270

7371
// FP16alt
74-
75-
parameter C_OP_FP16ALT = 16;
76-
parameter C_MANT_FP16ALT = 7;
77-
parameter C_EXP_FP16ALT = 8;
78-
parameter C_BIAS_FP16ALT = 127;
79-
parameter C_BIAS_AONE_FP16ALT = 8'h80;
80-
parameter C_HALF_BIAS_FP16ALT = 63;
81-
parameter C_EXP_ZERO_FP16ALT = 8'h00;
82-
parameter C_EXP_INF_FP16ALT = 8'hFF;
83-
parameter C_MANT_ZERO_FP16ALT = 7'h0;
84-
parameter C_QNAN_FP16ALT = 16'h7FC0;
85-
72+
localparam C_OP_FP16ALT = 16;
73+
localparam C_MANT_FP16ALT = 7;
74+
localparam C_EXP_FP16ALT = 8;
75+
localparam C_BIAS_FP16ALT = 127;
76+
localparam C_BIAS_AONE_FP16ALT = 8'h80;
77+
localparam C_HALF_BIAS_FP16ALT = 63;
78+
localparam C_EXP_ZERO_FP16ALT = 8'h00;
79+
localparam C_EXP_INF_FP16ALT = 8'hFF;
80+
localparam C_MANT_ZERO_FP16ALT = 7'h0;
81+
localparam C_QNAN_FP16ALT = 16'h7FC0;
8682

8783
endpackage : defs_div_sqrt_mvp

0 commit comments

Comments
 (0)