top_level.v 1.37 KB
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:      top_level
// description: Top Level Driver for vi_gamma module
//
// designer:    Kevin Luster
// date:        10/17/94
//
////////////////////////////////////////////////////////////////////////

`timescale 10ps / 10ps  //1unit = 0.01ns

module top_level();

wire vclk;
wire gamma_enable;
wire gamma_dither_enable;
wire [7:0] rgb;
wire [5:0] rand;
wire sync;
wire [6:0] gamma_rgb;
wire gamma_sync;	

//instance driver
driver driver (.vclk(vclk), .gamma_enable(gamma_enable), .gamma_dither_enable(gamma_dither_enable), .rgb(rgb), .rand(rand), .sync(sync));

//instance gamma
vi_gamma vi_gamma (.vclk(vclk), .gamma_enable(gamma_enable), .gamma_dither_enable(gamma_dither_enable), .rgb(rgb), .rand(rand), .sync(sync), .gamma_rgb(gamma_rgb), .gamma_sync(gamma_sync));

//instance display
display display (.vclk(vclk), .gamma_enable(gamma_enable), .gamma_dither_enable(gamma_dither_enable), .rgb(rgb), .rand(rand), .sync(sync), .gamma_rgb(gamma_rgb), .gamma_sync(gamma_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
    if ($test$plusargs("dump"))
      $dumpvars;
  end

endmodule // top_level