cc_key_clamp.v
4.23 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Module instances modified by /home/rws/workarea/rf/sw/bbplayer/tools/necprimfix
//
// 24 instances of an02d1h changed to j_an02.
// 3 instances of ni01d4 changed to j_ni01.
// 24 instances of or02d1 changed to j_or02.
// 3 instances of or08d2 changed to j_or08.
//
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: cc_key_clamp
// description: Clamp for color key for color combine unit.
//
// designer: Phil Gossett
// date: 9/20/94
//
////////////////////////////////////////////////////////////////////////
module cc_key_clamp (r, g, b, clmp_r, clmp_g, clmp_b);
input [16:0] r;
input [16:0] g;
input [16:0] b;
output [7:0] clmp_r;
output [7:0] clmp_g;
output [7:0] clmp_b;
wire or_r;
wire or_g;
wire or_b;
wire [7:0] p_clmp_r;
wire [7:0] p_clmp_g;
wire [7:0] p_clmp_b;
wire r16;
wire g16;
wire b16;
j_or08 orr8 ( .a1(r[ 8]), .a2(r[ 9]), .a3(r[10]), .a4(r[11]),
.a5(r[12]), .a6(r[13]), .a7(r[14]), .a8(r[15]), .z(or_r));
j_or08 org8 ( .a1(g[ 8]), .a2(g[ 9]), .a3(g[10]), .a4(g[11]),
.a5(g[12]), .a6(g[13]), .a7(g[14]), .a8(g[15]), .z(or_g));
j_or08 orb8 ( .a1(b[ 8]), .a2(b[ 9]), .a3(b[10]), .a4(b[11]),
.a5(b[12]), .a6(b[13]), .a7(b[14]), .a8(b[15]), .z(or_b));
j_or02 orr0 ( .a1( or_r), .a2( r[0]), .z(p_clmp_r[0]));
j_or02 orr1 ( .a1( or_r), .a2( r[1]), .z(p_clmp_r[1]));
j_or02 orr2 ( .a1( or_r), .a2( r[2]), .z(p_clmp_r[2]));
j_or02 orr3 ( .a1( or_r), .a2( r[3]), .z(p_clmp_r[3]));
j_or02 orr4 ( .a1( or_r), .a2( r[4]), .z(p_clmp_r[4]));
j_or02 orr5 ( .a1( or_r), .a2( r[5]), .z(p_clmp_r[5]));
j_or02 orr6 ( .a1( or_r), .a2( r[6]), .z(p_clmp_r[6]));
j_or02 orr7 ( .a1( or_r), .a2( r[7]), .z(p_clmp_r[7]));
j_or02 org0 ( .a1( or_g), .a2( g[0]), .z(p_clmp_g[0]));
j_or02 org1 ( .a1( or_g), .a2( g[1]), .z(p_clmp_g[1]));
j_or02 org2 ( .a1( or_g), .a2( g[2]), .z(p_clmp_g[2]));
j_or02 org3 ( .a1( or_g), .a2( g[3]), .z(p_clmp_g[3]));
j_or02 org4 ( .a1( or_g), .a2( g[4]), .z(p_clmp_g[4]));
j_or02 org5 ( .a1( or_g), .a2( g[5]), .z(p_clmp_g[5]));
j_or02 org6 ( .a1( or_g), .a2( g[6]), .z(p_clmp_g[6]));
j_or02 org7 ( .a1( or_g), .a2( g[7]), .z(p_clmp_g[7]));
j_or02 orb0 ( .a1( or_b), .a2( b[0]), .z(p_clmp_b[0]));
j_or02 orb1 ( .a1( or_b), .a2( b[1]), .z(p_clmp_b[1]));
j_or02 orb2 ( .a1( or_b), .a2( b[2]), .z(p_clmp_b[2]));
j_or02 orb3 ( .a1( or_b), .a2( b[3]), .z(p_clmp_b[3]));
j_or02 orb4 ( .a1( or_b), .a2( b[4]), .z(p_clmp_b[4]));
j_or02 orb5 ( .a1( or_b), .a2( b[5]), .z(p_clmp_b[5]));
j_or02 orb6 ( .a1( or_b), .a2( b[6]), .z(p_clmp_b[6]));
j_or02 orb7 ( .a1( or_b), .a2( b[7]), .z(p_clmp_b[7]));
j_ni01 ivr ( .i(r[16]), .z(r16));
j_ni01 ivg ( .i(g[16]), .z(g16));
j_ni01 ivb ( .i(b[16]), .z(b16));
j_an02 anr0 ( .a1(r16), .a2(p_clmp_r[0]), .z( clmp_r[0]));
j_an02 anr1 ( .a1(r16), .a2(p_clmp_r[1]), .z( clmp_r[1]));
j_an02 anr2 ( .a1(r16), .a2(p_clmp_r[2]), .z( clmp_r[2]));
j_an02 anr3 ( .a1(r16), .a2(p_clmp_r[3]), .z( clmp_r[3]));
j_an02 anr4 ( .a1(r16), .a2(p_clmp_r[4]), .z( clmp_r[4]));
j_an02 anr5 ( .a1(r16), .a2(p_clmp_r[5]), .z( clmp_r[5]));
j_an02 anr6 ( .a1(r16), .a2(p_clmp_r[6]), .z( clmp_r[6]));
j_an02 anr7 ( .a1(r16), .a2(p_clmp_r[7]), .z( clmp_r[7]));
j_an02 ang0 ( .a1(g16), .a2(p_clmp_g[0]), .z( clmp_g[0]));
j_an02 ang1 ( .a1(g16), .a2(p_clmp_g[1]), .z( clmp_g[1]));
j_an02 ang2 ( .a1(g16), .a2(p_clmp_g[2]), .z( clmp_g[2]));
j_an02 ang3 ( .a1(g16), .a2(p_clmp_g[3]), .z( clmp_g[3]));
j_an02 ang4 ( .a1(g16), .a2(p_clmp_g[4]), .z( clmp_g[4]));
j_an02 ang5 ( .a1(g16), .a2(p_clmp_g[5]), .z( clmp_g[5]));
j_an02 ang6 ( .a1(g16), .a2(p_clmp_g[6]), .z( clmp_g[6]));
j_an02 ang7 ( .a1(g16), .a2(p_clmp_g[7]), .z( clmp_g[7]));
j_an02 anb0 ( .a1(b16), .a2(p_clmp_b[0]), .z( clmp_b[0]));
j_an02 anb1 ( .a1(b16), .a2(p_clmp_b[1]), .z( clmp_b[1]));
j_an02 anb2 ( .a1(b16), .a2(p_clmp_b[2]), .z( clmp_b[2]));
j_an02 anb3 ( .a1(b16), .a2(p_clmp_b[3]), .z( clmp_b[3]));
j_an02 anb4 ( .a1(b16), .a2(p_clmp_b[4]), .z( clmp_b[4]));
j_an02 anb5 ( .a1(b16), .a2(p_clmp_b[5]), .z( clmp_b[5]));
j_an02 anb6 ( .a1(b16), .a2(p_clmp_b[6]), .z( clmp_b[6]));
j_an02 anb7 ( .a1(b16), .a2(p_clmp_b[7]), .z( clmp_b[7]));
endmodule // cc_key_clamp