rdp_c.v 23.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
// Verilog model created from schematic rdp_c.sch
// 2002/05/10 3:28:42 PM
// vericode v2.1


     // Schematic 'rdp_c.sch'
module rdp_c;
  wire [63:0]  XBUS_CS_DATA;
  wire [5:0]  CS_CMD;
  wire [2:0]  CS_TILE_ADDR;
  wire [47:0]  CS_TC_DATA;
  wire [63:0]  CS_EW_DATA;
  wire [12:0]  EW_CV_DATA;
  wire [12:0]  ST_DYA;
  wire [12:0]  ST_DYB;
  wire [12:0]  ST_DYG;
  wire [12:0]  ST_DYR;
  wire [3:0]  CV_VALUE;
  wire [1:0]  X_OFFSET;
  wire [1:0]  Y_OFFSET;
  wire [1:0]  X_OFFSET_R;
  wire [1:0]  X_OFFSET_G;
  wire [1:0]  X_OFFSET_B;
  wire [1:0]  X_OFFSET_A;
  wire [1:0]  X_OFFSET_Z;
  wire [1:0]  Y_OFFSET_R;
  wire [1:0]  Y_OFFSET_G;
  wire [1:0]  Y_OFFSET_B;
  wire [1:0]  Y_OFFSET_A;
  wire [1:0]  Y_OFFSET_Z;
  wire [3:0]  CVG_CC;
  wire [21:0]  ST_DXR;
  wire [21:0]  ST_DXG;
  wire [21:0]  ST_DXB;
  wire [21:0]  ST_DXA;
  wire [7:0]  ST_CC_R;
  wire [7:0]  ST_CC_G;
  wire [7:0]  ST_CC_B;
  wire [7:0]  ST_CC_A;
  wire [17:0]  ST_BL_Z;
  wire [15:0]  ST_TC_S;
  wire [15:0]  ST_TC_T;
  wire [15:0]  ST_TC_W;
  wire [8:0]  NOISE;
  wire [7:0]  SHADE_A;
  wire [7:0]  PIXEL_R;
  wire [7:0]  PIXEL_G;
  wire [7:0]  PIXEL_B;
  wire [3:0]  PIXEL_CVG;
  wire [8:0]  TF_R;
  wire [8:0]  TF_G;
  wire [8:0]  TF_B;
  wire [8:0]  TF_A;
  wire [8:0]  TF_LOD_FRAC;
  wire [2:0]  LEVEL;
  wire [2:0]  TILE;
  wire [17:0]  MEM_Z;
  wire [7:0]  MEM_B;
  wire [7:0]  MEM_G;
  wire [7:0]  MEM_R;
  wire [17:0]  SPAN_Z;
  wire [7:0]  SPAN_B;
  wire [7:0]  SPAN_G;
  wire [7:0]  SPAN_R;
  wire [7:0]  CLR_IND_A;
  wire [7:0]  CLR_IND_B;
  wire [7:0]  CLR_IND_C;
  wire [7:0]  CLR_IND_D;
  wire [8:0]  TC_L_FRAC;
  wire [7:0]  S_FRAC_RG;
  wire [7:0]  T_FRAC_RG;
  wire [7:0]  S_FRAC_BA;
  wire [7:0]  T_FRAC_BA;
  wire [7:0]  ADRS_BNK0L;
  wire [7:0]  ADRS_BNK1L;
  wire [7:0]  ADRS_BNK2L;
  wire [7:0]  ADRS_BNK3L;
  wire [7:0]  ADRS_BNK0H;
  wire [7:0]  ADRS_BNK1H;
  wire [7:0]  ADRS_BNK2H;
  wire [7:0]  ADRS_BNK3H;
  wire [4:0]  ADRS_A;
  wire [4:0]  ADRS_B_BA;
  wire [4:0]  ADRS_C;
  wire [4:0]  ADRS_D_BA;
  wire [4:0]  ADRS_B_RG;
  wire [4:0]  ADRS_D_RG;
  wire [2:0]  TC_TEX_TYPE;
  wire [1:0]  TC_TEX_SIZE;
  wire [3:0]  PALETTE;
  wire [8:0]  TC_RED_A;
  wire [8:0]  TC_BLUE_A;
  wire [8:0]  TC_GREEN_A;
  wire [8:0]  TC_ALPHA_A;
  wire [8:0]  TC_RED_B;
  wire [8:0]  TC_GREEN_B;
  wire [8:0]  TC_BLUE_B;
  wire [8:0]  TC_ALPHA_B;
  wire [8:0]  TC_RED_C;
  wire [8:0]  TC_GREEN_C;
  wire [8:0]  TC_BLUE_C;
  wire [8:0]  TC_RED_D;
  wire [8:0]  TC_GREEN_D;
  wire [8:0]  TC_BLUE_D;
  wire [8:0]  TC_ALPHA_D;
  wire [8:0]  TC_ALPHA_C;
  wire [11:0]  EW_MS_LENGTH;
  wire [19:0]  EW_MS_ADDR;
  wire [11:0]  EW_CV_START_X;
  wire [2:0]  SPAN_A;
  wire [22:0]  EW_DXR;
  wire [22:0]  EW_DXG;
  wire [22:0]  EW_DXB;
  wire [22:0]  EW_DXA;
  wire [22:0]  EW_DXZ;
  wire [22:0]  EW_DXS;
  wire [22:0]  EW_DXT;
  wire [22:0]  EW_DXW;
  wire [22:0]  EW_DYR;
  wire [22:0]  EW_DYG;
  wire [22:0]  EW_DYB;
  wire [22:0]  EW_DYA;
  wire [22:0]  EW_DYZ;
  wire [22:0]  EW_DYS;
  wire [22:0]  EW_DYT;
  wire [22:0]  EW_DYW;
  wire [26:0]  ST_DXS;
  wire [26:0]  ST_DXT;
  wire [26:0]  ST_DXW;
  wire [21:0]  EW_EP_DATA;
  wire [21:0]  EP_D_W;
  wire [21:0]  EP_D_S;
  wire [21:0]  EP_D_T;
  wire [21:0]  EP_D_Z;
  wire [2:0]  MEM_A;
  wire [8:0]  PIXEL_A;
  wire [31:0]  ST_DXZ;
  wire [63:0]  COPY_LOAD;
  wire [21:0]  EP_D_A;
  wire [21:0]  EP_D_B;
  wire [21:0]  EP_D_G;
  wire [21:0]  EP_D_R;
  wire [5:0]  WR_ADRS;
  wire [21:0]  ST_DYZ;
  wire [31:0]  ZERO;
  wire [55:0]  KEY_GB;
  wire [55:0]  KEY_R;
  wire [55:0]  CONVERT;
  wire [55:0]  PRIM_DEPTH;
  wire [55:0]  FILL_COLOR;
  wire [55:0]  FOG_COLOR;
  wire [55:0]  BLEND_COLOR;
  wire [55:0]  PRIM_COLOR;
  wire [55:0]  ENV_COLOR;
  wire [55:0]  COMBINE_MODE;
  wire [55:0]  TEX_IMAGE;
  wire [55:0]  Z_IMAGE;
  wire [55:0]  SCISSOR;
  wire [55:0]  COLOR_IMAGE;
  wire [16:0]  ST_DYS;
  wire [16:0]  ST_DYT;
  wire [16:0]  ST_DYW;
  wire [15:0]  ST_TC_S_DY;
  wire [15:0]  ST_TC_T_DY;
  wire [15:0]  ST_TC_W_DY;
  wire [2:0]  ALPHA_DITHER;
  wire [1:0]  CV_X_DITHER;
  wire [55:0]  OTHER_MODES;
  wire [1:0]  DITHER_Y;
  wire  SEL_W_DY;
  wire  SEL_T_DY;
  wire  SEL_S_DY;
  wire  EW_STALL_TLUT;
  wire  VCC;
  wire  GCLOCK;
  wire  CLOCK;
  wire  GCLK_EN;
  wire  AT_CS_BUSY;
  wire  ST_NCYC;
  wire  STROBE_SYNC_FULL;
  wire  ST_SPAN_MS;
  wire  EW_IMAGE_LOAD;
  wire  MS_LOAD_DV;
  wire  FLUSH;
  wire  REL_SYNC_LOAD;
  wire  EXIT;
  wire  A_TWELVE;
  wire  A_THREE;
  wire  ODD_T;
  wire  SWAP_BA;
  wire  SWAP_RG;
  wire  WR_FB;
  wire  SPAN_COLOR_WE;
  wire  SPAN_DEPTH_WE;
  wire  SHIFT_COORD;
  wire  TC_LOAD;
  wire  MASK_BL;
  wire  ST_SPAN_BL;
  wire  ST_SPAN_CC;
  wire  ST_SPAN_TF;
  wire  ST_SPAN_TC;
  wire  ST_SPAN_ST_Z;
  wire  ST_SPAN_ST_A;
  wire  ST_SPAN_ST_B;
  wire  ST_SPAN_ST_G;
  wire  ST_SPAN_ST_R;
  wire  ST_SPAN_ST_T;
  wire  ST_SPAN_ST_S;
  wire  ST_SPAN_ST_W;
  wire  MASK15;
  wire  ST_W_LEFT;
  wire  ST_T_LEFT;
  wire  ST_S_LEFT;
  wire  ST_Z_LEFT;
  wire  EW_OFFSET_SIGN;
  wire  EW_MAJOR_SIGN;
  wire  EW_OFFSET_LOAD;
  wire  EW_STALL_LOAD;
  wire  EW_SCISSOR_LOAD;
  wire  CV_LEFT;
  wire  ST_R_LEFT;
  wire  ST_G_LEFT;
  wire  ST_B_LEFT;
  wire  ST_A_LEFT;
  wire  EW_EP_STARTSPAN;
  wire  EW_CV_NEWSPAN;
  wire  PRE_REQ_DMA;
  wire  EW_OFFSET_LEFT;
  wire  EW_MINOR_LEFT;
  wire  EW_MAJOR_LEFT;
  wire  CS_EW_NEWPRIM;
  wire  WE_TILE_ATTR;
  wire  WE_TILE_SIZE;
  wire  CS_ATTR_VALID;
  wire  CS_START_PRIM;
  wire  REL_SYNC_FULL;
  wire  REL_SYNC_PIPE;
  wire  REL_SYNC_TILE;
  wire  EW_CS_BUSY;
  wire  RESET;
  wire  XBUS_CS_VALID;
  wire  CS_XBUS_REQ;

