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

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

module top_level();

wire vclk;
wire [4:0] frac;
wire [7:0] rgb_a;
wire [7:0] rgb_b;
wire sync_b;
wire [7:0] lerp_rgb;
wire lerp_sync;

//instance driver
driver driver (.vclk(vclk), .frac(frac), .rgb_a(rgb_a), .rgb_b(rgb_b), .sync_b(sync_b));

//instance lerp
vi_lerp vi_lerp (.vclk(vclk), .frac(frac), .rgb_a(rgb_a), .rgb_b(rgb_b), .sync_b(sync_b), .lerp_rgb(lerp_rgb), .lerp_sync(lerp_sync));

//instance display
display display (.vclk(vclk), .frac(frac), .rgb_a(rgb_a), .rgb_b(rgb_b), .sync_b(sync_b), .lerp_rgb(lerp_rgb), .lerp_sync(lerp_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