top_level.v
2.3 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
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: top_level
// description: Top Level Driver
//
// designer: Kevin Luster
// date: 10/11/94
//
////////////////////////////////////////////////////////////////////////
`timescale 10ps / 10ps //1unit = 0.01ns
module top_level();
wire vclk;
wire divot_enable;
wire [1:0] type;
wire aa_off;
wire gamma_dither_enable;
wire [5:0] rand;
wire [4:0] hfrac;
wire [4:0] vfrac;
wire [7:0] rgb0i;
wire [7:0] rgb1i;
wire [7:0] rgb2i;
wire [7:0] rgb3i;
wire [2:0] cvg0i;
wire [2:0] cvg1i;
wire [2:0] cvg2i;
wire [2:0] cvg3i;
wire synci;
wire [6:0] srgb;
wire sync;
reg dither_filter_enable;
//instance driver
driver driver (.vclk(vclk), .divot_enable(divot_enable), .type(type),
.aa_off(aa_off), .gamma_enable(gamma_enable),
.gamma_dither_enable(gamma_dither_enable), .rand(rand),
.hfrac(hfrac), .vfrac(vfrac), .rgb0i(rgb0i), .rgb1i(rgb1i),
.rgb2i(rgb2i), .rgb3i(rgb3i), .cvg0i(cvg0i), .cvg1i(cvg1i), .cvg2i(cvg2i),
.cvg3i(cvg3i), .synci(synci));
//instance video interface
vi_pipe vi_pipe (.vclk(vclk), .divot_enable(divot_enable), .type(type),
.aa_off(aa_off),
.dither_filter_enable(dither_filter_enable),
.gamma_enable(gamma_enable),
.gamma_dither_enable(gamma_dither_enable), .rand(rand),
.hfrac(hfrac), .vfrac(vfrac), .rgb0i(rgb0i), .rgb1i(rgb1i),
.rgb2i(rgb2i), .rgb3i(rgb3i), .cvg0i(cvg0i), .cvg1i(cvg1i),
.cvg2i(cvg2i), .cvg3i(cvg3i), .synci(synci), .srgb(srgb), .sync(sync));
//instance display
display display (.vclk(vclk), .divot_enable(divot_enable), .type(type),
.aa_off(aa_off), .gamma_enable(gamma_enable),
.gamma_dither_enable(gamma_dither_enable), .rand(rand),
.hfrac(hfrac), .vfrac(vfrac), .rgb0i(rgb0i), .rgb1i(rgb1i),
.rgb2i(rgb2i), .rgb3i(rgb3i), .cvg0i(cvg0i), .cvg1i(cvg1i),
.cvg2i(cvg2i), .cvg3i(cvg3i), .synci(synci), .srgb(srgb), .sync(sync));
// kill simulation when tabular file read
always @(driver.EndVectors)
begin
if ($close_output_files() == -1)
begin
$write("Cannot close output files");
end
$finish;
end
// dump file
initial
begin
dither_filter_enable = 1'b0;
if ($test$plusargs("dump"))
$dumpvars;
end
endmodule // top_level