ms_ck CLOCK_DRIVER (.CLOCK(CLOCK), .GCLOCK(GCLOCK), .GCLOCK_ENABLE(GCLK_EN));
mspan MSPAN (.AT_COLOR_BASE(COLOR_IMAGE[25:0]), .AT_COLOR_FORMAT(COLOR_IMAGE[55:53]),
           .AT_COLOR_RMW(OTHER_MODES[6]), .AT_COLOR_SIZE(COLOR_IMAGE[52:51]),
           .AT_CYCLE_TYPE(OTHER_MODES[53:52]), .AT_FILL_COLOR(FILL_COLOR[31:0]),
           .AT_TEX_BASE(TEX_IMAGE[25:0]), .AT_TEX_FORMAT(TEX_IMAGE[55:53]),
           .AT_TEX_SIZE(TEX_IMAGE[52:51]), .AT_TEX_WIDTH(TEX_IMAGE[41:32]),
           .AT_Z_BASE(Z_IMAGE[25:0]), .AT_Z_ENABLE(OTHER_MODES[4]),
           .AT_Z_RMW(OTHER_MODES[5]), .BL_A(SPAN_A[2:0]), .BL_B(SPAN_B[7:0]),
           .BL_COLOR_WE(SPAN_COLOR_WE), .BL_G(SPAN_G[7:0]), .BL_MEM_A(MEM_A[2:0]),
           .BL_MEM_B(MEM_B[7:0]), .BL_MEM_G(MEM_G[7:0]), .BL_MEM_R(MEM_R[7:0]),
           .BL_MEM_Z(MEM_Z[17:0]), .BL_R(SPAN_R[7:0]), .BL_Z(SPAN_Z[17:0]),
           .BL_Z_WE(SPAN_DEPTH_WE), .CAPTURE(WR_FB), .EW_CV_NEWSPAN(EW_CV_NEWSPAN),
           .EW_MS_ADDR(EW_MS_ADDR[19:0]), .EW_MS_LENGTH(EW_MS_LENGTH[11:0]),
           .EW_SCISSOR_LOAD(EW_SCISSOR_LOAD), .EXIT(EXIT), .GCLK(GCLOCK),
           .GCLK_EN(VCC), .MS_LOAD_TLUT(EW_STALL_TLUT), .REL_SYNC_FULL(REL_SYNC_FULL),
           .RESET(RESET), .STROBE_SYNC_FULL(STROBE_SYNC_FULL), .TEX_BUS(COPY_LOAD[63:0]),
           .TEX_DATA_VALID(MS_LOAD_DV));
