cc_lerp.v
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: cc_lerp
// description: Lerp for color combine unit. 11 partial products.
//
// designer: Phil Gossett
// date: 6/19/94
//
////////////////////////////////////////////////////////////////////////
module cc_lerp (x, y, a, c, mp);
input [8:0] x; // positive subtract input
input [8:0] y; // negative subtract input
input [8:0] a; // multiply input
input [8:0] c; // final lerp add
wire [9:0] p0p; // pseudo-booth encoded partial products
wire [9:0] p1p;
wire [9:0] p2p;
wire [9:0] p3p;
wire [9:0] p4p;
wire [9:0] p5p;
wire [9:0] p6p;
wire [9:0] p7p;
wire [8:0] p8p;
output [16:0] mp; // final carry-propagated sum
cc_lerp_booth booth ( .x(x), .y(y), .a(a),
.p0p(p0p), .p1p(p1p), .p2p(p2p),
.p3p(p3p), .p4p(p4p), .p5p(p5p),
.p6p(p6p), .p7p(p7p), .p8p(p8p));
cc_lerp_csa csa ( .a(a),
.p0p(p0p), .p1p(p1p), .p2p(p2p),
.p3p(p3p), .p4p(p4p), .p5p(p5p),
.p6p(p6p), .p7p(p7p), .p8p(p8p),
.c(c), .mp(mp));
endmodule // cc_lerp