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

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [positVerilog/] [positFDP.sv] - Blame information for rev 42

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

Line No. Rev Author Line
1 42 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2020  Robert Finch, Waterloo
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch@finitron.ca
6
//       ||
7
//
8
//      positFDP.v
9
//    - posit number fused dot product
10
//    - parameterized width
11
//    - performs: a*b +/- c*d
12
//
13
//
14
// This source file is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU Lesser General Public License as published
16
// by the Free Software Foundation, either version 3 of the License, or
17
// (at your option) any later version.
18
//
19
// This source file is distributed in the hope that it will be useful,
20
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
// GNU General Public License for more details.
23
//
24
// You should have received a copy of the GNU General Public License
25
// along with this program.  If not, see .
26
//
27
// ============================================================================
28
 
29
`include "positConfig.sv"
30
 
31
module positFDP(op, a, b, c, d, o, zero, inf);
32
`include "positSize.sv"
33
input op;
34
input [PSTWID-1:0] a;
35
input [PSTWID-1:0] b;
36
input [PSTWID-1:0] c;
37
input [PSTWID-1:0] d;
38
output [PSTWID-1:0] o;
39
output zero;
40
output inf;
41
 
42
wire [PSTWID+es+(PSTWID-es)*2-1:0] o1;
43
wire [PSTWID+es+(PSTWID-es)*2-1:0] o2;
44
 
45
positFDPMul #(.PSTWID(PSTWID), .es(es)) u1 (a, b, o1, zero1, inf1);
46
positFDPMul #(.PSTWID(PSTWID), .es(es)) u2 (c, d, o2, zero2, inf2);
47
positFDPAddsub #(.PSTWID(PSTWID), .es(es)) u3 (op, o1, o2, o, zero, inf);
48
 
49
endmodule

powered by: WebSVN 2.1.0

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