tf TF (.BILERP0M(OTHER_MODES[43]), .BILERP1M(OTHER_MODES[42]), .CONVERT_ONE(OTHER_MODES[41]),
           .GCLK(GCLOCK), .K0_COEFF(CONVERT[53:45]), .K1_COEFF(CONVERT[44:36]),
           .K2_COEFF(CONVERT[35:27]), .K3_COEFF(CONVERT[26:18]),
           .LOD_FRAC(TC_L_FRAC[8:0]), .MID_TEXEL(OTHER_MODES[44]),
           .NCYC(OTHER_MODES[52]), .SFRAC_BA(S_FRAC_BA[7:0]), .SFRAC_RG(S_FRAC_RG[7:0]),
           .ST_SPAN(ST_SPAN_TF), .TF_A(TF_A[8:0]), .TF_B(TF_B[8:0]),
           .TF_G(TF_G[8:0]), .TF_LOD_FRAC(TF_LOD_FRAC[8:0]), .TF_R(TF_R[8:0]),
           .TFRAC_BA(T_FRAC_BA[7:0]), .TFRAC_RG(T_FRAC_RG[7:0]),
           .TM_AA(TC_ALPHA_A[8:0]), .TM_AB(TC_ALPHA_B[8:0]), .TM_AC(TC_ALPHA_C[8:0]),
           .TM_AD(TC_ALPHA_D[8:0]), .TM_BA(TC_BLUE_A[8:0]), .TM_BB(TC_BLUE_B[8:0]),
           .TM_BC(TC_BLUE_C[8:0]), .TM_BD(TC_BLUE_D[8:0]), .TM_GA(TC_GREEN_A[8:0]),
           .TM_GB(TC_GREEN_B[8:0]), .TM_GC(TC_GREEN_C[8:0]), .TM_GD(TC_GREEN_D[8:0]),
           .TM_RA(TC_RED_A[8:0]), .TM_RB(TC_RED_B[8:0]), .TM_RC(TC_RED_C[8:0]),
           .TM_RD(TC_RED_D[8:0]));
tm TM (.A_THREE(A_THREE), .A_TWELVE(A_TWELVE), .ADRS_A(ADRS_A[4:0]),
           .ADRS_B_BA(ADRS_B_BA[4:0]), .ADRS_B_RG(ADRS_B_RG[4:0]),
           .ADRS_BNK0H(ADRS_BNK0H[7:0]), .ADRS_BNK0L(ADRS_BNK0L[7:0]),
           .ADRS_BNK1H(ADRS_BNK1H[7:0]), .ADRS_BNK1L(ADRS_BNK1L[7:0]),
           .ADRS_BNK2H(ADRS_BNK2H[7:0]), .ADRS_BNK2L(ADRS_BNK2L[7:0]),
           .ADRS_BNK3H(ADRS_BNK3H[7:0]), .ADRS_BNK3L(ADRS_BNK3L[7:0]),
           .ADRS_C(ADRS_C[4:0]), .ADRS_D_BA(ADRS_D_BA[4:0]), .ADRS_D_RG(ADRS_D_RG[4:0]),
           .ALPHA_A(TC_ALPHA_A[8:0]), .ALPHA_B(TC_ALPHA_B[8:0]),
           .ALPHA_C(TC_ALPHA_C[8:0]), .ALPHA_D(TC_ALPHA_D[8:0]),
           .BIST_CHECK(ZERO[0]), .BIST_GO(ZERO[0]), .BLUE_A(TC_BLUE_A[8:0]),
           .BLUE_B(TC_BLUE_B[8:0]), .BLUE_C(TC_BLUE_C[8:0]), .BLUE_D(TC_BLUE_D[8:0]),
           .CLR_IND_A(CLR_IND_A[7:0]), .CLR_IND_B(CLR_IND_B[7:0]),
           .CLR_IND_C(CLR_IND_C[7:0]), .CLR_IND_D(CLR_IND_D[7:0]),
           .COPY_LOAD(COPY_LOAD[63:0]), .GCLK(GCLOCK), .GREEN_A(TC_GREEN_A[8:0]),
           .GREEN_B(TC_GREEN_B[8:0]), .GREEN_C(TC_GREEN_C[8:0]),
           .GREEN_D(TC_GREEN_D[8:0]), .IDDQ(ZERO[0]), .LOAD_DV(MS_LOAD_DV),
           .ODD_T(ODD_T), .PALETTE(PALETTE[3:0]), .RED_A(TC_RED_A[8:0]),
           .RED_B(TC_RED_B[8:0]), .RED_C(TC_RED_C[8:0]), .RED_D(TC_RED_D[8:0]),
           .RESET_L(RESET), .SWAP_BA(SWAP_BA), .SWAP_RG(SWAP_RG),
           .TILE_TEX_SIZE(TC_TEX_SIZE[1:0]), .TILE_TEX_TYPE(TC_TEX_TYPE[2:0]),
           .TLUT_EN(OTHER_MODES[47]), .TLUT_TYPE(OTHER_MODES[46]));
