ewras.v 4.67 KB
/**************************************************************************
 *                                                                        *
 *               Copyright (C) 1994, Silicon Graphi, 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: ewras.v,v 1.1 2002/03/28 00:26:13 berndt Exp $

   /////////////////////////////////////////////////////////////////////////
   //
   // Project Reality
   //
   // module:      ewras
   // description: Edge-walker rasterizer
   //   
   //
   // designer:    Mike M. Cai   10/27/94
   //
   /////////////////////////////////////////////////////////////////////////
module ewras ( // outputs
      	       ew_cv_d, 
      	       x_major, x_minor, x_sc_major,
      	       x_sc_max, x_sc_min,
	       x_frac,
	       allxlmin, allxgemax,
	       equal_ym, end_prim_y,
      	       allx_invalid,
      	       yh,
      	       y_cur_lsb,
	       y_dither,
	       // inputs
	       cs_ew_d,
      	       switch_xl,
      	       ld_xmh, ld_dxmdy, ld_dxldy, ld_dxhdy,
      	       scbox_xmax, scbox_xmin,
      	       scbox_ymax, scbox_ymin,
	       sel_xval,
      	       ld_xmajor, clear_allxgemax, clear_xminor,
      	       left_xminor,
      	       ew_stall_x,
      	       ld_y, count_y, shift_xval,
      	       load_cmd_scissor, flush,
	       left_xmajor, cmp_cross_valid,
	       sc_field,
      	       reset_l,	       
	       gclk);
output [12:0]  ew_cv_d;
output [11:0]  x_major, x_minor, x_sc_major;
output [11:0]  x_sc_max, x_sc_min;
output [7:0]   x_frac;
output	       allxlmin, allxgemax;
output	       equal_ym, end_prim_y;
output 	       allx_invalid;
output [11:0]  yh;
output	       y_cur_lsb;
output [1:0]   y_dither;
input  [63:0]  cs_ew_d;
input 	       switch_xl;
input 	       ld_xmh, ld_dxmdy, ld_dxldy, ld_dxhdy;
input [11:0]   scbox_xmax, scbox_xmin,
	       scbox_ymax, scbox_ymin;
input 	       sel_xval;
input 	       ld_xmajor, clear_allxgemax, clear_xminor;
input 	       left_xminor;
input 	       ew_stall_x;
input 	       ld_y, count_y, shift_xval;
input 	       load_cmd_scissor, flush;
input 	       left_xmajor, cmp_cross_valid;
input 	       sc_field;
input 	       reset_l, gclk;

// ewx outputs
wire [19:0]    x_unsc;
wire  	       x_sticky;
// ewscx
wire [12:0]    ew_cv_d;
wire [11:0]    x_major, x_minor, x_sc_major;
wire [11:0]    x_sc_max, x_sc_min;
wire [7:0]     x_frac;
wire  	       allxlmin, allxgemax;
// ewscy
wire	       equal_ym;
wire	       end_prim_y, allx_invalid , y_invalid;
wire [3:0]     xval;
wire [11:0]    yh;
wire	       y_cur_lsb;
wire  	       edge_cross;
wire [1:0]     y_dither;

ewx   computex(	  // outputs
      	       	  .x(x_unsc), .x_sticky(x_sticky), .edge_cross(edge_cross),
		  //inputs
      	       	  .cs_ew_d(cs_ew_d), .switch_xl(switch_xl),
      	       	  .ld_xmh(ld_xmh), .ld_dxmdy(ld_dxmdy), 
		  .ld_dxldy(ld_dxldy), .ld_dxhdy(ld_dxhdy),
		  .left_xmajor(left_xmajor), .cmp_cross_valid(cmp_cross_valid),
		  .gclk(gclk));

ewscx scissorx(	  // outputs
      	       	  .x_sc(ew_cv_d), 
		  .x_major(x_major), .x_frac(x_frac),
		  .x_minor(x_minor), .x_sc_major(x_sc_major), 
		  .x_sc_max(x_sc_max), .x_sc_min(x_sc_min), 
		  .allxlmin(allxlmin), .allxgemax(allxgemax),
		  // inputs
      	       	  .x_unsc(x_unsc), .x_sticky(x_sticky),
		  .xval(xval), .sel_xval(sel_xval),
		  .scbox_xmax(scbox_xmax), .scbox_xmin(scbox_xmin),
      	       	  .ld_xmajor(ld_xmajor), 
		  .clear_allxgemax(clear_allxgemax),
		  .clear_xminor(clear_xminor),
		  .y_invalid(y_invalid),
		  .load_cmd(load_cmd_scissor), .left(left_xminor),
		  .ew_stall_x(ew_stall_x), .reset_l(reset_l), .gclk(gclk) );

ewscy scissory(	  // outputs
      	       	  .equal_ym(equal_ym),
		  .end_prim_y(end_prim_y),
		  .xval(xval), .allx_invalid(allx_invalid),
		  .y_invalid(y_invalid),
		  .yh_2ms(yh), .y_cur_lsb(y_cur_lsb),
		  .y_dither(y_dither),
		  // inputs
		  .cs_ew_d(cs_ew_d), 
		  .ld_y(ld_y),
		  .scbox_ymax(scbox_ymax), .scbox_ymin(scbox_ymin),
		  .count_y(count_y), .shift_xval(shift_xval),
		  .load_cmd(load_cmd_scissor), .flush(flush), 
		  .edge_cross(edge_cross), .sel_xval(sel_xval), 
		  .sc_field(sc_field), .gclk(gclk));

endmodule  //  ewras