cv.v 2.85 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.1 2002/03/28 00:26:13 berndt 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, 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, 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),
		     .gclk(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), .gclk(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), 
		  .gclk(gclk)
		  );
assign  x_dither[1:0] = x_cur[1:0];

endmodule  //  cv