tc TC (.A_THREE(A_THREE), .A_TWELVE(A_TWELVE), .ADRS_A(ADRS_A[4:0]),
           .ADRS_B_BA(ADRS_B_BA[4:0]), .ADRS_B_RG(ADRS_B_RG[4:0]),
           .ADRS_BNK0H(ADRS_BNK0H[7:0]), .ADRS_BNK0L(ADRS_BNK0L[7:0]),
           .ADRS_BNK1H(ADRS_BNK1H[7:0]), .ADRS_BNK1L(ADRS_BNK1L[7:0]),
           .ADRS_BNK2H(ADRS_BNK2H[7:0]), .ADRS_BNK2L(ADRS_BNK2L[7:0]),
           .ADRS_BNK3H(ADRS_BNK3H[7:0]), .ADRS_BNK3L(ADRS_BNK3L[7:0]),
           .ADRS_C(ADRS_C[4:0]), .ADRS_D_BA(ADRS_D_BA[4:0]), .ADRS_D_RG(ADRS_D_RG[4:0]),
           .CLR_IND_A(CLR_IND_A[7:0]), .CLR_IND_B(CLR_IND_B[7:0]),
           .CLR_IND_C(CLR_IND_C[7:0]), .CLR_IND_D(CLR_IND_D[7:0]),
           .COPY(OTHER_MODES[53]), .DETAIL_EN(OTHER_MODES[50]), .GCLK(GCLOCK),
           .L_FRAC(TC_L_FRAC[8:0]), .LOAD(TC_LOAD), .LOD_EN(OTHER_MODES[48]),
           .MAX_LEVEL(LEVEL[2:0]), .MIN_LEVEL(PRIM_COLOR[44:40]),
           .NCYC(OTHER_MODES[52]), .ODD_T(ODD_T), .PALETTE(PALETTE[3:0]),
           .PERSP_EN(OTHER_MODES[51]), .PRIM_TILE(TILE[2:0]), .S(ST_TC_S[15:0]),
           .S_DY(ST_TC_S_DY[15:0]), .S_FRAC_BA(S_FRAC_BA[7:0]), .S_FRAC_RG(S_FRAC_RG[7:0]),
           .SAMP_TYPE(OTHER_MODES[45]), .SEL_S_DY(SEL_S_DY), .SEL_T_DY(SEL_T_DY),
           .SEL_W_DY(SEL_W_DY), .SHARP_EN(OTHER_MODES[49]), .SHIFT_COORD(SHIFT_COORD),
           .ST_SPAN(ST_SPAN_TC), .SWAP_BA(SWAP_BA), .SWAP_RG(SWAP_RG),
           .T(ST_TC_T[15:0]), .T_DY(ST_TC_T_DY[15:0]), .T_FRAC_BA(T_FRAC_BA[7:0]),
           .T_FRAC_RG(T_FRAC_RG[7:0]), .TILE_ADRS(CS_TILE_ADDR[2:0]),
           .TILE_DATA(CS_TC_DATA[47:0]), .TILE_TEX_SIZE_1D(TC_TEX_SIZE[1:0]),
           .TILE_TEX_TYPE_1D(TC_TEX_TYPE[2:0]), .TLUT_EN(OTHER_MODES[47]),
           .W(ST_TC_W[15:0]), .W_DY(ST_TC_W_DY[15:0]), .WE_TILE_ATTR(WE_TILE_ATTR),
           .WE_TILE_SIZE(WE_TILE_SIZE));
driver DRIVER (.CLK(CLOCK), .FLUSH(FLUSH), .GCLK_EN(GCLK_EN), .REQUEST(CS_XBUS_REQ),
           .RESET(RESET), .WR_FB(WR_FB), .XBUS_CS_DATA(XBUS_CS_DATA[63:0]),
           .XBUS_CS_VALID(XBUS_CS_VALID), .ZERO(ZERO[31:0]));
