cvgtest.v 3.68 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: cvgtest.v,v 1.1 2002/05/21 23:55:43 berndt Exp $

/*      Project Reality
        MDP
        Created by Mike M. Cai  6/6/94
*/

`timescale 100 ps / 100 ps

module cvgtest;
reg [9:0]      px;
reg [11:0]     xmin0_, xmin1_, xmin2_, xmin3_, 
      	       xmax0_, xmax1_, xmax2_, xmax3_;
reg [3:0]      x_val;

wire [3:0]     cv_value;
wire  	       mask15;
wire [1:0]     x_offset, y_offset;
parameter      cycle = 160;

cvg   cvg1 ( cv_value, mask15, x_offset, y_offset,
      	     px,
	     xmin0_, xmin1_, xmin2_, xmin3_, 
      	     xmax0_, xmax1_, xmax2_, xmax3_,
	     x_val);
	     
initial
   begin
      px = 10'h0;    	   // 1
      xmin0_ = 12'h0;
      xmin1_ = 12'h0;
      xmin2_ = 12'h0;
      xmin3_ = 12'h0;
      xmax0_ = 12'h0;
      xmax1_ = 12'h0;
      xmax2_ = 12'h0;
      xmax3_ = 12'h0;
      x_val = 4'hf;
      #cycle px = 10'h4;   // 2
      xmin0_ = 12'h14;
      xmin1_ = 12'h14;
      xmin2_ = 12'h14;
      xmin3_ = 12'h14;
      xmax0_ = 12'h24;
      xmax1_ = 12'h24;
      xmax2_ = 12'h24;
      xmax3_ = 12'h24;
      x_val = 4'hf;
      #cycle px = 10'ha;   // 3
      xmin0_ = 12'h14;
      xmin1_ = 12'h14;
      xmin2_ = 12'h14;
      xmin3_ = 12'h14;
      xmax0_ = 12'h24;
      xmax1_ = 12'h24;
      xmax2_ = 12'h24;
      xmax3_ = 12'h24;
      x_val = 4'hf;
      #cycle px = 10'h4;   // 4
      xmin0_ = 12'h8;
      xmin1_ = 12'h8;
      xmin2_ = 12'h8;
      xmin3_ = 12'h8;
      xmax0_ = 12'h1c;
      xmax1_ = 12'h1c;
      xmax2_ = 12'h1c;
      xmax3_ = 12'h1c;
      x_val = 4'hf;
      #cycle px = 10'h4;   // 5
      xmin0_ = 12'h15;
      xmin1_ = 12'h14;
      xmin2_ = 12'h12;
      xmin3_ = 12'hf;
      xmax0_ = 12'h1c;
      xmax1_ = 12'h1c;
      xmax2_ = 12'h1c;
      xmax3_ = 12'h1c;
      x_val = 4'hf;
      #cycle px = 10'h4;   // 6
      xmin0_ = 12'h15;
      xmin1_ = 12'h14;
      xmin2_ = 12'h12;
      xmin3_ = 12'hf;
      xmax0_ = 12'h1c;
      xmax1_ = 12'h1c;
      xmax2_ = 12'h1c;
      xmax3_ = 12'h1c;
      x_val = 4'h7;
      #cycle px = 10'h4;   // 7
      xmin0_ = 12'h8;
      xmin1_ = 12'h8;
      xmin2_ = 12'h8;
      xmin3_ = 12'h8;
      xmax0_ = 12'hd;
      xmax1_ = 12'hf;
      xmax2_ = 12'h11;
      xmax3_ = 12'h12;
      x_val = 4'hf;
      #cycle px = 10'h4;   // 8
      xmin0_ = 12'h13;
      xmin1_ = 12'h12;
      xmin2_ = 12'h11;
      xmin3_ = 12'h10;
      xmax0_ = 12'h10;
      xmax1_ = 12'h12;
      xmax2_ = 12'h13;
      xmax3_ = 12'h15;
      x_val = 4'he;
   end   
      
initial
   $monitor ( "%0d ", $time,
      "px %h ", px,
      "xmin0,1,2,3 %h %h %h %h ", xmin0_, xmin1_, xmin2_, xmin3_,
      "xmax0,1,2,3 %h %h %h %h ", xmax0_, xmax1_, xmax2_, xmax3_,
      "x_val %h ", x_val,
      "l_mask %h ", cvg1.maskone.mask_l,
      "r_mask %h ", cvg1.maskone.mask_r,
      "cv_value %h ", cv_value,
      "mask15 %b ", mask15,
      "x, y_offset %b %b ", x_offset, y_offset);
      
endmodule  //  cvgtest