cvgtest.v
3.68 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
*************************************************************************/
// $Id: cvgtest.v,v 1.1 2002/03/28 00:26:13 berndt Exp $
/* Project Reality
MDP
Created by Mike M. Cai 6/6/94
*/
`timescale 100 ps / 100 ps
module cvgtest;
reg [9:0] px;
reg [11:0] xmin0_, xmin1_, xmin2_, xmin3_,
xmax0_, xmax1_, xmax2_, xmax3_;
reg [3:0] x_val;
wire [3:0] cv_value;
wire mask15;
wire [1:0] x_offset, y_offset;
parameter cycle = 160;
cvg cvg1 ( cv_value, mask15, x_offset, y_offset,
px,
xmin0_, xmin1_, xmin2_, xmin3_,
xmax0_, xmax1_, xmax2_, xmax3_,
x_val);
initial
begin
px = 10'h0; // 1
xmin0_ = 12'h0;
xmin1_ = 12'h0;
xmin2_ = 12'h0;
xmin3_ = 12'h0;
xmax0_ = 12'h0;
xmax1_ = 12'h0;
xmax2_ = 12'h0;
xmax3_ = 12'h0;
x_val = 4'hf;
#cycle px = 10'h4; // 2
xmin0_ = 12'h14;
xmin1_ = 12'h14;
xmin2_ = 12'h14;
xmin3_ = 12'h14;
xmax0_ = 12'h24;
xmax1_ = 12'h24;
xmax2_ = 12'h24;
xmax3_ = 12'h24;
x_val = 4'hf;
#cycle px = 10'ha; // 3
xmin0_ = 12'h14;
xmin1_ = 12'h14;
xmin2_ = 12'h14;
xmin3_ = 12'h14;
xmax0_ = 12'h24;
xmax1_ = 12'h24;
xmax2_ = 12'h24;
xmax3_ = 12'h24;
x_val = 4'hf;
#cycle px = 10'h4; // 4
xmin0_ = 12'h8;
xmin1_ = 12'h8;
xmin2_ = 12'h8;
xmin3_ = 12'h8;
xmax0_ = 12'h1c;
xmax1_ = 12'h1c;
xmax2_ = 12'h1c;
xmax3_ = 12'h1c;
x_val = 4'hf;
#cycle px = 10'h4; // 5
xmin0_ = 12'h15;
xmin1_ = 12'h14;
xmin2_ = 12'h12;
xmin3_ = 12'hf;
xmax0_ = 12'h1c;
xmax1_ = 12'h1c;
xmax2_ = 12'h1c;
xmax3_ = 12'h1c;
x_val = 4'hf;
#cycle px = 10'h4; // 6
xmin0_ = 12'h15;
xmin1_ = 12'h14;
xmin2_ = 12'h12;
xmin3_ = 12'hf;
xmax0_ = 12'h1c;
xmax1_ = 12'h1c;
xmax2_ = 12'h1c;
xmax3_ = 12'h1c;
x_val = 4'h7;
#cycle px = 10'h4; // 7
xmin0_ = 12'h8;
xmin1_ = 12'h8;
xmin2_ = 12'h8;
xmin3_ = 12'h8;
xmax0_ = 12'hd;
xmax1_ = 12'hf;
xmax2_ = 12'h11;
xmax3_ = 12'h12;
x_val = 4'hf;
#cycle px = 10'h4; // 8
xmin0_ = 12'h13;
xmin1_ = 12'h12;
xmin2_ = 12'h11;
xmin3_ = 12'h10;
xmax0_ = 12'h10;
xmax1_ = 12'h12;
xmax2_ = 12'h13;
xmax3_ = 12'h15;
x_val = 4'he;
end
initial
$monitor ( "%0d ", $time,
"px %h ", px,
"xmin0,1,2,3 %h %h %h %h ", xmin0_, xmin1_, xmin2_, xmin3_,
"xmax0,1,2,3 %h %h %h %h ", xmax0_, xmax1_, xmax2_, xmax3_,
"x_val %h ", x_val,
"l_mask %h ", cvg1.maskone.mask_l,
"r_mask %h ", cvg1.maskone.mask_r,
"cv_value %h ", cv_value,
"mask15 %b ", mask15,
"x, y_offset %b %b ", x_offset, y_offset);
endmodule // cvgtest