bl BL (.ANTIALIAS_ENABLE(OTHER_MODES[3]), .BL_A_SEL_0_R(OTHER_MODES[27:26]),
           .BL_A_SEL_1_R(OTHER_MODES[25:24]), .BL_B_SEL_0_R(OTHER_MODES[19:18]),
           .BL_B_SEL_1_R(OTHER_MODES[17:16]), .BL_M_SEL_0_R(OTHER_MODES[23:22]),
           .BL_M_SEL_1_R(OTHER_MODES[21:20]), .BL_P_SEL_0_R(OTHER_MODES[31:30]),
           .BL_P_SEL_1_R(OTHER_MODES[29:28]), .BLEND_B(BLEND_COLOR[15:8]),
           .BLEND_G(BLEND_COLOR[23:16]), .BLEND_R(BLEND_COLOR[31:24]),
           .COLOR_ON_CVG(OTHER_MODES[7]), .CVG_DEST(OTHER_MODES[9:8]),
           .DZDX(ST_DXZ[31:16]), .DZDY(ST_DYZ[21:6]), .FOG_A(FOG_COLOR[7:0]),
           .FOG_B(FOG_COLOR[15:8]), .FOG_G(FOG_COLOR[23:16]), .FOG_R(FOG_COLOR[31:24]),
           .FORCE_BLEND(OTHER_MODES[14]), .GCLK(GCLOCK), .MASK15B(MASK_BL),
           .MEM_A(MEM_A[2:0]), .MEM_B(MEM_B[7:0]), .MEM_G(MEM_G[7:0]),
           .MEM_R(MEM_R[7:0]), .MEM_Z(MEM_Z[17:0]), .NCYC(OTHER_MODES[52]),
           .PIXEL_A(PIXEL_A[8:0]), .PIXEL_B(PIXEL_B[7:0]), .PIXEL_CVG(PIXEL_CVG[3:0]),
           .PIXEL_G(PIXEL_G[7:0]), .PIXEL_R(PIXEL_R[7:0]), .PRIM_DELTA_Z(PRIM_DEPTH[15:0]),
           .PRIM_Z(PRIM_DEPTH[31:16]), .SHADE_A(SHADE_A[7:0]), .SPAN_A(SPAN_A[2:0]),
           .SPAN_B(SPAN_B[7:0]), .SPAN_COLOR_WE(SPAN_COLOR_WE), .SPAN_DEPTH_WE(SPAN_DEPTH_WE),
           .SPAN_G(SPAN_G[7:0]), .SPAN_R(SPAN_R[7:0]), .SPAN_Z(SPAN_Z[17:0]),
           .ST_SPAN(ST_SPAN_BL), .ST_Z(ST_BL_Z[17:0]), .Z_COMPARE_ENABLE(OTHER_MODES[4]),
           .Z_MODE(OTHER_MODES[11:10]), .Z_SOURCE_SELECT(OTHER_MODES[2]),
           .Z_UPDATE_ENABLE(OTHER_MODES[5]));
cc CC (.ALPHA_CVG_SELECT(OTHER_MODES[13]), .ALPHA_DITHER(ALPHA_DITHER[2:0]),
           .ALPHA_DITHER_SEL(OTHER_MODES[37:36]), .CC_A_SEL_0_A(COMBINE_MODE[43:41]),
           .CC_A_SEL_0_R(COMBINE_MODE[51:47]), .CC_A_SEL_1_A(COMBINE_MODE[20:18]),
           .CC_A_SEL_1_R(COMBINE_MODE[36:32]), .CC_C_SEL_0_A(COMBINE_MODE[11:9]),
           .CC_C_SEL_0_R(COMBINE_MODE[17:15]), .CC_C_SEL_1_A(COMBINE_MODE[2:0]),
           .CC_C_SEL_1_R(COMBINE_MODE[8:6]), .CC_X_SEL_0_A(COMBINE_MODE[46:44]),
           .CC_X_SEL_0_R(COMBINE_MODE[55:52]), .CC_X_SEL_1_A(COMBINE_MODE[23:21]),
           .CC_X_SEL_1_R(COMBINE_MODE[40:37]), .CC_Y_SEL_0_A(COMBINE_MODE[14:12]),
           .CC_Y_SEL_0_R(COMBINE_MODE[31:28]), .CC_Y_SEL_1_A(COMBINE_MODE[5:3]),
           .CC_Y_SEL_1_R(COMBINE_MODE[27:24]), .CENTER_B(KEY_GB[15:8]),
           .CENTER_G(KEY_GB[31:24]), .CENTER_R(KEY_R[15:8]), .CVG(CVG_CC[3:0]),
           .CVG_TIMES_ALPHA(OTHER_MODES[12]), .ENV_A(ENV_COLOR[7:0]),
           .ENV_B(ENV_COLOR[15:8]), .ENV_G(ENV_COLOR[23:16]), .ENV_R(ENV_COLOR[31:24]),
           .GCLK(GCLOCK), .K4_COEFF(CONVERT[17:9]), .K5_COEFF(CONVERT[8:0]),
           .KEY_EN(OTHER_MODES[40]), .NCYC(OTHER_MODES[52]), .NOISE(NOISE[8:0]),
           .PIXEL_A(PIXEL_A[8:0]), .PIXEL_B(PIXEL_B[7:0]), .PIXEL_CVG(PIXEL_CVG[3:0]),
           .PIXEL_G(PIXEL_G[7:0]), .PIXEL_R(PIXEL_R[7:0]), .PRIM_A(PRIM_COLOR[7:0]),
           .PRIM_B(PRIM_COLOR[15:8]), .PRIM_G(PRIM_COLOR[23:16]),
           .PRIM_LOD_FRAC({ PRIM_COLOR[39:32], PRIM_COLOR[39] }), .PRIM_R(PRIM_COLOR[31:24]),
           .SCALE_B(KEY_GB[7:0]), .SCALE_G(KEY_GB[23:16]), .SCALE_R(KEY_R[7:0]),
           .SHADE_A(SHADE_A[7:0]), .ST_A(ST_CC_A[7:0]), .ST_B(ST_CC_B[7:0]),
           .ST_G(ST_CC_G[7:0]), .ST_R(ST_CC_R[7:0]), .ST_SPAN(ST_SPAN_CC),
           .TF_A(TF_A[8:0]), .TF_B(TF_B[8:0]), .TF_G(TF_G[8:0]), .TF_LOD_FRAC(TF_LOD_FRAC[8:0]),
           .TF_R(TF_R[8:0]), .WIDTH_B(KEY_GB[43:32]), .WIDTH_G(KEY_GB[55:44]),
           .WIDTH_R(KEY_R[27:16]));
