cv.v 2.94 KB
/**************************************************************************
 *                                                                        *
 *               Copyright (C) 1994, Silicon Graphics, Inc.               *
 *                                                                        *
 *  These coded instructions, statements, and computer programs  contain  *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
 *  are protected by Federal copyright  law.  They  may not be disclosed  *
 *  to  third  parties  or copied or duplicated in any form, in whole or  *
 *  in part, without the prior written consent of Silicon Graphics, Inc.  *
 *                                                                        *
 *************************************************************************/
// $Id: cv.v,v 1.3 2002/12/10 21:46:58 rws Exp $

   /////////////////////////////////////////////////////////////////////////
   //
   // Project Reality
   //
   // module:      cv
   // description: coverage unit top level module
   //   
   //
   // designer:    Mike M. Cai   7/19/94
   //
   /////////////////////////////////////////////////////////////////////////

module cv(  cv_value, mask15, x_offset, y_offset, x_dither,
      	    ew_cv_data, ew_cv_start_x,
	    cycle_type,
	    ew_cv_newspan, left, reset_l, clk, start_gclk);
output [3:0]   cv_value;
output	       mask15;
output [1:0]   x_offset, y_offset;
output [1:0]   x_dither;
input [12:0]   ew_cv_data;
input [11:0]   ew_cv_start_x;
input 	       cycle_type;  // lsb of cycle_type
input 	       ew_cv_newspan, left, reset_l, clk, start_gclk;

//cvpipe wires
wire [3:0]     xval;
wire [12:0]    xmin0_, xmin1_, xmin2_, xmin3_, 
      	       xmax0_, xmax1_, xmax2_, xmax3_;
// cvxcnt wires
wire [11:0]    x_cur;

// cvg wires
wire [3:0]     cv_value;
wire  	       mask15;
wire [1:0]     x_offset, y_offset;
wire [1:0]     x_dither;

cvpipe	 cvpipeline( //outputs
      	       	     .xval(xval),
		     .xmax0_(xmax0_), .xmax1_(xmax1_),
		     .xmax2_(xmax2_), .xmax3_(xmax3_),
	       	     .xmin0_(xmin0_), .xmin1_(xmin1_), 
		     .xmin2_(xmin2_), .xmin3_(xmin3_), 
		     // inputs
		     .x_sc(ew_cv_data), .left(left),
		     .new_span(ew_cv_newspan),
		     .clk(clk), .start_gclk(start_gclk));

cvxcnt	 countx(  // outputs
      	       	  .x_cur(x_cur),
		  // inputs
		  .ew_cv_start_x(ew_cv_start_x),
		  .ncyc(cycle_type),
		  .new_span(ew_cv_newspan),
		  .left(left),
		  .reset_l(reset_l), .clk(clk), .start_gclk(start_gclk)
		  );

cvg   coverage(	  // outputs
      	       	  .cv_value(cv_value), .mask15(mask15),
		  .x_offset(x_offset), .y_offset(y_offset),
		  // inputs
		  .x_cur(x_cur),
		  .xmin0_(xmin0_), .xmin1_(xmin1_), 
		  .xmin2_(xmin2_), .xmin3_(xmin3_), 
	       	  .xmax0_(xmax0_), .xmax1_(xmax1_), 
		  .xmax2_(xmax2_), .xmax3_(xmax3_),
	       	  .x_val(xval), 
		  .clk(clk), .start_gclk(start_gclk)
		  );
assign  x_dither[1:0] = x_cur[1:0];

endmodule  //  cv