ewatt.v 3.86 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: ewatt.v,v 1.1 2002/03/28 00:26:13 berndt Exp $

   /////////////////////////////////////////////////////////////////////////
   //
   // Project Reality
   //
   // module:      ewatt
   // description: Outputs the initial attribute for a span
   //   
   //
   // designer:    Mike M. Cai   5/10/94
   //
   /////////////////////////////////////////////////////////////////////////

module ewatt(ew_ep_d,
      	       cs_ew_data, 
	       dxr, dxg, dxb, dxa, dxz, dxs, dxt, dxw, // dxl,
	       dyr, dyg, dyb, dya, dyz, dys, dyt, dyw, // dyl,
	       x_frac, ld_x_frac,
	       wa_addr, wen_a, wde_addr, wen_de, ra_addr, rb_addr,
	       add32b, add_clear, ld_a,
	       shuffle, noshuffle,
	       seldy, // seldx is same as seldy
	       ew_stall_attr, left, sign_dxdy,
	       cycle_type, load_cmd,
	       gclk);  
	       
output [21:0]  ew_ep_d; 
input [31:0]   cs_ew_data;
input [22:0]   dxr, dxg, dxb, dxa, dxz, dxs, dxt, dxw, // dxl,
      	       dyr, dyg, dyb, dya, dyz, dys, dyt, dyw; // dyl;
input [7:0]    x_frac;
input 	       ld_x_frac;
input [3:0]    wa_addr, wde_addr;
input [3:0]    ra_addr, rb_addr; // a-port for att, b-port for da/de
input 	       wen_a, wen_de;
input	       add32b, add_clear, ld_a,
	       shuffle, noshuffle;
input 	       ew_stall_attr, left,
      	       sign_dxdy;
input [3:0]    seldy; // seldx;
input [1:0]    cycle_type; 
input 	       load_cmd;
input 	       gclk;

// RF outputs
wire [31:0]    ra_data, rb_data;
// ewattadder outputs
wire [31:0]    wa_data;
// ewshuffle outputs
wire [22:0]    shuffleatt, shuffledade;
// ewattseldxdy outputs
wire [22:0]    dx_curr, dy_curr;
// ewattoffset outputs
wire [21:0]    ew_ep_d;

ewrf32b18w regfile ( .wa_data(wa_data), .wa_addr(wa_addr), .wen_a(wen_a),
      	       	     .wde_data(cs_ew_data), .wde_addr(wde_addr), .wen_de(wen_de),
      	       	     .ra_addr(ra_addr), .rb_addr(rb_addr), 
		     .ra_data(ra_data), .rb_data(rb_data),
		     .ew_stall_attr(ew_stall_attr), .gclk(gclk));
		     
ewattadder  addit (  .wa_data(wa_data),
      	       	     .in_att(ra_data), .in_dade(rb_data),
		     .cs_ew_data(cs_ew_data),
		     .add32b(add32b), .add_clear(add_clear),
		     .ld_a(ld_a),
		     .ew_stall_attr(ew_stall_attr), .gclk(gclk));

ewshuffle   shuffleit(.att_out(shuffleatt), .dade_out(shuffledade),
      	       	     .att_in(ra_data), .dade_in(rb_data),
      	       	     .shuffle(shuffle), .noshuffle(noshuffle), 
		     .gclk(gclk));
		     
ewattseldxdy seldxdy(	.dx_att(dx_curr), .dy_att(dy_curr),
      	       	     	.dxr(dxr), .dxg(dxg), .dxb(dxb), .dxa(dxa), .dxz(dxz), 
			.dxs(dxs), .dxt(dxt), .dxw(dxw), // .dxl(dxl),
			.dyr(dyr), .dyg(dyg), .dyb(dyb), .dya(dya), .dyz(dyz), 
			.dys(dys), .dyt(dyt), .dyw(dyw), // .dyl(dyl),
			.seldy(seldy));

ewattoffseti offset(  .att_d_out(ew_ep_d), .att_in(shuffleatt),
      	       	     .de(shuffledade), .dx(dx_curr), .dy(dy_curr), 
		     .x_frac(x_frac), .ld_x_frac(ld_x_frac),
		     .sign_dxdy(sign_dxdy),
		     .left(left),
		     .cycle_type(cycle_type), .load_cmd(load_cmd),
		     .gclk(gclk));
		     
endmodule  //  ewatt