st ST (.AT_ST_DXA(ST_DXA[21:0]), .AT_ST_DXB(ST_DXB[21:0]), .AT_ST_DXG(ST_DXG[21:0]),
           .AT_ST_DXR(ST_DXR[21:0]), .AT_ST_DXS(ST_DXS[26:0]), .AT_ST_DXT(ST_DXT[26:0]),
           .AT_ST_DXW(ST_DXW[26:0]), .AT_ST_DXZ(ST_DXZ[31:0]), .AT_ST_DYA(ST_DYA[12:0]),
           .AT_ST_DYB(ST_DYB[12:0]), .AT_ST_DYG(ST_DYG[12:0]), .AT_ST_DYR(ST_DYR[12:0]),
           .AT_ST_DYS(ST_DYS[16:0]), .AT_ST_DYT(ST_DYT[16:0]), .AT_ST_DYW(ST_DYW[16:0]),
           .AT_ST_DYZ(ST_DYZ[21:0]), .COMP_NEW_S(SEL_S_DY), .COMP_NEW_T(SEL_T_DY),
           .COMP_NEW_W(SEL_W_DY), .EP_ST_A(EP_D_A[15:0]), .EP_ST_B(EP_D_B[15:0]),
           .EP_ST_G(EP_D_G[15:0]), .EP_ST_R(EP_D_R[15:0]), .EP_ST_S(EP_D_S[21:0]),
           .EP_ST_T(EP_D_T[21:0]), .EP_ST_W(EP_D_W[21:0]), .EP_ST_Z(EP_D_Z[21:0]),
           .EW_D(EW_EP_DATA[21:0]), .GCLK(GCLOCK), .LEFT_A(ST_A_LEFT),
           .LEFT_B(ST_B_LEFT), .LEFT_G(ST_G_LEFT), .LEFT_R(ST_R_LEFT),
           .LEFT_S(ST_S_LEFT), .LEFT_T(ST_T_LEFT), .LEFT_W(ST_W_LEFT),
           .LEFT_Z(ST_Z_LEFT), .NCYC_A(OTHER_MODES[52]), .NCYC_B(OTHER_MODES[52]),
           .NCYC_G(OTHER_MODES[52]), .NCYC_R(OTHER_MODES[52]), .NCYC_S(ST_NCYC),
           .NCYC_T(ST_NCYC), .NCYC_W(OTHER_MODES[52]), .NCYC_Z(OTHER_MODES[52]),
           .ST_BL_Z(ST_BL_Z[17:0]), .ST_CC_A(ST_CC_A[7:0]), .ST_CC_B(ST_CC_B[7:0]),
           .ST_CC_G(ST_CC_G[7:0]), .ST_CC_R(ST_CC_R[7:0]), .ST_TC_S(ST_TC_S[15:0]),
           .ST_TC_S_DY(ST_TC_S_DY[15:0]), .ST_TC_T(ST_TC_T[15:0]),
           .ST_TC_T_DY(ST_TC_T_DY[15:0]), .ST_TC_W(ST_TC_W[15:0]),
           .ST_TC_W_DY(ST_TC_W_DY[15:0]), .STARTSPAN_A(ST_SPAN_ST_A),
           .STARTSPAN_B(ST_SPAN_ST_B), .STARTSPAN_G(ST_SPAN_ST_G),
           .STARTSPAN_R(ST_SPAN_ST_R), .STARTSPAN_S(ST_SPAN_ST_S),
           .STARTSPAN_T(ST_SPAN_ST_T), .STARTSPAN_W(ST_SPAN_ST_W),
           .STARTSPAN_Z(ST_SPAN_ST_Z), .TC_LOAD(TC_LOAD), .TLUT_EN(OTHER_MODES[47]),
           .X_OFFSETA(X_OFFSET_A[1:0]), .X_OFFSETB(X_OFFSET_B[1:0]),
           .X_OFFSETG(X_OFFSET_G[1:0]), .X_OFFSETR(X_OFFSET_R[1:0]),
           .X_OFFSETZ(X_OFFSET_Z[1:0]), .Y_OFFSETA(Y_OFFSET_A[1:0]),
           .Y_OFFSETB(Y_OFFSET_B[1:0]), .Y_OFFSETG(Y_OFFSET_G[1:0]),
           .Y_OFFSETR(Y_OFFSET_R[1:0]), .Y_OFFSETZ(Y_OFFSET_Z[1:0]));
cv CV (.CV_VALUE(CV_VALUE[3:0]), .CYCLE_TYPE(OTHER_MODES[52]), .EW_CV_DATA(EW_CV_DATA[12:0]),
           .EW_CV_NEWSPAN(EW_CV_NEWSPAN), .EW_CV_START_X(EW_CV_START_X[11:0]),
           .GCLK(GCLOCK), .LEFT(CV_LEFT), .MASK15(MASK15), .RESET_L(RESET),
           .X_DITHER(CV_X_DITHER[1:0]), .X_OFFSET(X_OFFSET[1:0]),
           .Y_OFFSET(Y_OFFSET[1:0]));
