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

Subversion Repositories ft816float

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

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 48 robfinch
import posit::*;
30 42 robfinch
 
31
module positFDP(op, a, b, c, d, o, zero, inf);
32
input op;
33
input [PSTWID-1:0] a;
34
input [PSTWID-1:0] b;
35
input [PSTWID-1:0] c;
36
input [PSTWID-1:0] d;
37
output [PSTWID-1:0] o;
38
output zero;
39
output inf;
40
 
41
wire [PSTWID+es+(PSTWID-es)*2-1:0] o1;
42
wire [PSTWID+es+(PSTWID-es)*2-1:0] o2;
43
 
44 48 robfinch
positFDPMul u1 (a, b, o1, zero1, inf1);
45
positFDPMul u2 (c, d, o2, zero2, inf2);
46
positFDPAddsub u3 (op, o1, o2, o, zero, inf);
47 42 robfinch
 
48
endmodule

powered by: WebSVN 2.1.0

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