display.v 757 Bytes
//
// Display for vi_filter_lerp
//
// 10/17/94 Kluster
//

module display(vclk, frac, rgb_a, rgb_b, sync_b, lerp_rgb, lerp_sync);
//
// Inputs
//
input			vclk;
input	[4:0]		frac;
input	[7:0]		rgb_a;
input	[7:0]		rgb_b;
input			sync_b;
input	[7:0]		lerp_rgb;
input			lerp_sync;		

reg	[1:256*8]	filename;

//
//  Open output file
//
initial
begin	
  if ($getstr$plusarg("out=", filename) == 1)
    begin	
      if ($open_out_file(filename) == -1)
        begin
          $write("Cannot open out file \n");
          $finish();
        end	
    end	
end


always @(posedge vclk) 
begin
  if ($output_lerp(frac, rgb_a, rgb_b, sync_b, lerp_rgb, lerp_sync) == -1)
    begin
      $write("Cannot write output values \n");
      $finish();
    end
end

endmodule