ep EP (.ALPHA_DITHER(ALPHA_DITHER[2:0]), .CV_CVG(CV_VALUE[3:0]),
           .CV_MASK(MASK15), .CV_X_OFFSET(X_OFFSET[1:0]), .CV_Y_OFFSET(Y_OFFSET[1:0]),
           .CVG_CC(CVG_CC[3:0]), .CYCLE_TYPE(OTHER_MODES[53:52]),
           .D_A(EP_D_A[21:0]), .D_B(EP_D_B[21:0]), .D_G(EP_D_G[21:0]),
           .D_R(EP_D_R[21:0]), .D_S(EP_D_S[21:0]), .D_T(EP_D_T[21:0]),
           .D_W(EP_D_W[21:0]), .D_Z(EP_D_Z[21:0]), .DITHER_TYPE(OTHER_MODES[38]),
           .EW_D(EW_EP_DATA[21:0]), .EW_ST_SPAN(EW_EP_STARTSPAN),
           .GCLK(GCLOCK), .MASK_BL(MASK_BL), .RGB_DITHER(), .ST_SPAN_BL(ST_SPAN_BL),
           .ST_SPAN_CC(ST_SPAN_CC), .ST_SPAN_MS(ST_SPAN_MS), .ST_SPAN_ST_A(ST_SPAN_ST_A),
           .ST_SPAN_ST_B(ST_SPAN_ST_B), .ST_SPAN_ST_G(ST_SPAN_ST_G),
           .ST_SPAN_ST_R(ST_SPAN_ST_R), .ST_SPAN_ST_S(ST_SPAN_ST_S),
           .ST_SPAN_ST_T(ST_SPAN_ST_T), .ST_SPAN_ST_W(ST_SPAN_ST_W),
           .ST_SPAN_ST_Z(ST_SPAN_ST_Z), .ST_SPAN_TC(ST_SPAN_TC),
           .ST_SPAN_TF(ST_SPAN_TF), .TC_LOAD(TC_LOAD), .TLUT_EN(OTHER_MODES[47]),
           .X_DITHER(CV_X_DITHER[1:0]), .X_OFFSET_A(X_OFFSET_A[1:0]),
           .X_OFFSET_B(X_OFFSET_B[1:0]), .X_OFFSET_G(X_OFFSET_G[1:0]),
           .X_OFFSET_R(X_OFFSET_R[1:0]), .X_OFFSET_Z(X_OFFSET_Z[1:0]),
           .Y_DITHER(DITHER_Y[1:0]), .Y_OFFSET_A(Y_OFFSET_A[1:0]),
           .Y_OFFSET_B(Y_OFFSET_B[1:0]), .Y_OFFSET_G(Y_OFFSET_G[1:0]),
           .Y_OFFSET_R(Y_OFFSET_R[1:0]), .Y_OFFSET_Z(Y_OFFSET_Z[1:0]));
ew EW (.CS_EW_D(CS_EW_DATA[63:0]), .CS_EW_NEWPRIM(CS_EW_NEWPRIM),
           .CYCLE_TYPE(OTHER_MODES[53:52]), .DXA(EW_DXA[22:0]), .DXB(EW_DXB[22:0]),
           .DXG(EW_DXG[22:0]), .DXR(EW_DXR[22:0]), .DXS(EW_DXS[22:0]),
           .DXT(EW_DXT[22:0]), .DXW(EW_DXW[22:0]), .DXZ(EW_DXZ[22:0]),
           .DYA(EW_DYA[22:0]), .DYB(EW_DYB[22:0]), .DYG(EW_DYG[22:0]),
           .DYR(EW_DYR[22:0]), .DYS(EW_DYS[22:0]), .DYT(EW_DYT[22:0]),
           .DYW(EW_DYW[22:0]), .DYZ(EW_DYZ[22:0]), .EW_CS_BUSY(EW_CS_BUSY),
           .EW_CV_D(EW_CV_DATA[12:0]), .EW_CV_NEWSPAN(EW_CV_NEWSPAN),
           .EW_CV_START_X(EW_CV_START_X[11:0]), .EW_EP_D(EW_EP_DATA[21:0]),
           .EW_EP_STARTSPAN(EW_EP_STARTSPAN), .EW_MS_ADDR(EW_MS_ADDR[19:0]),
           .EW_MS_LENGTH(EW_MS_LENGTH[11:0]), .FLUSH(FLUSH), .GCLK(GCLOCK),
           .LEFT_OFFSET(EW_OFFSET_LEFT), .LEFT_XMAJOR(EW_MAJOR_LEFT),
           .LEFT_XMINOR(EW_MINOR_LEFT), .LOAD_CMD_EWSTALL(EW_STALL_LOAD),
           .LOAD_CMD_IMAGE(EW_IMAGE_LOAD), .LOAD_CMD_OFFSET(EW_OFFSET_LOAD),
           .LOAD_CMD_SCISSOR(EW_SCISSOR_LOAD), .LOAD_CMD_TLUT(EW_STALL_TLUT),
           .ODD_LINE(SCISSOR[24]), .PIXEL_SIZE(COLOR_IMAGE[52:51]),
           .RESET_L(RESET), .SC_FIELD(SCISSOR[25]), .SCBOX_XMAX(SCISSOR[23:12]),
           .SCBOX_XMIN(SCISSOR[55:44]), .SCBOX_YMAX(SCISSOR[11:0]),
           .SCBOX_YMIN(SCISSOR[43:32]), .SIGN_DXHDY_OFFSET(EW_OFFSET_SIGN),
           .SIGN_DXHDY_XMAJOR(EW_MAJOR_SIGN), .TEXEL_SIZE(TEX_IMAGE[52:51]),
           .WIDTH_CIMAGE(COLOR_IMAGE[41:32]), .WIDTH_TIMAGE(TEX_IMAGE[41:32]),
           .Y_DITHER(DITHER_Y[1:0]));
