top_level.v 2.3 KB
////////////////////////////////////////////////////////////////////////
//
// 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