at AT (.AT_CS_BUSY(AT_CS_BUSY), .BLEND_COLOR(BLEND_COLOR[55:0]),
           .CLK(CLOCK), .COLOR_IMAGE(COLOR_IMAGE[55:0]), .COMBINE_MODE(COMBINE_MODE[55:0]),
           .CONVERT(CONVERT[55:0]), .CS_CMD(CS_CMD[5:0]), .CS_EW_D(CS_EW_DATA[63:0]),
           .CS_ST_ATTR(CS_ATTR_VALID), .CS_ST_PRIM(CS_START_PRIM),
           .CV_LEFT(CV_LEFT), .ENV_COLOR(ENV_COLOR[55:0]), .EW_ADDR(EW_MS_ADDR[19:0]),
           .EW_CS_BUSY(EW_CS_BUSY), .EW_DXA(EW_DXA[22:0]), .EW_DXB(EW_DXB[22:0]),
           .EW_DXG(EW_DXG[22:0]), .EW_DXR(EW_DXR[22:0]), .EW_DXS(EW_DXS[22:0]),
           .EW_DXT(EW_DXT[22:0]), .EW_DXW(EW_DXW[22:0]), .EW_DXZ(EW_DXZ[22:0]),
           .EW_DYA(EW_DYA[22:0]), .EW_DYB(EW_DYB[22:0]), .EW_DYG(EW_DYG[22:0]),
           .EW_DYR(EW_DYR[22:0]), .EW_DYS(EW_DYS[22:0]), .EW_DYT(EW_DYT[22:0]),
           .EW_DYW(EW_DYW[22:0]), .EW_DYZ(EW_DYZ[22:0]), .EW_EP_STARTSPAN(EW_EP_STARTSPAN),
           .EW_IMAGE_LOAD(EW_IMAGE_LOAD), .EW_LENGTH(EW_MS_LENGTH[11:0]),
           .EW_MAJOR_LEFT(EW_MAJOR_LEFT), .EW_MAJOR_SIGN(EW_MAJOR_SIGN),
           .EW_MINOR_LEFT(EW_MINOR_LEFT), .EW_OFFSET_LEFT(EW_OFFSET_LEFT),
           .EW_OFFSET_LOAD(EW_OFFSET_LOAD), .EW_OFFSET_SIGN(EW_OFFSET_SIGN),
           .EW_SCISSOR_LOAD(EW_SCISSOR_LOAD), .EW_STALL_LOAD(EW_STALL_LOAD),
           .EW_STALL_TLUT(EW_STALL_TLUT), .FILL_COLOR(FILL_COLOR[55:0]),
           .FOG_COLOR(FOG_COLOR[55:0]), .GCLK(GCLOCK), .KEY_GB(KEY_GB[55:0]),
           .KEY_R(KEY_R[55:0]), .LEVEL(LEVEL[2:0]), .MS_COUNT(), .MS_XF(),
           .MS_XI(), .NOISE(NOISE[8:0]), .OTHER_MODES(OTHER_MODES[55:0]),
           .PRIM_COLOR(PRIM_COLOR[55:0]), .PRIM_DEPTH(PRIM_DEPTH[55:0]),
           .REL_SYNC_LOAD(REL_SYNC_LOAD), .REL_SYNC_PIPE(REL_SYNC_PIPE),
           .REL_SYNC_TILE(REL_SYNC_TILE), .RESET_L(RESET), .SCISSOR(SCISSOR[55:0]),
           .SHIFT_COORD(SHIFT_COORD), .SPANBUFRD(ZERO[0]), .ST_A_LEFT(ST_A_LEFT),
           .ST_B_LEFT(ST_B_LEFT), .ST_DXA(ST_DXA[21:0]), .ST_DXB(ST_DXB[21:0]),
           .ST_DXG(ST_DXG[21:0]), .ST_DXR(ST_DXR[21:0]), .ST_DXS(ST_DXS[26:0]),
           .ST_DXT(ST_DXT[26:0]), .ST_DXW(ST_DXW[26:0]), .ST_DXZ(ST_DXZ[31:0]),
           .ST_DYA(ST_DYA[12:0]), .ST_DYB(ST_DYB[12:0]), .ST_DYG(ST_DYG[12:0]),
           .ST_DYR(ST_DYR[12:0]), .ST_DYS(ST_DYS[16:0]), .ST_DYT(ST_DYT[16:0]),
           .ST_DYW(ST_DYW[16:0]), .ST_DYZ(ST_DYZ[21:0]), .ST_G_LEFT(ST_G_LEFT),
           .ST_NCYC(ST_NCYC), .ST_R_LEFT(ST_R_LEFT), .ST_S_LEFT(ST_S_LEFT),
           .ST_T_LEFT(ST_T_LEFT), .ST_W_LEFT(ST_W_LEFT), .ST_Z_LEFT(ST_Z_LEFT),
           .STROBE_SYNC_FULL(STROBE_SYNC_FULL), .TC_LOAD(TC_LOAD),
           .TEX_IMAGE(TEX_IMAGE[55:0]), .TILE(TILE[2:0]), .Z_IMAGE(Z_IMAGE[55:0]));
csgclk CSGCLK (.ATTR_VALID(CS_ATTR_VALID), .CLK(CLOCK), .CMD(CS_CMD[5:0]),
           .COPY_FILL(OTHER_MODES[53]), .CS_EW_DATA(CS_EW_DATA[63:0]),
           .CS_EW_NEWPRIM(CS_EW_NEWPRIM), .CS_TC_DATA(CS_TC_DATA[47:0]),
           .EW_CS_BUSY(EW_CS_BUSY), .GCLK(GCLOCK), .MS_BUSY(AT_CS_BUSY),
           .PRE_REQ_DMA(PRE_REQ_DMA), .REL_SYNC_FULL(REL_SYNC_FULL),
           .REL_SYNC_LOAD(REL_SYNC_LOAD), .REL_SYNC_PIPE(REL_SYNC_PIPE),
           .REL_SYNC_TILE(REL_SYNC_TILE), .RESET_L(RESET), .START_PRIM(CS_START_PRIM),
           .TEXEL_SIZE(TEX_IMAGE[52:51]), .TILE_ADDR(CS_TILE_ADDR[2:0]),
           .WE_TILE_ATTR(WE_TILE_ATTR), .WE_TILE_SIZE(WE_TILE_SIZE),
           .WR_ADRS(WR_ADRS[5:0]));
csclk CSCLK (.CLK(CLOCK), .CS_XBUS_REQ(CS_XBUS_REQ), .PRE_REQ_DMA(PRE_REQ_DMA),
           .RESET_L(RESET), .WR_ADRS(WR_ADRS[5:0]), .XBUS_CS_DATA(XBUS_CS_DATA[63:0]),
           .XBUS_CS_VALID(XBUS_CS_VALID));

endmodule