OpenCores
URL https://opencores.org/ocsvn/s1_core/s1_core/trunk

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [lsu_qctl1.v] - Diff between revs 105 and 113

Show entire file | Details | Blame | View Log

Rev 105 Rev 113
Line 16... Line 16...
// You should have received a copy of the GNU General Public
// You should have received a copy of the GNU General Public
// License along with this work; if not, write to the Free Software
// License along with this work; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
// 
// 
// ========== Copyright Header End ============================================
// ========== Copyright Header End ============================================
 
`ifdef SIMPLY_RISC_TWEAKS
 
`define SIMPLY_RISC_SCANIN .si(0)
 
`else
 
`define SIMPLY_RISC_SCANIN .si()
 
`endif
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
/*
/*
//  Description:  LSU Queue Control for Sparc Core
//  Description:  LSU Queue Control for Sparc Core
//      - includes monitoring for pcx queues
//      - includes monitoring for pcx queues
//      - control for lsu datapath
//      - control for lsu datapath
//      - rd/wr control of dfq
//      - rd/wr control of dfq
*/
*/
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// header file includes
// header file includes
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// system level definition file which contains the /*
`include  "sys.h" // system level definition file which contains the 
/* ========== Copyright Header Begin ==========================================
 
*
 
* OpenSPARC T1 Processor File: sys.h
 
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
 
*
 
* The above named program is free software; you can redistribute it and/or
 
* modify it under the terms of the GNU General Public
 
* License version 2 as published by the Free Software Foundation.
 
*
 
* The above named program is distributed in the hope that it will be
 
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
* General Public License for more details.
 
*
 
* You should have received a copy of the GNU General Public
 
* License along with this work; if not, write to the Free Software
 
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
*
 
* ========== Copyright Header End ============================================
 
*/
 
// -*- verilog -*-
 
////////////////////////////////////////////////////////////////////////
 
/*
 
//
 
// Description:         Global header file that contain definitions that
 
//                      are common/shared at the systme level
 
*/
 
////////////////////////////////////////////////////////////////////////
 
//
 
// Setting the time scale
 
// If the timescale changes, JP_TIMESCALE may also have to change.
 
`timescale      1ps/1ps
 
 
 
//
 
// JBUS clock
 
// =========
 
//
 
 
 
 
 
 
 
// Afara Link Defines
 
// ==================
 
 
 
// Reliable Link
 
 
 
 
 
 
 
 
 
// Afara Link Objects
 
 
 
 
 
// Afara Link Object Format - Reliable Link
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Afara Link Object Format - Congestion
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Afara Link Object Format - Acknowledge
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Afara Link Object Format - Request
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Afara Link Object Format - Message
 
 
 
 
 
 
 
// Acknowledge Types
 
 
 
 
 
 
 
 
 
// Request Types
 
 
 
 
 
 
 
 
 
 
 
// Afara Link Frame
 
 
 
 
 
 
 
//
 
// UCB Packet Type
 
// ===============
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// UCB Data Packet Format
 
// ======================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Size encoding for the UCB_SIZE_HI/LO field
 
// 000 - byte
 
// 001 - half-word
 
// 010 - word
 
// 011 - double-word
 
// 111 - quad-word
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// UCB Interrupt Packet Format
 
// ===========================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//`define UCB_THR_HI             9      // (6) cpu/thread ID shared with
 
//`define UCB_THR_LO             4             data packet format
 
//`define UCB_PKT_HI             3      // (4) packet type shared with
 
//`define UCB_PKT_LO             0      //     data packet format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// FCRAM Bus Widths
 
// ================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// ENET clock periods
 
// ==================
 
//
 
 
 
 
 
 
 
 
 
//
 
// JBus Bridge defines
 
// =================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// PCI Device Address Configuration
 
// ================================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                  // time scale definition
                  // time scale definition
/*
`include  "iop.h"
/* ========== Copyright Header Begin ==========================================
 
*
 
* OpenSPARC T1 Processor File: iop.h
 
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
 
*
 
* The above named program is free software; you can redistribute it and/or
 
* modify it under the terms of the GNU General Public
 
* License version 2 as published by the Free Software Foundation.
 
*
 
* The above named program is distributed in the hope that it will be
 
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
* General Public License for more details.
 
*
 
* You should have received a copy of the GNU General Public
 
* License along with this work; if not, write to the Free Software
 
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
*
 
* ========== Copyright Header End ============================================
 
*/
 
//-*- verilog -*-
 
////////////////////////////////////////////////////////////////////////
 
/*
 
//
 
//  Description:        Global header file that contain definitions that
 
//                      are common/shared at the IOP chip level
 
*/
 
////////////////////////////////////////////////////////////////////////
 
 
 
 
 
// Address Map Defines
 
// ===================
 
 
 
 
 
 
 
 
 
// CMP space
 
 
 
 
 
 
 
// IOP space
 
 
 
 
 
 
 
 
 
                               //`define ENET_ING_CSR     8'h84
 
                               //`define ENET_EGR_CMD_CSR 8'h85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// L2 space
 
 
 
 
 
 
 
// More IOP space
 
 
 
 
 
 
 
 
 
 
 
//Cache Crossbar Width and Field Defines
 
//======================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//bits 133:128 are shared by different fields
 
//for different packet types.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//End cache crossbar defines
 
 
 
 
 
// Number of COS supported by EECU 
 
 
 
 
 
 
 
// 
 
// BSC bus sizes
 
// =============
 
//
 
 
 
// General
 
 
 
 
 
 
 
 
 
// CTags
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// reinstated temporarily
 
 
 
 
 
 
 
 
 
// CoS
 
 
 
 
 
 
 
 
 
 
 
 
 
// L2$ Bank
 
 
 
 
 
 
 
// L2$ Req
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// L2$ Ack
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Enet Egress Command Unit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Enet Egress Packet Unit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// This is cleaved in between Egress Datapath Ack's
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Enet Egress Datapath
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// In-Order / Ordered Queue: EEPU
 
// Tag is: TLEN, SOF, EOF, QID = 15
 
 
 
 
 
 
 
 
 
 
 
 
 
// Nack + Tag Info + CTag
 
 
 
 
 
 
 
 
 
// ENET Ingress Queue Management Req
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// ENET Ingress Queue Management Ack
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Enet Ingress Packet Unit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// ENET Ingress Packet Unit Ack
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// In-Order / Ordered Queue: PCI
 
// Tag is: CTAG
 
 
 
 
 
 
 
 
 
 
 
// PCI-X Request
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// PCI_X Acknowledge
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// BSC array sizes
 
//================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// ECC syndrome bits per memory element
 
 
 
 
 
 
 
 
 
//
 
// BSC Port Definitions
 
// ====================
 
//
 
// Bits 7 to 4 of curr_port_id
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Number of ports of each type
 
 
 
 
 
// Bits needed to represent above
 
 
 
 
 
// How wide the linked list pointers are
 
// 60b for no payload (2CoS)
 
// 80b for payload (2CoS)
 
 
 
//`define BSC_OBJ_PTR   80
 
//`define BSC_HD1_HI    69
 
//`define BSC_HD1_LO    60
 
//`define BSC_TL1_HI    59
 
//`define BSC_TL1_LO    50
 
//`define BSC_CT1_HI    49
 
//`define BSC_CT1_LO    40
 
//`define BSC_HD0_HI    29
 
//`define BSC_HD0_LO    20
 
//`define BSC_TL0_HI    19
 
//`define BSC_TL0_LO    10
 
//`define BSC_CT0_HI     9
 
//`define BSC_CT0_LO     0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// I2C STATES in DRAMctl
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// IOB defines
 
// ===========
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//`define IOB_INT_STAT_WIDTH   32
 
//`define IOB_INT_STAT_HI      31
 
//`define IOB_INT_STAT_LO       0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// fixme - double check address mapping
 
// CREG in `IOB_INT_CSR space
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// CREG in `IOB_MAN_CSR space
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Address map for TAP access of SPARC ASI
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// CIOP UCB Bus Width
 
// ==================
 
//
 
//`define IOB_EECU_WIDTH       16  // ethernet egress command
 
//`define EECU_IOB_WIDTH       16
 
 
 
//`define IOB_NRAM_WIDTH       16  // NRAM (RLDRAM previously)
 
//`define NRAM_IOB_WIDTH        4
 
 
 
 
 
 
 
 
 
//`define IOB_ENET_ING_WIDTH   32  // ethernet ingress
 
//`define ENET_ING_IOB_WIDTH    8
 
 
 
//`define IOB_ENET_EGR_WIDTH    4  // ethernet egress
 
//`define ENET_EGR_IOB_WIDTH    4
 
 
 
//`define IOB_ENET_MAC_WIDTH    4  // ethernet MAC
 
//`define ENET_MAC_IOB_WIDTH    4
 
 
 
 
 
 
 
 
 
//`define IOB_BSC_WIDTH         4  // BSC
 
//`define BSC_IOB_WIDTH         4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//`define IOB_CLSP_WIDTH        4  // clk spine unit
 
//`define CLSP_IOB_WIDTH        4
 
 
 
 
 
 
 
 
 
 
 
//
 
// CIOP UCB Buf ID Type
 
// ====================
 
//
 
 
 
 
 
 
 
//
 
// Interrupt Device ID
 
// ===================
 
//
 
// Caution: DUMMY_DEV_ID has to be 9 bit wide
 
//          for fields to line up properly in the IOB.
 
 
 
 
 
 
 
//
 
// Soft Error related definitions 
 
// ==============================
 
//
 
 
 
 
 
 
 
//
 
// CMP clock
 
// =========
 
//
 
 
 
 
 
 
 
 
 
//
 
// NRAM/IO Interface
 
// =================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// NRAM/ENET Interface
 
// ===================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// IO/FCRAM Interface
 
// ==================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// PCI Interface
 
// ==================
 
// Load/store size encodings
 
// -------------------------
 
// Size encoding
 
// 000 - byte
 
// 001 - half-word
 
// 010 - word
 
// 011 - double-word
 
// 100 - quad
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// JBI<->SCTAG Interface
 
// =======================
 
// Outbound Header Format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Inbound Header Format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//
 
// JBI->IOB Mondo Header Format
 
// ============================
 
//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// JBI->IOB Mondo Bus Width/Cycle
 
// ==============================
 
// Cycle  1 Header[15:8]
 
// Cycle  2 Header[ 7:0]
 
// Cycle  3 J_AD[127:120]
 
// Cycle  4 J_AD[119:112]
 
// .....
 
// Cycle 18 J_AD[  7:  0]
 
 
 
 
 
 
 
/*
 
/* ========== Copyright Header Begin ==========================================
 
*
 
* OpenSPARC T1 Processor File: lsu.h
 
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
 
*
 
* The above named program is free software; you can redistribute it and/or
 
* modify it under the terms of the GNU General Public
 
* License version 2 as published by the Free Software Foundation.
 
*
 
* The above named program is distributed in the hope that it will be
 
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
* General Public License for more details.
 
*
 
* You should have received a copy of the GNU General Public
 
* License along with this work; if not, write to the Free Software
 
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
*
 
* ========== Copyright Header End ============================================
 
*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//`define STB_PCX_WY_HI   107
 
//`define STB_PCX_WY_LO   106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// TLB Tag and Data Format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// I-TLB version - lsu_tlb only.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Invalidate Format
 
//addr<5:4>=00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//addr<5:4>=01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//addr<5:4>=10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//addr<5:4>=11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// cpuid - 4b
 
 
 
 
 
 
 
// CPUany, addr<5:4>=00,10
 
 
 
 
 
 
 
 
 
 
 
// CPUany, addr<5:4>=01,11
 
 
 
 
 
 
 
 
 
// CPUany, addr<5:4>=01,11
 
 
 
 
 
 
 
 
 
// DTAG parity error Invalidate
 
 
 
 
 
 
 
 
 
// CPX BINIT STORE
 
 
 
 
`include  "lsu.h"
 
 
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Local header file includes / local defines
// Local header file includes / local defines
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
 
 
Line 1539... Line 128...
input [2:0]             stb2_crnt_ack_id ;      // ackid for crnt outstanding st. 
input [2:0]             stb2_crnt_ack_id ;      // ackid for crnt outstanding st. 
input [2:0]             stb3_crnt_ack_id ;      // ackid for crnt outstanding st. 
input [2:0]             stb3_crnt_ack_id ;      // ackid for crnt outstanding st. 
input [1:0]             ifu_tlu_thrid_e ;       // thread-id
input [1:0]             ifu_tlu_thrid_e ;       // thread-id
input                   ldxa_internal ;         // internal ldxa, stg g 
input                   ldxa_internal ;         // internal ldxa, stg g 
 
 
input [64+7:64+6] spu_lsu_ldst_pckt ;  // addr bits
input [`PCX_AD_LO+7:`PCX_AD_LO+6] spu_lsu_ldst_pckt ;  // addr bits
input                   spu_lsu_ldst_pckt_vld ; // vld
input                   spu_lsu_ldst_pckt_vld ; // vld
input                   ifu_tlu_inst_vld_m ;    // inst is vld - wstage
input                   ifu_tlu_inst_vld_m ;    // inst is vld - wstage
 
 
input                   ifu_lsu_flush_w ;       // ifu's flush
input                   ifu_lsu_flush_w ;       // ifu's flush
input                   ifu_lsu_casa_e ;        // compare-swap instr
input                   ifu_lsu_casa_e ;        // compare-swap instr
Line 1715... Line 304...
   input                tlu_early_flush_pipe2_w;
   input                tlu_early_flush_pipe2_w;
   input                lsu_ttype_vld_m2;
   input                lsu_ttype_vld_m2;
 
 
/*AUTOWIRE*/
/*AUTOWIRE*/
// Beginning of automatic wires (for undeclared instantiated-module outputs)
// Beginning of automatic wires (for undeclared instantiated-module outputs)
 
`ifdef SIMPLY_RISC_TWEAKS
 
wire ld0_inst_vld_m;
 
wire ld1_inst_vld_m;
 
wire ld2_inst_vld_m;
 
wire ld3_inst_vld_m;
 
wire ldst_fp_m;
 
wire ldst_dbl_m;
 
wire ld0_inst_vld_unflushed;
 
wire ld1_inst_vld_unflushed;
 
wire ld2_inst_vld_unflushed;
 
wire ld3_inst_vld_unflushed;
 
wire ldst_fp_g;
 
wire thread0_m;
 
wire thread1_m;
 
wire thread2_m;
 
wire thread3_m;
 
wire thread0_g;
 
wire thread1_g;
 
wire thread2_g;
 
wire thread3_g;
 
wire blk_asi_g;
 
wire bld_reset;
 
wire atomic_w2;
 
wire atomic_or_ldxa_internal_rq_g;
 
`endif
// End of automatics
// End of automatics
 
 
wire  thread0_e,thread1_e,thread2_e,thread3_e;
wire  thread0_e,thread1_e,thread2_e,thread3_e;
wire  thread0_w2,thread1_w2,thread2_w2,thread3_w2;
wire  thread0_w2,thread1_w2,thread2_w2,thread3_w2;
wire    ld0_inst_vld_e,ld1_inst_vld_e,ld2_inst_vld_e,ld3_inst_vld_e ;
wire    ld0_inst_vld_e,ld1_inst_vld_e,ld2_inst_vld_e,ld3_inst_vld_e ;
Line 1907... Line 521...
 
 
assign  clk = rclk;
assign  clk = rclk;
 
 
    dffrl_async rstff(.din (grst_l),
    dffrl_async rstff(.din (grst_l),
                        .q   (dbb_reset_l),
                        .q   (dbb_reset_l),
                        .clk (clk), .se(se), .si(), .so(),
                        .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so(),
                        .rst_l (arst_l));
                        .rst_l (arst_l));
 
 
assign  reset  =  ~dbb_reset_l;
assign  reset  =  ~dbb_reset_l;
 
 
 
 
Line 1937... Line 551...
//
//
//dff #(1)  prvld_stgd1 (
//dff #(1)  prvld_stgd1 (
//  .din  (pcx_any_rq_for_stb), 
//  .din  (pcx_any_rq_for_stb), 
//  .q  (lsu_stb_pcx_rvld_d1),
//  .q  (lsu_stb_pcx_rvld_d1),
//  .clk  (clk), 
//  .clk  (clk), 
//  .se (1'b0), .si (), .so ()
//  .se (1'b0), `SIMPLY_RISC_SCANIN, .so ()
//  );
//  );
 
 
// replacement for above logic - pcx_rq_for_stb is already qual'ed w/ lsu_st_pcx_rq_kill_w2
// replacement for above logic - pcx_rq_for_stb is already qual'ed w/ lsu_st_pcx_rq_kill_w2
// this signal is used in qdp1 and qdp2 as pcx paket valids.
// this signal is used in qdp1 and qdp2 as pcx paket valids.
assign  lsu_stb_pcx_rvld_d1  =  st3_pcx_rq_sel_d1 |
assign  lsu_stb_pcx_rvld_d1  =  st3_pcx_rq_sel_d1 |
Line 1954... Line 568...
//assign  stb_rd_tid[1] = pcx_rq_for_stb[2] | pcx_rq_for_stb[3] ;
//assign  stb_rd_tid[1] = pcx_rq_for_stb[2] | pcx_rq_for_stb[3] ;
//
//
//dff #(2) stbtid_stgd1 (
//dff #(2) stbtid_stgd1 (
//  .din    (stb_rd_tid[1:0]),  .q  (lsu_stb_rd_tid[1:0]),
//  .din    (stb_rd_tid[1:0]),  .q  (lsu_stb_rd_tid[1:0]),
//  .clk    (clk),
//  .clk    (clk),
//  .se   (1'b0), .si (), .so ()
//  .se   (1'b0), `SIMPLY_RISC_SCANIN, .so ()
//  );
//  );
 
 
assign  lsu_stb_rd_tid[0]  =  st1_pcx_rq_sel_d1 | st3_pcx_rq_sel_d1;
assign  lsu_stb_rd_tid[0]  =  st1_pcx_rq_sel_d1 | st3_pcx_rq_sel_d1;
assign  lsu_stb_rd_tid[1]  =  st2_pcx_rq_sel_d1 | st3_pcx_rq_sel_d1;
assign  lsu_stb_rd_tid[1]  =  st2_pcx_rq_sel_d1 | st3_pcx_rq_sel_d1;
 
 
Line 1992... Line 606...
 
 
assign  ld_way_mx2_g[1:0] =
assign  ld_way_mx2_g[1:0] =
//(ldst_dbl_g & st_inst_vld_unflushed & lsu_quad_asi_g) ? 2'b01 :  //quad st, obsolete
//(ldst_dbl_g & st_inst_vld_unflushed & lsu_quad_asi_g) ? 2'b01 :  //quad st, obsolete
        casa_g ? 2'b00 : ld_way_mx1_g[1:0] ;
        casa_g ? 2'b00 : ld_way_mx1_g[1:0] ;
 
 
dff #(2)  ff_ld_way_mx2_w2 (
dff_s #(2)  ff_ld_way_mx2_w2 (
        .din    (ld_way_mx2_g[1:0]),
        .din    (ld_way_mx2_g[1:0]),
        .q      (ld_way_mx2_w2[1:0]),
        .q      (ld_way_mx2_w2[1:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire  [1:0]  lsu_lmq_pkt_way_w2;
wire  [1:0]  lsu_lmq_pkt_way_w2;
assign  lsu_lmq_pkt_way_w2[1:0] =  lsu_ld_sec_hit_l2access_w2 ? lsu_ld_sec_hit_wy_w2[1:0] :
assign  lsu_lmq_pkt_way_w2[1:0] =  lsu_ld_sec_hit_l2access_w2 ? lsu_ld_sec_hit_wy_w2[1:0] :
                                         ld_way_mx2_w2[1:0];
                                         ld_way_mx2_w2[1:0];
Line 2015... Line 629...
 
 
wire    qword_access0,qword_access1,qword_access2,qword_access3;
wire    qword_access0,qword_access1,qword_access2,qword_access3;
 
 
// Extend by 1-b to add support for 3rd size bit for iospace.
// Extend by 1-b to add support for 3rd size bit for iospace.
// move the flops from qdp1 to qctl1
// move the flops from qdp1 to qctl1
dffe #(2)  ff_lmq0_pcx_pkt_way (
dffe_s #(2)  ff_lmq0_pcx_pkt_way (
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .q      (lmq0_pcx_pkt_way_tmp[1:0]),
           .q      (lmq0_pcx_pkt_way_tmp[1:0]),
           .en     (lmq_enable_w2[0]),
           .en     (lmq_enable_w2[0]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
dffe #(2)  ff_lmq1_pcx_pkt_way (
dffe_s #(2)  ff_lmq1_pcx_pkt_way (
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .q      (lmq1_pcx_pkt_way_tmp[1:0]),
           .q      (lmq1_pcx_pkt_way_tmp[1:0]),
           .en     (lmq_enable_w2[1]),
           .en     (lmq_enable_w2[1]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
dffe #(2)  ff_lmq2_pcx_pkt_way (
dffe_s #(2)  ff_lmq2_pcx_pkt_way (
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .q      (lmq2_pcx_pkt_way_tmp[1:0]),
           .q      (lmq2_pcx_pkt_way_tmp[1:0]),
           .en     (lmq_enable_w2[2]),
           .en     (lmq_enable_w2[2]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
dffe #(2)  ff_lmq3_pcx_pkt_way (
dffe_s #(2)  ff_lmq3_pcx_pkt_way (
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .din    (lsu_lmq_pkt_way_w2[1:0]),
           .q      (lmq3_pcx_pkt_way_tmp[1:0]),
           .q      (lmq3_pcx_pkt_way_tmp[1:0]),
           .en     (lmq_enable_w2[3]),
           .en     (lmq_enable_w2[3]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
 
 
// Q Word Access to IO
// Q Word Access to IO
dffe   ff_lmq0_qw (
dffe_s   ff_lmq0_qw (
           .din    (lsu_quad_word_access_g),
           .din    (lsu_quad_word_access_g),
           .q      (qword_access0),
           .q      (qword_access0),
           .en     (lmq_enable[0]),
           .en     (lmq_enable[0]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
dffe   ff_lmq1_qw (
dffe_s   ff_lmq1_qw (
           .din    (lsu_quad_word_access_g),
           .din    (lsu_quad_word_access_g),
           .q      (qword_access1),
           .q      (qword_access1),
           .en     (lmq_enable[1]),
           .en     (lmq_enable[1]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
dffe   ff_lmq2_qw(
dffe_s   ff_lmq2_qw(
           .din    (lsu_quad_word_access_g),
           .din    (lsu_quad_word_access_g),
           .q      (qword_access2),
           .q      (qword_access2),
           .en     (lmq_enable[2]),
           .en     (lmq_enable[2]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
dffe   ff_lmq3_qw (
dffe_s   ff_lmq3_qw (
           .din    (lsu_quad_word_access_g),
           .din    (lsu_quad_word_access_g),
           .q      (qword_access3),
           .q      (qword_access3),
           .en     (lmq_enable[3]),
           .en     (lmq_enable[3]),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
 
 
assign  lsu_pcx_rq_sz_b3 =
assign  lsu_pcx_rq_sz_b3 =
        (ld0_pcx_rq_sel_d1 & qword_access0) |
        (ld0_pcx_rq_sel_d1 & qword_access0) |
        (ld1_pcx_rq_sel_d1 & qword_access1) |
        (ld1_pcx_rq_sel_d1 & qword_access1) |
Line 2112... Line 726...
assign dfq_byp_tid_sel[3]  =  (lsu_dfq_byp_tid[1:0]==2'b11);
assign dfq_byp_tid_sel[3]  =  (lsu_dfq_byp_tid[1:0]==2'b11);
//assign dfq_byp_tid__sel[3]  =  ~|(lsu_dfq_byp_d1_sel[2:0]);
//assign dfq_byp_tid__sel[3]  =  ~|(lsu_dfq_byp_d1_sel[2:0]);
 
 
wire  [3:0]  lsu_dfq_byp_tid_d1_sel_tmp ;
wire  [3:0]  lsu_dfq_byp_tid_d1_sel_tmp ;
 
 
dffe #(4)  dfq_byp_tid_sel_ff (
dffe_s #(4)  dfq_byp_tid_sel_ff (
           .din    (dfq_byp_tid_sel[3:0]),
           .din    (dfq_byp_tid_sel[3:0]),
           .q      (lsu_dfq_byp_tid_d1_sel_tmp[3:0]),
           .q      (lsu_dfq_byp_tid_d1_sel_tmp[3:0]),
           .en     (dfq_byp_ff_en),
           .en     (dfq_byp_ff_en),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
 
 
//11/21/03 - add rst_tri_en to lsu_dfq_byp_tid_d1_sel[3:0] going to qdp1 as dfq_byp_sel[3:0]
//11/21/03 - add rst_tri_en to lsu_dfq_byp_tid_d1_sel[3:0] going to qdp1 as dfq_byp_sel[3:0]
 
 
assign  lsu_dfq_byp_tid_d1_sel[2:0]  =  lsu_dfq_byp_tid_d1_sel_tmp[2:0]  & {3{~rst_tri_en}};
assign  lsu_dfq_byp_tid_d1_sel[2:0]  =  lsu_dfq_byp_tid_d1_sel_tmp[2:0]  & {3{~rst_tri_en}};
Line 2132... Line 746...
// INST_VLD_W GENERATION
// INST_VLD_W GENERATION
//=================================================================================================
//=================================================================================================
 
 
 
 
wire [1:0] thrid_m, thrid_g ;
wire [1:0] thrid_m, thrid_g ;
dff #(2)  stgm_thrid (
dff_s #(2)  stgm_thrid (
        .din    (ifu_tlu_thrid_e[1:0]),
        .din    (ifu_tlu_thrid_e[1:0]),
        .q      (thrid_m[1:0]),
        .q      (thrid_m[1:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff  #(2) stgg_thrid (
dff_s  #(2) stgg_thrid (
        .din    (thrid_m[1:0]),
        .din    (thrid_m[1:0]),
        .q      (thrid_g[1:0]),
        .q      (thrid_g[1:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    flush_w_inst_vld_m ;
wire    flush_w_inst_vld_m ;
wire    lsu_inst_vld_w,lsu_inst_vld_tmp ;
wire    lsu_inst_vld_w,lsu_inst_vld_tmp ;
wire    other_flush_pipe_w ;
wire    other_flush_pipe_w ;
Line 2155... Line 769...
 
 
assign  flush_w_inst_vld_m =
assign  flush_w_inst_vld_m =
        ifu_tlu_inst_vld_m &
        ifu_tlu_inst_vld_m &
        ~(qctl1_flush_pipe_w & (thrid_m[1:0] == thrid_g[1:0])) ; // really lsu_flush_pipe_w
        ~(qctl1_flush_pipe_w & (thrid_m[1:0] == thrid_g[1:0])) ; // really lsu_flush_pipe_w
 
 
dff  stgw_ivld (
dff_s  stgw_ivld (
        .din    (flush_w_inst_vld_m),
        .din    (flush_w_inst_vld_m),
        .q      (lsu_inst_vld_tmp),
        .q      (lsu_inst_vld_tmp),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
assign  other_flush_pipe_w = tlu_early_flush_pipe2_w | (lsu_ttype_vld_m2 & lsu_inst_vld_tmp);
assign  other_flush_pipe_w = tlu_early_flush_pipe2_w | (lsu_ttype_vld_m2 & lsu_inst_vld_tmp);
assign  qctl1_flush_pipe_w = other_flush_pipe_w | ifu_lsu_flush_w ;
assign  qctl1_flush_pipe_w = other_flush_pipe_w | ifu_lsu_flush_w ;
Line 2206... Line 820...
//        ld2_sec_hit_g ? ld2_unfilled_wy[1:0] :
//        ld2_sec_hit_g ? ld2_unfilled_wy[1:0] :
//          ld3_sec_hit_g ? ld3_unfilled_wy[1:0] : 2'bxx ;
//          ld3_sec_hit_g ? ld3_unfilled_wy[1:0] : 2'bxx ;
 
 
wire  ld_sec_hit_thrd0_w2,ld_sec_hit_thrd1_w2,ld_sec_hit_thrd2_w2,ld_sec_hit_thrd3_w2;
wire  ld_sec_hit_thrd0_w2,ld_sec_hit_thrd1_w2,ld_sec_hit_thrd2_w2,ld_sec_hit_thrd3_w2;
 
 
dff #(4) ff_ld_sec_hit_thrd0to3_d1 (
dff_s #(4) ff_ld_sec_hit_thrd0to3_d1 (
        .din    ({ld_sec_hit_thrd0,ld_sec_hit_thrd1,ld_sec_hit_thrd2,ld_sec_hit_thrd3}),
        .din    ({ld_sec_hit_thrd0,ld_sec_hit_thrd1,ld_sec_hit_thrd2,ld_sec_hit_thrd3}),
        .q      ({ld_sec_hit_thrd0_w2,ld_sec_hit_thrd1_w2,ld_sec_hit_thrd2_w2,ld_sec_hit_thrd3_w2}),
        .q      ({ld_sec_hit_thrd0_w2,ld_sec_hit_thrd1_w2,ld_sec_hit_thrd2_w2,ld_sec_hit_thrd3_w2}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  ld0_sec_hit_w2 = ld_sec_hit_thrd0_w2 & ld0_unfilled  ;
assign  ld0_sec_hit_w2 = ld_sec_hit_thrd0_w2 & ld0_unfilled  ;
assign  ld1_sec_hit_w2 = ld_sec_hit_thrd1_w2 & ld1_unfilled  ;
assign  ld1_sec_hit_w2 = ld_sec_hit_thrd1_w2 & ld1_unfilled  ;
assign  ld2_sec_hit_w2 = ld_sec_hit_thrd2_w2 & ld2_unfilled  ;
assign  ld2_sec_hit_w2 = ld_sec_hit_thrd2_w2 & ld2_unfilled  ;
Line 2234... Line 848...
 
 
//dff #(4)  stgm_dbypsel (
//dff #(4)  stgm_dbypsel (
//        .din    (dfq_byp_sel[3:0]),
//        .din    (dfq_byp_sel[3:0]),
//        .q      (dfq_byp_sel_m[3:0]),
//        .q      (dfq_byp_sel_m[3:0]),
//        .clk    (clk),
//        .clk    (clk),
//        .se     (1'b0),       .si (),          .so ()
//        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
//        );
//        );
 
 
//dff #(4)  stgg_dbypsel (
//dff #(4)  stgg_dbypsel (
//        .din    (dfq_byp_sel_m[3:0]),
//        .din    (dfq_byp_sel_m[3:0]),
//        .q      (dfq_byp_sel_g[3:0]),
//        .q      (dfq_byp_sel_g[3:0]),
//        .clk    (clk),
//        .clk    (clk),
//        .se     (1'b0),       .si (),          .so ()
//        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
//        );
//        );
 
 
// select g-stage lmq source.
// select g-stage lmq source.
// Selects for lmq contents shared by fill/hit and alternate sources such as ldxa/raw.
// Selects for lmq contents shared by fill/hit and alternate sources such as ldxa/raw.
// Is qualification of dfq_byp_sel_g by ld_thrd_byp_sel necessary ???
// Is qualification of dfq_byp_sel_g by ld_thrd_byp_sel necessary ???
Line 2274... Line 888...
*/
*/
 
 
// M-Stage 
// M-Stage 
//10/27/03 - add rst_tri_en for the select - lsu_lmq_byp_misc_sel to qdp1
//10/27/03 - add rst_tri_en for the select - lsu_lmq_byp_misc_sel to qdp1
wire  [3:0]  lsu_lmq_byp_misc_sel_tmp ;
wire  [3:0]  lsu_lmq_byp_misc_sel_tmp ;
dff #(4)  stgg_lbsel (
dff_s #(4)  stgg_lbsel (
        .din    (lmq_byp_misc_sel_e[3:0]),
        .din    (lmq_byp_misc_sel_e[3:0]),
        .q      (lsu_lmq_byp_misc_sel_tmp[3:0]),
        .q      (lsu_lmq_byp_misc_sel_tmp[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign lsu_lmq_byp_misc_sel[2:0]=  lsu_lmq_byp_misc_sel_tmp[2:0] & {3{~rst_tri_en}} ;
assign lsu_lmq_byp_misc_sel[2:0]=  lsu_lmq_byp_misc_sel_tmp[2:0] & {3{~rst_tri_en}} ;
assign lsu_lmq_byp_misc_sel[3]  =  lsu_lmq_byp_misc_sel_tmp[3] | rst_tri_en ;
assign lsu_lmq_byp_misc_sel[3]  =  lsu_lmq_byp_misc_sel_tmp[3] | rst_tri_en ;
 
 
Line 2315... Line 929...
assign  ld2_inst_vld_e = ld_inst_vld_e & thread2_e ;
assign  ld2_inst_vld_e = ld_inst_vld_e & thread2_e ;
assign  ld3_inst_vld_e = ld_inst_vld_e & thread3_e ;
assign  ld3_inst_vld_e = ld_inst_vld_e & thread3_e ;
 
 
assign ldst_va_m[7:6] = lsu_ldst_va_m[7:6];
assign ldst_va_m[7:6] = lsu_ldst_va_m[7:6];
 
 
dff  #(6) stgm_ad_m (
dff_s  #(6) stgm_ad_m (
        .din    ({ld0_inst_vld_e,ld1_inst_vld_e,
        .din    ({ld0_inst_vld_e,ld1_inst_vld_e,
    ld2_inst_vld_e,ld3_inst_vld_e,ifu_lsu_ldst_fp_e,
    ld2_inst_vld_e,ld3_inst_vld_e,ifu_lsu_ldst_fp_e,
    ifu_lsu_ldst_dbl_e}),
    ifu_lsu_ldst_dbl_e}),
        .q      ({ld0_inst_vld_m,ld1_inst_vld_m,
        .q      ({ld0_inst_vld_m,ld1_inst_vld_m,
    ld2_inst_vld_m,ld3_inst_vld_m,ldst_fp_m,
    ld2_inst_vld_m,ld3_inst_vld_m,ldst_fp_m,
    ldst_dbl_m}),
    ldst_dbl_m}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
dff  #(8) stgm_ad_g (
dff_s  #(8) stgm_ad_g (
        .din    ({ldst_va_m[7:6],ld0_inst_vld_m,ld1_inst_vld_m,
        .din    ({ldst_va_m[7:6],ld0_inst_vld_m,ld1_inst_vld_m,
        //.din    ({ldst_va_m[8:6],ld0_inst_vld_m,ld1_inst_vld_m,
        //.din    ({ldst_va_m[8:6],ld0_inst_vld_m,ld1_inst_vld_m,
    ld2_inst_vld_m,ld3_inst_vld_m,ldst_fp_m,
    ld2_inst_vld_m,ld3_inst_vld_m,ldst_fp_m,
    //ld2_inst_vld_m,ld3_inst_vld_m,st_inst_vld_m,ldst_fp_m,
    //ld2_inst_vld_m,ld3_inst_vld_m,st_inst_vld_m,ldst_fp_m,
    ldst_dbl_m}),
    ldst_dbl_m}),
Line 2339... Line 953...
        //.q      ({ldst_va_g[8:6],ld0_inst_vld_unflushed,ld1_inst_vld_unflushed,
        //.q      ({ldst_va_g[8:6],ld0_inst_vld_unflushed,ld1_inst_vld_unflushed,
    ld2_inst_vld_unflushed,ld3_inst_vld_unflushed,
    ld2_inst_vld_unflushed,ld3_inst_vld_unflushed,
    //ld2_inst_vld_unflushed,ld3_inst_vld_unflushed,st_inst_vld_unflushed,
    //ld2_inst_vld_unflushed,ld3_inst_vld_unflushed,st_inst_vld_unflushed,
    ldst_fp_g,ldst_dbl_g}),
    ldst_fp_g,ldst_dbl_g}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
 
 
assign  ld0_inst_vld_g = ld0_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld0_inst_vld_g = ld0_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld1_inst_vld_g = ld1_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld1_inst_vld_g = ld1_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld2_inst_vld_g = ld2_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld2_inst_vld_g = ld2_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld3_inst_vld_g = ld3_inst_vld_unflushed & lsu_inst_vld_w ;
assign  ld3_inst_vld_g = ld3_inst_vld_unflushed & lsu_inst_vld_w ;
//assign  st_inst_vld_g  = st_inst_vld_unflushed & lsu_inst_vld_w  ;
//assign  st_inst_vld_g  = st_inst_vld_unflushed & lsu_inst_vld_w  ;
 
 
dff  #(4) ivld_stgw2 (
dff_s  #(4) ivld_stgw2 (
        .din    ({ld0_inst_vld_g,ld1_inst_vld_g,ld2_inst_vld_g,ld3_inst_vld_g}),
        .din    ({ld0_inst_vld_g,ld1_inst_vld_g,ld2_inst_vld_g,ld3_inst_vld_g}),
        .q      ({ld0_inst_vld_w2,ld1_inst_vld_w2,ld2_inst_vld_w2,ld3_inst_vld_w2}),
        .q      ({ld0_inst_vld_w2,ld1_inst_vld_w2,ld2_inst_vld_w2,ld3_inst_vld_w2}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
 
 
dff  #(4) th_stgm (
dff_s  #(4) th_stgm (
        .din    ({thread0_e,thread1_e,thread2_e,thread3_e}),
        .din    ({thread0_e,thread1_e,thread2_e,thread3_e}),
        .q      ({thread0_m,thread1_m,thread2_m,thread3_m}),
        .q      ({thread0_m,thread1_m,thread2_m,thread3_m}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
 
 
dff  #(4) th_stgg (
dff_s  #(4) th_stgg (
        .din    ({thread0_m,thread1_m,thread2_m,thread3_m}),
        .din    ({thread0_m,thread1_m,thread2_m,thread3_m}),
        .q      ({thread0_g,thread1_g,thread2_g,thread3_g}),
        .q      ({thread0_g,thread1_g,thread2_g,thread3_g}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
 
 
dff  #(4) th_stgw2 (
dff_s  #(4) th_stgw2 (
        .din    ({thread0_g,thread1_g,thread2_g,thread3_g}),
        .din    ({thread0_g,thread1_g,thread2_g,thread3_g}),
        .q      ({thread0_w2,thread1_w2,thread2_w2,thread3_w2}),
        .q      ({thread0_w2,thread1_w2,thread2_w2,thread3_w2}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
 
 
 
 
 
 
//=================================================================================================
//=================================================================================================
Line 2418... Line 1032...
 
 
/*dff  iack_stg (
/*dff  iack_stg (
        .din    (imiss_pcx_rq_sel),
        .din    (imiss_pcx_rq_sel),
        .q      (lsu_ifu_pcxpkt_ack_d),
        .q      (lsu_ifu_pcxpkt_ack_d),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        ); */
        ); */
 
 
assign  lsu_ifu_pcxpkt_ack_d = imiss_pcx_rq_sel_d2 & ~pcx_req_squash_d1 ;
assign  lsu_ifu_pcxpkt_ack_d = imiss_pcx_rq_sel_d2 & ~pcx_req_squash_d1 ;
 
 
assign  imiss_pkt_vld =  ifu_lsu_pcxreq_d & ~(imiss_pcx_rq_sel_d1 | imiss_pcx_rq_sel_d2) ;
assign  imiss_pkt_vld =  ifu_lsu_pcxreq_d & ~(imiss_pcx_rq_sel_d1 | imiss_pcx_rq_sel_d2) ;
Line 2432... Line 1046...
 
 
wire  ifu_destid_en ;
wire  ifu_destid_en ;
assign  ifu_destid_en  =  ~ifu_lsu_pcxreq_d | (lsu_ifu_pcxpkt_ack_d & ~ifu_lsu_pcxpkt_e_b50);
assign  ifu_destid_en  =  ~ifu_lsu_pcxreq_d | (lsu_ifu_pcxpkt_ack_d & ~ifu_lsu_pcxpkt_e_b50);
 
 
wire  [2:0]  ifu_destid_d;
wire  [2:0]  ifu_destid_d;
dffe #(3)  ff_ifu_destid_d (
dffe_s #(3)  ff_ifu_destid_d (
           .din    (ifu_lsu_destid_s[2:0]),
           .din    (ifu_lsu_destid_s[2:0]),
           .q      (ifu_destid_d[2:0]),
           .q      (ifu_destid_d[2:0]),
           .en     (ifu_destid_en),
           .en     (ifu_destid_en),
           .clk    (clk),
           .clk    (clk),
           .se     (1'b0),       .si (),          .so ()
           .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
           );
           );
assign  imiss_l2bnk_addr[2:0] = ifu_destid_d[2:0] ;
assign  imiss_l2bnk_addr[2:0] = ifu_destid_d[2:0] ;
 
 
assign imiss_l2bnk_dest[0] =
assign imiss_l2bnk_dest[0] =
~imiss_l2bnk_addr[2] & ~imiss_l2bnk_addr[1] & ~imiss_l2bnk_addr[0] ;
~imiss_l2bnk_addr[2] & ~imiss_l2bnk_addr[1] & ~imiss_l2bnk_addr[0] ;
Line 2459... Line 1073...
//=================================================================================================
//=================================================================================================
 
 
 
 
assign  fpst_vld_m = ffu_lsu_data[80] & ffu_lsu_data[79] ;
assign  fpst_vld_m = ffu_lsu_data[80] & ffu_lsu_data[79] ;
 
 
dff  fpst_stg (
dff_s  fpst_stg (
        .din    (fpst_vld_m),
        .din    (fpst_vld_m),
        .q      (fpst_vld_g),
        .q      (fpst_vld_g),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// ffu req is  never speculative as it must always begin with the queue empty 
// ffu req is  never speculative as it must always begin with the queue empty 
assign  lsu_ffu_ack =
assign  lsu_ffu_ack =
        fpop_pcx_rq_sel_d1 |   // fpop needs to wait until selected;d1 for timing
        fpop_pcx_rq_sel_d1 |   // fpop needs to wait until selected;d1 for timing
Line 2481... Line 1095...
  //(reset | fpop_pcx_rq_sel_d1) ; 
  //(reset | fpop_pcx_rq_sel_d1) ; 
 
 
assign fpop_vld_en = ffu_lsu_fpop_rq_vld ;
assign fpop_vld_en = ffu_lsu_fpop_rq_vld ;
 
 
// fpop valid
// fpop valid
dffre #(1)  fpop_vld (
dffre_s #(1)  fpop_vld (
        .din  (ffu_lsu_fpop_rq_vld),
        .din  (ffu_lsu_fpop_rq_vld),
        .q    (fpop_pkt_vld_unmasked),
        .q    (fpop_pkt_vld_unmasked),
        .rst  (fpop_vld_reset), .en (fpop_vld_en),
        .rst  (fpop_vld_reset), .en (fpop_vld_en),
        .clk  (clk),
        .clk  (clk),
        .se   (1'b0),       .si (),          .so ()
        .se   (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// ** fpop_pkt1 should not be required.
// ** fpop_pkt1 should not be required.
assign  fpop_pkt1 = fpop_pkt_vld_unmasked & ~fpop_pcx_rq_sel_d1 ;
assign  fpop_pkt1 = fpop_pkt_vld_unmasked & ~fpop_pcx_rq_sel_d1 ;
 
 
assign  fpop_pkt_vld = fpop_pkt_vld_unmasked ; // & ~ffu_lsu_kill_fpop_rq ;
assign  fpop_pkt_vld = fpop_pkt_vld_unmasked ; // & ~ffu_lsu_kill_fpop_rq ;
 
 
assign  fpop_atom_req = fpop_pkt1 & fpop_pcx_rq_sel ;
assign  fpop_atom_req = fpop_pkt1 & fpop_pcx_rq_sel ;
 
 
dff  fpatm_stg (
dff_s  fpatm_stg (
        .din    (fpop_atom_req),
        .din    (fpop_atom_req),
        .q      (fpop_atom_rq_pq),
        .q      (fpop_atom_rq_pq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign fpop_l2bnk_dest[4:0]   = 5'b10000 ;
assign fpop_l2bnk_dest[4:0]   = 5'b10000 ;
 
 
 
 
Line 2519... Line 1133...
wire    strm_pcx_rq_sel_d2 ;
wire    strm_pcx_rq_sel_d2 ;
assign  lsu_spu_ldst_ack =
assign  lsu_spu_ldst_ack =
  strm_pcx_rq_sel_d2 & ~pcx_req_squash_d1 ;  // spu request sent to pcx.
  strm_pcx_rq_sel_d2 & ~pcx_req_squash_d1 ;  // spu request sent to pcx.
  //strm_pcx_rq_sel_d1 & ~pcx_req_squash ;  // spu request sent to pcx.
  //strm_pcx_rq_sel_d1 & ~pcx_req_squash ;  // spu request sent to pcx.
 
 
dff #(1) rqsel_d2 (
dff_s #(1) rqsel_d2 (
  .din (strm_pcx_rq_sel_d1),
  .din (strm_pcx_rq_sel_d1),
  .q   (strm_pcx_rq_sel_d2),
  .q   (strm_pcx_rq_sel_d2),
  .clk (clk),
  .clk (clk),
  .se     (1'b0),       .si (),          .so ()
  .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
);
);
 
 
wire spu_ack_d1 ;
wire spu_ack_d1 ;
dff #(1) spuack_d1 (
dff_s #(1) spuack_d1 (
  .din (lsu_spu_ldst_ack),
  .din (lsu_spu_ldst_ack),
  .q   (spu_ack_d1),
  .q   (spu_ack_d1),
  .clk (clk),
  .clk (clk),
  .se     (1'b0),       .si (),          .so ()
  .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
);
);
 
 
dff #(2) ff_spu_lsu_ldst_pckt_d1 (
dff_s #(2) ff_spu_lsu_ldst_pckt_d1 (
  .din (spu_lsu_ldst_pckt[64+7:64+6]),
  .din (spu_lsu_ldst_pckt[`PCX_AD_LO+7:`PCX_AD_LO+6]),
  .q   (strm_l2bnk_addr[1:0]),
  .q   (strm_l2bnk_addr[1:0]),
  .clk (clk),
  .clk (clk),
  .se     (1'b0),       .si (),          .so ()
  .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
);
);
 
 
// Streaming does not access io space.
// Streaming does not access io space.
assign strm_l2bnk_dest[0] =
assign strm_l2bnk_dest[0] =
~strm_l2bnk_addr[1] & ~strm_l2bnk_addr[0] ;
~strm_l2bnk_addr[1] & ~strm_l2bnk_addr[0] ;
Line 2554... Line 1168...
strm_l2bnk_addr[1] &  strm_l2bnk_addr[0] ;
strm_l2bnk_addr[1] &  strm_l2bnk_addr[0] ;
assign strm_l2bnk_dest[4] = 1'b0 ;
assign strm_l2bnk_dest[4] = 1'b0 ;
 
 
wire  strm_pkt_vld_unmasked ;
wire  strm_pkt_vld_unmasked ;
 
 
dff #(1) spu_pkt_vld_d1 (
dff_s #(1) spu_pkt_vld_d1 (
        .din    (spu_lsu_ldst_pckt_vld),
        .din    (spu_lsu_ldst_pckt_vld),
        .q      (strm_pkt_vld_unmasked),
        .q      (strm_pkt_vld_unmasked),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  strm_pkt_vld =
assign  strm_pkt_vld =
        strm_pkt_vld_unmasked & ~(strm_pcx_rq_sel_d1 | lsu_spu_ldst_ack | spu_ack_d1);
        strm_pkt_vld_unmasked & ~(strm_pcx_rq_sel_d1 | lsu_spu_ldst_ack | spu_ack_d1);
 
 
Line 2580... Line 1194...
// Stage by a cycle.
// Stage by a cycle.
 
 
// Thread0
// Thread0
wire    [2:1]   stb0_rqtype ;
wire    [2:1]   stb0_rqtype ;
wire    [2:0]    stb0_rqaddr ;
wire    [2:0]    stb0_rqaddr ;
dff #(5) stgd1_s0rq (
dff_s #(5) stgd1_s0rq (
        .din    ({stb0_atm_rq_type[2:1], stb0_l2b_addr[2:0]}),
        .din    ({stb0_atm_rq_type[2:1], stb0_l2b_addr[2:0]}),
        .q      ({stb0_rqtype[2:1],stb0_rqaddr[2:0]}),
        .q      ({stb0_rqtype[2:1],stb0_rqaddr[2:0]}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Thread1
// Thread1
wire    [2:1]   stb1_rqtype ;
wire    [2:1]   stb1_rqtype ;
wire    [2:0]    stb1_rqaddr ;
wire    [2:0]    stb1_rqaddr ;
dff #(5) stgd1_s1rq (
dff_s #(5) stgd1_s1rq (
        .din    ({stb1_atm_rq_type[2:1], stb1_l2b_addr[2:0]}),
        .din    ({stb1_atm_rq_type[2:1], stb1_l2b_addr[2:0]}),
        .q      ({stb1_rqtype[2:1],stb1_rqaddr[2:0]}),
        .q      ({stb1_rqtype[2:1],stb1_rqaddr[2:0]}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Thread2
// Thread2
wire    [2:1]   stb2_rqtype ;
wire    [2:1]   stb2_rqtype ;
wire    [2:0]    stb2_rqaddr ;
wire    [2:0]    stb2_rqaddr ;
dff #(5) stgd1_s2rq (
dff_s #(5) stgd1_s2rq (
        .din    ({stb2_atm_rq_type[2:1], stb2_l2b_addr[2:0]}),
        .din    ({stb2_atm_rq_type[2:1], stb2_l2b_addr[2:0]}),
        .q      ({stb2_rqtype[2:1],stb2_rqaddr[2:0]}),
        .q      ({stb2_rqtype[2:1],stb2_rqaddr[2:0]}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Thread3
// Thread3
wire    [2:1]   stb3_rqtype ;
wire    [2:1]   stb3_rqtype ;
wire    [2:0]    stb3_rqaddr ;
wire    [2:0]    stb3_rqaddr ;
dff #(5) stgd1_s3rq (
dff_s #(5) stgd1_s3rq (
        .din    ({stb3_atm_rq_type[2:1], stb3_l2b_addr[2:0]}),
        .din    ({stb3_atm_rq_type[2:1], stb3_l2b_addr[2:0]}),
        .q      ({stb3_rqtype[2:1],stb3_rqaddr[2:0]}),
        .q      ({stb3_rqtype[2:1],stb3_rqaddr[2:0]}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    stb0_rd_for_pcx,stb1_rd_for_pcx,stb2_rd_for_pcx,stb3_rd_for_pcx ;
wire    stb0_rd_for_pcx,stb1_rd_for_pcx,stb2_rd_for_pcx,stb3_rd_for_pcx ;
wire    stb0_rd_for_pcx_tmp,stb1_rd_for_pcx_tmp,stb2_rd_for_pcx_tmp,stb3_rd_for_pcx_tmp ;
wire    stb0_rd_for_pcx_tmp,stb1_rd_for_pcx_tmp,stb2_rd_for_pcx_tmp,stb3_rd_for_pcx_tmp ;
dff #(4) stgd1_rdpcx (
dff_s #(4) stgd1_rdpcx (
        .din    (stb_rd_for_pcx[3:0]),
        .din    (stb_rd_for_pcx[3:0]),
        .q      ({stb3_rd_for_pcx_tmp,stb2_rd_for_pcx_tmp,stb1_rd_for_pcx_tmp,stb0_rd_for_pcx_tmp}),
        .q      ({stb3_rd_for_pcx_tmp,stb2_rd_for_pcx_tmp,stb1_rd_for_pcx_tmp,stb0_rd_for_pcx_tmp}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// timing fix: 5/6 - move kill qual after store pick
// timing fix: 5/6 - move kill qual after store pick
//assign        stb0_rd_for_pcx = stb0_rd_for_pcx_tmp & ~lsu_st_pcx_rq_kill_w2[0] ;
//assign        stb0_rd_for_pcx = stb0_rd_for_pcx_tmp & ~lsu_st_pcx_rq_kill_w2[0] ;
//assign        stb1_rd_for_pcx = stb1_rd_for_pcx_tmp & ~lsu_st_pcx_rq_kill_w2[1] ;
//assign        stb1_rd_for_pcx = stb1_rd_for_pcx_tmp & ~lsu_st_pcx_rq_kill_w2[1] ;
Line 2730... Line 1344...
   wire [1:0] bld_thrd_dout;
   wire [1:0] bld_thrd_dout;
   wire [3:0] bld_dcd_thrd;
   wire [3:0] bld_dcd_thrd;
   wire       ld_03_inst_vld_g;
   wire       ld_03_inst_vld_g;
   wire       bld_pcx_rq_sel_d1;
   wire       bld_pcx_rq_sel_d1;
 
 
dff  stgg_blkasi (
dff_s  stgg_blkasi (
        .din    (lsu_blk_asi_m),
        .din    (lsu_blk_asi_m),
        .q      (blk_asi_g),
        .q      (blk_asi_g),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  bld_helper_cmplt_e = lsu_fldd_vld_en & bld_dout & (
assign  bld_helper_cmplt_e = lsu_fldd_vld_en & bld_dout & (
                             bld_dcd_thrd[0] & lsu_dfill_dcd_thrd[0] |
                             bld_dcd_thrd[0] & lsu_dfill_dcd_thrd[0] |
                             bld_dcd_thrd[1] & lsu_dfill_dcd_thrd[1] |
                             bld_dcd_thrd[1] & lsu_dfill_dcd_thrd[1] |
                             bld_dcd_thrd[2] & lsu_dfill_dcd_thrd[2] |
                             bld_dcd_thrd[2] & lsu_dfill_dcd_thrd[2] |
                             bld_dcd_thrd[3] & lsu_dfill_dcd_thrd[3] );
                             bld_dcd_thrd[3] & lsu_dfill_dcd_thrd[3] );
 
 
 
 
dff #(1) stgm_bldhlpr (
dff_s #(1) stgm_bldhlpr (
        .din    (bld_helper_cmplt_e),
        .din    (bld_helper_cmplt_e),
        .q      (bld_helper_cmplt_m),
        .q      (bld_helper_cmplt_m),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  lsu_bld_helper_cmplt_m = bld_helper_cmplt_m ;
assign  lsu_bld_helper_cmplt_m = bld_helper_cmplt_m ;
 
 
dff #(1) stgg_bldhlpr (
dff_s #(1) stgg_bldhlpr (
        .din    (bld_helper_cmplt_m),
        .din    (bld_helper_cmplt_m),
        .q      (bld_helper_cmplt_g),
        .q      (bld_helper_cmplt_g),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    alt_space_m, alt_space_g, alt_space_w2 ;
wire    alt_space_m, alt_space_g, alt_space_w2 ;
dff stg_aspacem(
dff_s stg_aspacem(
        .din    (ifu_lsu_alt_space_e),
        .din    (ifu_lsu_alt_space_e),
        .q      (alt_space_m),
        .q      (alt_space_m),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff stg_aspaceg(
dff_s stg_aspaceg(
        .din    (alt_space_m),
        .din    (alt_space_m),
        .q      (alt_space_g),
        .q      (alt_space_g),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff stg_aspacew2 (
dff_s stg_aspacew2 (
        .din    (alt_space_g),
        .din    (alt_space_g),
        .q      (alt_space_w2),
        .q      (alt_space_w2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
// PCX bld helper issue :
// PCX bld helper issue :
// 00-1st->01-2nd->10-3rd->11-4th->00
// 00-1st->01-2nd->10-3rd->11-4th->00
Line 2798... Line 1412...
 
 
   assign       bld_g = blk_asi_g & ldst_fp_g & ldst_dbl_g & alt_space_g & ld_03_inst_vld_g ;
   assign       bld_g = blk_asi_g & ldst_fp_g & ldst_dbl_g & alt_space_g & ld_03_inst_vld_g ;
                //~lsu_tlb_perr_ld_rq_kill_w ; // Bug 4645
                //~lsu_tlb_perr_ld_rq_kill_w ; // Bug 4645
 
 
wire    bld_w2 ;
wire    bld_w2 ;
dff #(1) bldstg (
dff_s #(1) bldstg (
        .din    (bld_g),
        .din    (bld_g),
        .q      (bld_w2),
        .q      (bld_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    perr_ld_rq_kill_w2 ;
wire    perr_ld_rq_kill_w2 ;
wire    bld_perr_kill_w2 ;
wire    bld_perr_kill_w2 ;
assign  bld_perr_kill_w2 = bld_w2 & perr_ld_rq_kill_w2 ;
assign  bld_perr_kill_w2 = bld_w2 & perr_ld_rq_kill_w2 ;
 
 
dffre #(2) bld_thrd (
dffre_s #(2) bld_thrd (
        .din  (bld_thrd_din[1:0] ),
        .din  (bld_thrd_din[1:0] ),
        .q    (bld_thrd_dout[1:0]),
        .q    (bld_thrd_dout[1:0]),
        .rst  (bld_reset), .en (bld_g),
        .rst  (bld_reset), .en (bld_g),
        .clk  (clk),
        .clk  (clk),
        .se   (1'b0),       .si (),          .so ()
        .se   (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
   assign bld_dcd_thrd[0] = ~bld_thrd_dout[1] & ~bld_thrd_dout[0];
   assign bld_dcd_thrd[0] = ~bld_thrd_dout[1] & ~bld_thrd_dout[0];
   assign bld_dcd_thrd[1] = ~bld_thrd_dout[1] &  bld_thrd_dout[0];
   assign bld_dcd_thrd[1] = ~bld_thrd_dout[1] &  bld_thrd_dout[0];
   assign bld_dcd_thrd[2] =  bld_thrd_dout[1] & ~bld_thrd_dout[0];
   assign bld_dcd_thrd[2] =  bld_thrd_dout[1] & ~bld_thrd_dout[0];
   assign bld_dcd_thrd[3] =  bld_thrd_dout[1] &  bld_thrd_dout[0];
   assign bld_dcd_thrd[3] =  bld_thrd_dout[1] &  bld_thrd_dout[0];
Line 2836... Line 1450...
 
 
//dff #(1) ff_bld_pcx_rq_sel_d2 (
//dff #(1) ff_bld_pcx_rq_sel_d2 (
//        .din  (bld_pcx_rq_sel_d1),
//        .din  (bld_pcx_rq_sel_d1),
//        .q    (bld_pcx_rq_sel_d2),
//        .q    (bld_pcx_rq_sel_d2),
//        .clk  (clk),
//        .clk  (clk),
//        .se   (1'b0),       .si (),          .so ()
//        .se   (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
//        );                  
//        );                  
 
 
  assign bld_pcx_rq_sel = (ld0_pcx_rq_sel_d2 & bld_dcd_thrd[0] |
  assign bld_pcx_rq_sel = (ld0_pcx_rq_sel_d2 & bld_dcd_thrd[0] |
                           ld1_pcx_rq_sel_d2 & bld_dcd_thrd[1] |
                           ld1_pcx_rq_sel_d2 & bld_dcd_thrd[1] |
                           ld2_pcx_rq_sel_d2 & bld_dcd_thrd[2] |
                           ld2_pcx_rq_sel_d2 & bld_dcd_thrd[2] |
Line 2857... Line 1471...
        (bld_rd_dout[2] & bld_rd_dout[1] & bld_rd_dout[0] & bld_helper_cmplt_g) ;
        (bld_rd_dout[2] & bld_rd_dout[1] & bld_rd_dout[0] & bld_helper_cmplt_g) ;
 
 
assign  lsu_bld_reset = bld_reset ;
assign  lsu_bld_reset = bld_reset ;
 
 
wire    bld_dout_tmp ;
wire    bld_dout_tmp ;
dffre #(3)   bld_pcx_cnt (
dffre_s #(3)   bld_pcx_cnt (
        .din  ({bcnt_din[1:0],bld_din}),
        .din  ({bcnt_din[1:0],bld_din}),
        .q    ({bld_cnt[1:0], bld_dout_tmp}),
        .q    ({bld_cnt[1:0], bld_dout_tmp}),
        .rst  (bld_reset), .en (bld_en),
        .rst  (bld_reset), .en (bld_en),
        .clk  (clk),
        .clk  (clk),
        .se   (1'b0),       .si (),          .so ()
        .se   (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  bld_dout = bld_dout_tmp & ~bld_perr_kill_w2 ;
assign  bld_dout = bld_dout_tmp & ~bld_perr_kill_w2 ;
 
 
// Last one allows ld-rq-vld to be reset.
// Last one allows ld-rq-vld to be reset.
assign  bld_annul[0] =  bld_dcd_thrd[0] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[0] =  bld_dcd_thrd[0] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[1] =  bld_dcd_thrd[1] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[1] =  bld_dcd_thrd[1] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[2] =  bld_dcd_thrd[2] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[2] =  bld_dcd_thrd[2] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[3] =  bld_dcd_thrd[3] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
assign  bld_annul[3] =  bld_dcd_thrd[3] & (bld_dout & ~(bld_cnt[1] & bld_cnt[0])) ;
 
 
dff #(4) bannul_d1 (
dff_s #(4) bannul_d1 (
        .din    (bld_annul[3:0]),
        .din    (bld_annul[3:0]),
        .q      (bld_annul_d1[3:0]),
        .q      (bld_annul_d1[3:0]),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Maintain rd (cpx return pkt counter). This is based on when the blk ld helper completes.
// Maintain rd (cpx return pkt counter). This is based on when the blk ld helper completes.
// lower 3b of rd have to start out as zero.
// lower 3b of rd have to start out as zero.
// Should be asserted 8 times for the entire bld.
// Should be asserted 8 times for the entire bld.
assign  bld_rd_en = (bld_helper_cmplt_m & bld_dout) ;
assign  bld_rd_en = (bld_helper_cmplt_m & bld_dout) ;
assign  bld_rd_din[2:0] = bld_rd_dout_m[2:0] + {2'b00,(bld_helper_cmplt_m & bld_dout)} ;
assign  bld_rd_din[2:0] = bld_rd_dout_m[2:0] + {2'b00,(bld_helper_cmplt_m & bld_dout)} ;
//assign        bld_rd_en = (bld_helper_cmplt_g & bld_dout) ;
//assign        bld_rd_en = (bld_helper_cmplt_g & bld_dout) ;
//assign        bld_rd_din[2:0] = bld_rd_dout[2:0] + {2'b00,(bld_helper_cmplt_g & bld_dout)} ;
//assign        bld_rd_din[2:0] = bld_rd_dout[2:0] + {2'b00,(bld_helper_cmplt_g & bld_dout)} ;
 
 
dffre #(3)   bld_cpx_cnt (
dffre_s #(3)   bld_cpx_cnt (
        .din  (bld_rd_din[2:0]),
        .din  (bld_rd_din[2:0]),
        .q    (bld_rd_dout_m[2:0]),
        .q    (bld_rd_dout_m[2:0]),
            .rst  (bld_reset), .en   (bld_rd_en),
            .rst  (bld_reset), .en   (bld_rd_en),
        .clk  (clk),
        .clk  (clk),
        .se   (1'b0),       .si (),          .so ()
        .se   (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(3) bld_cnt_stg (
dff_s #(3) bld_cnt_stg (
        .din    (bld_rd_dout_m[2:0]),
        .din    (bld_rd_dout_m[2:0]),
        .q      (bld_rd_dout[2:0]),
        .q      (bld_rd_dout[2:0]),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Select appr. rd. (cpx return pkt counter)
// Select appr. rd. (cpx return pkt counter)
assign  lsu_ffu_bld_cnt_w[2:0] = bld_rd_dout[2:0] ;
assign  lsu_ffu_bld_cnt_w[2:0] = bld_rd_dout[2:0] ;
assign  lsu_bld_cnt_m[2:0] = bld_rd_dout_m[2:0] ;
assign  lsu_bld_cnt_m[2:0] = bld_rd_dout_m[2:0] ;
Line 2914... Line 1528...
assign   addr_b54[1:0] = bld_cnt[1:0];
assign   addr_b54[1:0] = bld_cnt[1:0];
 
 
/*wire bld_rq_w2 ;
/*wire bld_rq_w2 ;
assign bld_rq_w2 = bld_dout; */
assign bld_rq_w2 = bld_dout; */
 
 
dff #(2) blkrq_d1 (
dff_s #(2) blkrq_d1 (
        .din    ({addr_b54[1:0]}),
        .din    ({addr_b54[1:0]}),
        .q      ({lsu_bld_rq_addr[1:0]}),
        .q      ({lsu_bld_rq_addr[1:0]}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  lsu_bld_pcx_rq = bld_pcx_rq_sel_d1 & bld_dout ;
assign  lsu_bld_pcx_rq = bld_pcx_rq_sel_d1 & bld_dout ;
 
 
/*dff #(3) blkrq_d1 (
/*dff #(3) blkrq_d1 (
        .din    ({addr_b54[1:0],bld_rq_w2}),
        .din    ({addr_b54[1:0],bld_rq_w2}),
        .q      ({lsu_bld_rq_addr[1:0],lsu_bld_pcx_rq}),
        .q      ({lsu_bld_rq_addr[1:0],lsu_bld_pcx_rq}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );*/
        );*/
 
 
 
 
//=================================================================================================
//=================================================================================================
//      LOAD PCX PKT REQ CONTROL
//      LOAD PCX PKT REQ CONTROL
//=================================================================================================
//=================================================================================================
 
 
// Staging pref.
// Staging pref.
wire pref_inst_m, pref_inst_g ;
wire pref_inst_m, pref_inst_g ;
 
 
dff  stgm_prf (
dff_s  stgm_prf (
        .din    (ifu_lsu_pref_inst_e),
        .din    (ifu_lsu_pref_inst_e),
        .q      (pref_inst_m),
        .q      (pref_inst_m),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff  stgg_prf (
dff_s  stgg_prf (
        .din    (pref_inst_m),
        .din    (pref_inst_m),
        .q      (pref_inst_g),
        .q      (pref_inst_g),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Performance Ctr Info
// Performance Ctr Info
dff #(4)  stgg_dmiss (
dff_s #(4)  stgg_dmiss (
        .din    ({ld3_l2cache_rq,ld2_l2cache_rq,ld1_l2cache_rq,ld0_l2cache_rq}),
        .din    ({ld3_l2cache_rq,ld2_l2cache_rq,ld1_l2cache_rq,ld0_l2cache_rq}),
        .q      (lsu_tlu_dcache_miss_w2[3:0]),
        .q      (lsu_tlu_dcache_miss_w2[3:0]),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire  ld0_l2cache_rq_w2, ld1_l2cache_rq_w2, ld2_l2cache_rq_w2, ld3_l2cache_rq_w2 ;
wire  ld0_l2cache_rq_w2, ld1_l2cache_rq_w2, ld2_l2cache_rq_w2, ld3_l2cache_rq_w2 ;
 
 
assign ld0_l2cache_rq_w2  =  lsu_tlu_dcache_miss_w2[0];
assign ld0_l2cache_rq_w2  =  lsu_tlu_dcache_miss_w2[0];
Line 2984... Line 1598...
 
 
//=========================================================================================
//=========================================================================================
// Shift full-raw/partial-raw logic from rw_ctl to qctl1
// Shift full-raw/partial-raw logic from rw_ctl to qctl1
 
 
wire    ldquad_inst_g ;
wire    ldquad_inst_g ;
dff  ldq_stgg (
dff_s  ldq_stgg (
  .din    (lsu_ldquad_inst_m), .q (ldquad_inst_g),
  .din    (lsu_ldquad_inst_m), .q (ldquad_inst_g),
  .clk    (clk),
  .clk    (clk),
  .se   (1'b0), .si (), .so ()
  .se   (1'b0), `SIMPLY_RISC_SCANIN, .so ()
  );
  );
 
 
wire    io_ld,io_ld_w2 ;
wire    io_ld,io_ld_w2 ;
assign  io_ld = tlb_pgnum_g[39] ; // Bug 4362
assign  io_ld = tlb_pgnum_g[39] ; // Bug 4362
//assign  io_ld = tlb_pgnum_g[39]  & ~(~tlb_pgnum_g[38]  & tlb_pgnum_g[37]) ;
//assign  io_ld = tlb_pgnum_g[39]  & ~(~tlb_pgnum_g[38]  & tlb_pgnum_g[37]) ;
Line 3014... Line 1628...
assign  full_raw_g = |stb_ld_full_raw[7:0] ;
assign  full_raw_g = |stb_ld_full_raw[7:0] ;
assign  partial_raw_g = |stb_ld_partial_raw[7:0] ;
assign  partial_raw_g = |stb_ld_partial_raw[7:0] ;
 
 
wire    stb_cam_mhit_w2 ;
wire    stb_cam_mhit_w2 ;
wire    stb_not_empty_w2 ;
wire    stb_not_empty_w2 ;
dff #(6) stgw2_rawcond (
dff_s #(6) stgw2_rawcond (
        .din    ({full_raw_g,partial_raw_g,stb_cam_mhit,ldq_hit_g,io_ld,stb_not_empty}),
        .din    ({full_raw_g,partial_raw_g,stb_cam_mhit,ldq_hit_g,io_ld,stb_not_empty}),
        .q      ({full_raw_w2,partial_raw_w2,stb_cam_mhit_w2,ldq_hit_w2,io_ld_w2,
        .q      ({full_raw_w2,partial_raw_w2,stb_cam_mhit_w2,ldq_hit_w2,io_ld_w2,
                stb_not_empty_w2}),
                stb_not_empty_w2}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// BEGIN !!! ld_stb_full_raw_g for SAS support only !!!
// BEGIN !!! ld_stb_full_raw_g for SAS support only !!!
//wire  ld_stb_full_raw_g ;
//wire  ld_stb_full_raw_g ;
//wire  ld_stb_partial_raw_g ;
//wire  ld_stb_partial_raw_g ;
Line 3040... Line 1654...
        //(partial_raw_w2 | stb_cam_mhit_w2 | ldq_hit_w2 | (io_ld_w2 & stb_not_empty_w2)) ;
        //(partial_raw_w2 | stb_cam_mhit_w2 | ldq_hit_w2 | (io_ld_w2 & stb_not_empty_w2)) ;
 
 
//=========================================================================================
//=========================================================================================
 
 
/*wire  ld_stb_full_raw_w2 ;
/*wire  ld_stb_full_raw_w2 ;
dff #(1) stgw2_fraw (
dff_s #(1) stgw2_fraw (
        .din    (ld_stb_full_raw_g),
        .din    (ld_stb_full_raw_g),
        .q      (ld_stb_full_raw_w2),
        .q      (ld_stb_full_raw_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        ); */
        ); */
 
 
// THREAD0 LOAD PCX REQUEST CONTROL
// THREAD0 LOAD PCX REQUEST CONTROL
 
 
//=====
//=====
Line 3063... Line 1677...
 wire           pref_rq_vld0_w2,pref_rq_vld1_w2,pref_rq_vld2_w2,pref_rq_vld3_w2 ;
 wire           pref_rq_vld0_w2,pref_rq_vld1_w2,pref_rq_vld2_w2,pref_rq_vld3_w2 ;
 wire           non_l2bnk ;
 wire           non_l2bnk ;
 wire           non_l2bnk_w2 ;
 wire           non_l2bnk_w2 ;
 wire [7:6]     ldst_va_w2 ;
 wire [7:6]     ldst_va_w2 ;
 
 
dff #(7) stgw2_l2crqmx (
dff_s #(7) stgw2_l2crqmx (
        .din    ({
        .din    ({
                //ld_pcx_pkt_wy_g[1:0],
                //ld_pcx_pkt_wy_g[1:0],
                pref_rq_vld0_g,pref_rq_vld1_g,pref_rq_vld2_g,pref_rq_vld3_g,
                pref_rq_vld0_g,pref_rq_vld1_g,pref_rq_vld2_g,pref_rq_vld3_g,
                non_l2bnk,
                non_l2bnk,
                ldst_va_g[7:6]}),
                ldst_va_g[7:6]}),
Line 3075... Line 1689...
                //ld_pcx_pkt_wy_w2[1:0],
                //ld_pcx_pkt_wy_w2[1:0],
                pref_rq_vld0_w2,pref_rq_vld1_w2,pref_rq_vld2_w2,pref_rq_vld3_w2,
                pref_rq_vld0_w2,pref_rq_vld1_w2,pref_rq_vld2_w2,pref_rq_vld3_w2,
                non_l2bnk_w2,
                non_l2bnk_w2,
                ldst_va_w2[7:6]}),
                ldst_va_w2[7:6]}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// wire [1:0]   ld_pcx_pkt_wy_mx0,ld_pcx_pkt_wy_mx1,ld_pcx_pkt_wy_mx2,ld_pcx_pkt_wy_mx3 ;
// wire [1:0]   ld_pcx_pkt_wy_mx0,ld_pcx_pkt_wy_mx1,ld_pcx_pkt_wy_mx2,ld_pcx_pkt_wy_mx3 ;
 wire           pref_rq_vld0_mx,pref_rq_vld1_mx,pref_rq_vld2_mx,pref_rq_vld3_mx ;
 wire           pref_rq_vld0_mx,pref_rq_vld1_mx,pref_rq_vld2_mx,pref_rq_vld3_mx ;
 wire           non_l2bnk_mx0,non_l2bnk_mx1,non_l2bnk_mx2,non_l2bnk_mx3 ;
 wire           non_l2bnk_mx0,non_l2bnk_mx1,non_l2bnk_mx2,non_l2bnk_mx3 ;
Line 3134... Line 1748...
 
 
   wire dbl_force_l2access_g;
   wire dbl_force_l2access_g;
   wire dbl_force_l2access_w2;
   wire dbl_force_l2access_w2;
   assign dbl_force_l2access_g = ldst_dbl_g & ~(ldst_fp_g & ~(alt_space_g & blk_asi_g));
   assign dbl_force_l2access_g = ldst_dbl_g & ~(ldst_fp_g & ~(alt_space_g & blk_asi_g));
 
 
dff #(2) stgw2_atm (
dff_s #(2) stgw2_atm (
        .din    ({atomic_g, dbl_force_l2access_g}),
        .din    ({atomic_g, dbl_force_l2access_g}),
        .q      ({atomic_w2,dbl_force_l2access_w2}),
        .q      ({atomic_w2,dbl_force_l2access_w2}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(1) stgw2_perrkill (
dff_s #(1) stgw2_perrkill (
        .din    (lsu_tlb_perr_ld_rq_kill_w),
        .din    (lsu_tlb_perr_ld_rq_kill_w),
        .q      (perr_ld_rq_kill_w2),
        .q      (perr_ld_rq_kill_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    asi_internal_g,asi_internal_w2;
wire    asi_internal_g,asi_internal_w2;
dff #(1) stgg_intasi (
dff_s #(1) stgg_intasi (
        .din    (asi_internal_m),
        .din    (asi_internal_m),
        .q      (asi_internal_g),
        .q      (asi_internal_g),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(1) stgw2_intasi (
dff_s #(1) stgw2_intasi (
        .din    (asi_internal_g),
        .din    (asi_internal_g),
        .q      (asi_internal_w2),
        .q      (asi_internal_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    ld0_l2cache_rq_kill ;
wire    ld0_l2cache_rq_kill ;
assign  ld0_l2cache_rq_kill =
assign  ld0_l2cache_rq_kill =
        ld0_inst_vld_w2 & ((ld_stb_full_raw_w2 & ~dbl_force_l2access_w2) | perr_ld_rq_kill_w2) ;
        ld0_inst_vld_w2 & ((ld_stb_full_raw_w2 & ~dbl_force_l2access_w2) | perr_ld_rq_kill_w2) ;
Line 3215... Line 1829...
wire  ld2_pkt_vld_unmasked ;
wire  ld2_pkt_vld_unmasked ;
wire  ld3_pkt_vld_unmasked ;
wire  ld3_pkt_vld_unmasked ;
 
 
// ld valid until request made.
// ld valid until request made.
wire pref_rq_vld0;
wire pref_rq_vld0;
dffre #(2)  ld0_vld (
dffre_s #(2)  ld0_vld (
        .din    ({ld0_l2cache_rq, pref_rq_vld0_mx}    ),
        .din    ({ld0_l2cache_rq, pref_rq_vld0_mx}    ),
        .q      ({ld0_pkt_vld_unmasked, pref_rq_vld0}),
        .q      ({ld0_pkt_vld_unmasked, pref_rq_vld0}),
  .rst  (ld0_vld_reset),  .en (ld0_l2cache_rq),
  .rst  (ld0_vld_reset),  .en (ld0_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// bug2705 - speculative pick in w-cycle -begin
// bug2705 - speculative pick in w-cycle -begin
// dbl_force_l2access_g is set for ldd(f),std(f),ldq,stq
// dbl_force_l2access_g is set for ldd(f),std(f),ldq,stq
//perf fix: 7/29/03 - kill spec vld if other thread non-spec valids are set
//perf fix: 7/29/03 - kill spec vld if other thread non-spec valids are set
//timing fix: 8/29/03 - flop atomic_m and ldxa_internal_m from dctl for spec req
//timing fix: 8/29/03 - flop atomic_m and ldxa_internal_m from dctl for spec req
wire    atomic_or_ldxa_internal_rq_m ;
wire    atomic_or_ldxa_internal_rq_m ;
assign  atomic_or_ldxa_internal_rq_m  =  atomic_m | lda_internal_m ;
assign  atomic_or_ldxa_internal_rq_m  =  atomic_m | lda_internal_m ;
 
 
dff #(1) ff_atomic_or_ldxa_internal_rq_g (
dff_s #(1) ff_atomic_or_ldxa_internal_rq_g (
        .din    (atomic_or_ldxa_internal_rq_m),
        .din    (atomic_or_ldxa_internal_rq_m),
        .q      (atomic_or_ldxa_internal_rq_g),
        .q      (atomic_or_ldxa_internal_rq_g),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    ld0_spec_vld_g ;
wire    ld0_spec_vld_g ;
assign  ld0_spec_vld_g  =  ld0_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g &
assign  ld0_spec_vld_g  =  ld0_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~(ld1_pkt_vld_unmasked | ld2_pkt_vld_unmasked | ld3_pkt_vld_unmasked);
                           ~(ld1_pkt_vld_unmasked | ld2_pkt_vld_unmasked | ld3_pkt_vld_unmasked);
//assign  ld0_spec_vld_g  =  ld0_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
//assign  ld0_spec_vld_g  =  ld0_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
 
 
dff #(1) ff_ld0_spec_pick_vld_w2 (
dff_s #(1) ff_ld0_spec_pick_vld_w2 (
        .din    (ld0_spec_pick_vld_g),
        .din    (ld0_spec_pick_vld_g),
        .q      (ld0_spec_pick_vld_w2),
        .q      (ld0_spec_pick_vld_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// kill packet valid if spec req is picked in w and stb hits in w2
// kill packet valid if spec req is picked in w and stb hits in w2
// cannot use ld0_ldbl_rawp_en_w2 because it is late signal instead use ld0_ldbl_rq_w2
// cannot use ld0_ldbl_rawp_en_w2 because it is late signal instead use ld0_ldbl_rq_w2
//timing fix: 7/21/03 - kill pkt vld if spec pick in w-cycle was to non$ address
//timing fix: 7/21/03 - kill pkt vld if spec pick in w-cycle was to non$ address
Line 3271... Line 1885...
//assign  ld0_pkt_vld = ld0_pkt_vld_unmasked & ~ld0_pcx_rq_sel_d1 ; 
//assign  ld0_pkt_vld = ld0_pkt_vld_unmasked & ~ld0_pcx_rq_sel_d1 ; 
 
 
assign  ld0_fill_reset = reset | (lsu_dfq_ld_vld & lsu_dcfill_active_e & dfq_byp_sel[0]) ;
assign  ld0_fill_reset = reset | (lsu_dfq_ld_vld & lsu_dcfill_active_e & dfq_byp_sel[0]) ;
 
 
 
 
dff #(4) stgm_lduwyd1 (
dff_s #(4) stgm_lduwyd1 (
        .din    ({ld0_fill_reset,ld1_fill_reset,ld2_fill_reset,ld3_fill_reset}),
        .din    ({ld0_fill_reset,ld1_fill_reset,ld2_fill_reset,ld3_fill_reset}),
        .q      ({ld0_fill_reset_d1,ld1_fill_reset_d1,ld2_fill_reset_d1,ld3_fill_reset_d1}),
        .q      ({ld0_fill_reset_d1,ld1_fill_reset_d1,ld2_fill_reset_d1,ld3_fill_reset_d1}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(4) stgm_lduwyd2 (
dff_s #(4) stgm_lduwyd2 (
        .din    ({ld0_fill_reset_d1,ld1_fill_reset_d1,ld2_fill_reset_d1,ld3_fill_reset_d1}),
        .din    ({ld0_fill_reset_d1,ld1_fill_reset_d1,ld2_fill_reset_d1,ld3_fill_reset_d1}),
        .q      ({ld0_fill_reset_d2_tmp,ld1_fill_reset_d2_tmp,ld2_fill_reset_d2_tmp,ld3_fill_reset_d2_tmp}),
        .q      ({ld0_fill_reset_d2_tmp,ld1_fill_reset_d2_tmp,ld2_fill_reset_d2_tmp,ld3_fill_reset_d2_tmp}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire  ld0_l2cache_rq_w2_tmp;
wire  ld0_l2cache_rq_w2_tmp;
wire  ld0_l2cache_rq_g_tmp;
wire  ld0_l2cache_rq_g_tmp;
 
 
assign ld0_l2cache_rq_g_tmp  =  ld0_l2cache_rq_g & ~pref_inst_g ;
assign ld0_l2cache_rq_g_tmp  =  ld0_l2cache_rq_g & ~pref_inst_g ;
 
 
dff #(1) ff_ld0_l2cache_rq_w2 (
dff_s #(1) ff_ld0_l2cache_rq_w2 (
        .din    (ld0_l2cache_rq_g_tmp),
        .din    (ld0_l2cache_rq_g_tmp),
        .q      (ld0_l2cache_rq_w2_tmp),
        .q      (ld0_l2cache_rq_w2_tmp),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
//wire ld0_unfilled_en ;
//wire ld0_unfilled_en ;
//assign        ld0_unfilled_en = ld0_l2cache_rq & ~pref_inst_g ;
//assign        ld0_unfilled_en = ld0_l2cache_rq & ~pref_inst_g ;
Line 3307... Line 1921...
 
 
wire  ld0_l2cache_rq_tmp;
wire  ld0_l2cache_rq_tmp;
assign ld0_l2cache_rq_tmp  = ld0_unfilled_wy_en & ~ld0_l2cache_rq_kill;
assign ld0_l2cache_rq_tmp  = ld0_unfilled_wy_en & ~ld0_l2cache_rq_kill;
 
 
// ld valid until fill occur.
// ld valid until fill occur.
dffre #(1)  ld0out_state (
dffre_s #(1)  ld0out_state (
        //.din    (ld0_l2cache_rq),
        //.din    (ld0_l2cache_rq),
        .din    (ld0_l2cache_rq_tmp),
        .din    (ld0_l2cache_rq_tmp),
        .q      (ld0_unfilled_tmp),
        .q      (ld0_unfilled_tmp),
        .rst    (ld0_fill_reset_d2),  .en     (ld0_unfilled_wy_en),
        .rst    (ld0_fill_reset_d2),  .en     (ld0_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dffre #(2)  ld0out_state_way (
dffre_s #(2)  ld0out_state_way (
        //.din    (ld_pcx_pkt_wy_mx0[1:0]}),
        //.din    (ld_pcx_pkt_wy_mx0[1:0]}),
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .q      (ld0_unfilled_wy[1:0]),
        .q      (ld0_unfilled_wy[1:0]),
        .rst    (ld0_fill_reset_d2),  .en     (ld0_unfilled_wy_en),
        .rst    (ld0_fill_reset_d2),  .en     (ld0_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  ld0_fill_reset_d2 = ld0_fill_reset_d2_tmp | ld0_l2cache_rq_kill ;
assign  ld0_fill_reset_d2 = ld0_fill_reset_d2_tmp | ld0_l2cache_rq_kill ;
//assign        ld0_unfilled = ld0_unfilled_tmp & ~ld0_l2cache_rq_kill ;
//assign        ld0_unfilled = ld0_unfilled_tmp & ~ld0_l2cache_rq_kill ;
assign  ld0_unfilled = ld0_unfilled_tmp ;
assign  ld0_unfilled = ld0_unfilled_tmp ;
Line 3334... Line 1948...
//bug3516
//bug3516
//assign  non_l2bnk = tlb_pgnum_g[39] & tlb_pgnum_g[38] ;
//assign  non_l2bnk = tlb_pgnum_g[39] & tlb_pgnum_g[38] ;
assign  non_l2bnk = tlb_pgnum_g[39]  & ~(~tlb_pgnum_g[38]  & tlb_pgnum_g[37]) ;
assign  non_l2bnk = tlb_pgnum_g[39]  & ~(~tlb_pgnum_g[38]  & tlb_pgnum_g[37]) ;
 
 
// ld l2bank address
// ld l2bank address
dffe  #(3) ld0_l2bnka (
dffe_s  #(3) ld0_l2bnka (
        .din    ({non_l2bnk_mx0,ldst_va_mx0[7:6]}),
        .din    ({non_l2bnk_mx0,ldst_va_mx0[7:6]}),
        .q      (ld0_l2bnk_addr[2:0]),
        .q      (ld0_l2bnk_addr[2:0]),
  .en (ld0_l2cache_rq),
  .en (ld0_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - add byp for address to be available in w-cycle
//bug2705 - add byp for address to be available in w-cycle
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
Line 3358... Line 1972...
//                                           ld0_l2bnk_addr[2:0] ;
//                                           ld0_l2bnk_addr[2:0] ;
 
 
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         spec pick and kill pkt vld in w2
//         spec pick and kill pkt vld in w2
dff #(1) ff_non_l2bnk_mx0_d1 (
dff_s #(1) ff_non_l2bnk_mx0_d1 (
        .din    (non_l2bnk_mx0),
        .din    (non_l2bnk_mx0),
        .q      (non_l2bnk_mx0_d1),
        .q      (non_l2bnk_mx0_d1),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - change ld0_l2bnk_addr[2:0] to ld0_l2bnk_addr_mx[2:0]
//bug2705 - change ld0_l2bnk_addr[2:0] to ld0_l2bnk_addr_mx[2:0]
assign ld0_l2bnk_dest[0] = ~ld0_l2bnk_addr_mx[2] & ~ld0_l2bnk_addr_mx[1] & ~ld0_l2bnk_addr_mx[0] ;
assign ld0_l2bnk_dest[0] = ~ld0_l2bnk_addr_mx[2] & ~ld0_l2bnk_addr_mx[1] & ~ld0_l2bnk_addr_mx[0] ;
assign ld0_l2bnk_dest[1] = ~ld0_l2bnk_addr_mx[2] & ~ld0_l2bnk_addr_mx[1] &  ld0_l2bnk_addr_mx[0] ;
assign ld0_l2bnk_dest[1] = ~ld0_l2bnk_addr_mx[2] & ~ld0_l2bnk_addr_mx[1] &  ld0_l2bnk_addr_mx[0] ;
Line 3401... Line 2015...
assign ld1_l2cache_rq =  ld1_l2cache_rq_g | ld1_ldbl_rq_w2 ;
assign ld1_l2cache_rq =  ld1_l2cache_rq_g | ld1_ldbl_rq_w2 ;
 
 
 
 
// ld valid
// ld valid
wire pref_rq_vld1;
wire pref_rq_vld1;
dffre #(2)  ld1_vld (
dffre_s #(2)  ld1_vld (
        .din    ({ld1_l2cache_rq, pref_rq_vld1_mx}),
        .din    ({ld1_l2cache_rq, pref_rq_vld1_mx}),
        .q      ({ld1_pkt_vld_unmasked, pref_rq_vld1}),
        .q      ({ld1_pkt_vld_unmasked, pref_rq_vld1}),
  .rst  (ld1_vld_reset),  .en (ld1_l2cache_rq),
  .rst  (ld1_vld_reset),  .en (ld1_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// bug2705 - speculative pick in w-cycle-begin
// bug2705 - speculative pick in w-cycle-begin
wire    ld1_spec_vld_g ;
wire    ld1_spec_vld_g ;
assign  ld1_spec_vld_g  =  ld1_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g  &
assign  ld1_spec_vld_g  =  ld1_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g  &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~(ld0_pkt_vld_unmasked | ld2_pkt_vld_unmasked | ld3_pkt_vld_unmasked);
                           ~(ld0_pkt_vld_unmasked | ld2_pkt_vld_unmasked | ld3_pkt_vld_unmasked);
//assign  ld1_spec_vld_g  =  ld1_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
//assign  ld1_spec_vld_g  =  ld1_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
 
 
dff #(1) ff_ld1_spec_pick_vld_w2 (
dff_s #(1) ff_ld1_spec_pick_vld_w2 (
        .din    (ld1_spec_pick_vld_g),
        .din    (ld1_spec_pick_vld_g),
        .q      (ld1_spec_pick_vld_w2),
        .q      (ld1_spec_pick_vld_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// kill packet valid if spec req is picked in w and stb hits in w2
// kill packet valid if spec req is picked in w and stb hits in w2
wire    ld1_pkt_vld_tmp ;
wire    ld1_pkt_vld_tmp ;
assign lsu_ld1_spec_vld_kill_w2  =  ld1_spec_pick_vld_w2 & (~ld1_l2cache_rq_w2 | ld1_l2cache_rq_kill | ld1_ldbl_rq_w2 | non_l2bnk_mx1_d1) ;
assign lsu_ld1_spec_vld_kill_w2  =  ld1_spec_pick_vld_w2 & (~ld1_l2cache_rq_w2 | ld1_l2cache_rq_kill | ld1_ldbl_rq_w2 | non_l2bnk_mx1_d1) ;
Line 3444... Line 2058...
wire  ld1_l2cache_rq_g_tmp;
wire  ld1_l2cache_rq_g_tmp;
wire  ld1_l2cache_rq_w2_tmp;
wire  ld1_l2cache_rq_w2_tmp;
 
 
assign ld1_l2cache_rq_g_tmp  =  ld1_l2cache_rq_g & ~pref_inst_g ;
assign ld1_l2cache_rq_g_tmp  =  ld1_l2cache_rq_g & ~pref_inst_g ;
 
 
dff #(1) ff_ld1_l2cache_rq_w2 (
dff_s #(1) ff_ld1_l2cache_rq_w2 (
         .din    (ld1_l2cache_rq_g_tmp),
         .din    (ld1_l2cache_rq_g_tmp),
         .q      (ld1_l2cache_rq_w2_tmp),
         .q      (ld1_l2cache_rq_w2_tmp),
         .clk  (clk),
         .clk  (clk),
         .se     (1'b0),       .si (),          .so ()
         .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
         );
         );
 
 
//wire ld1_unfilled_en ;
//wire ld1_unfilled_en ;
//assign        ld1_unfilled_en = ld1_l2cache_rq & ~pref_inst_g ;
//assign        ld1_unfilled_en = ld1_l2cache_rq & ~pref_inst_g ;
wire ld1_unfilled_wy_en ;
wire ld1_unfilled_wy_en ;
Line 3460... Line 2074...
 
 
wire  ld1_l2cache_rq_tmp;
wire  ld1_l2cache_rq_tmp;
assign ld1_l2cache_rq_tmp  = ld1_unfilled_wy_en & ~ld1_l2cache_rq_kill;
assign ld1_l2cache_rq_tmp  = ld1_unfilled_wy_en & ~ld1_l2cache_rq_kill;
 
 
// ld valid until fill occur.
// ld valid until fill occur.
dffre  #(1)  ld1out_state (
dffre_s  #(1)  ld1out_state (
        //.din    (ld1_l2cache_rq),
        //.din    (ld1_l2cache_rq),
        .din    (ld1_l2cache_rq_tmp),
        .din    (ld1_l2cache_rq_tmp),
        .q      (ld1_unfilled_tmp),
        .q      (ld1_unfilled_tmp),
        .rst    (ld1_fill_reset_d2),  .en     (ld1_unfilled_wy_en),
        .rst    (ld1_fill_reset_d2),  .en     (ld1_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
dffre  #(2)  ld1out_state_way (
dffre_s  #(2)  ld1out_state_way (
        //.din    (ld_pcx_pkt_wy_mx1[1:0]),
        //.din    (ld_pcx_pkt_wy_mx1[1:0]),
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .q      (ld1_unfilled_wy[1:0]),
        .q      (ld1_unfilled_wy[1:0]),
        .rst    (ld1_fill_reset_d2),  .en     (ld1_unfilled_wy_en),
        .rst    (ld1_fill_reset_d2),  .en     (ld1_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
  );
  );
 
 
 
 
assign  ld1_fill_reset_d2 = ld1_fill_reset_d2_tmp | ld1_l2cache_rq_kill ;
assign  ld1_fill_reset_d2 = ld1_fill_reset_d2_tmp | ld1_l2cache_rq_kill ;
//assign        ld1_unfilled = ld1_unfilled_tmp & ~ld1_l2cache_rq_kill ;
//assign        ld1_unfilled = ld1_unfilled_tmp & ~ld1_l2cache_rq_kill ;
assign  ld1_unfilled = ld1_unfilled_tmp ;
assign  ld1_unfilled = ld1_unfilled_tmp ;
 
 
// ld l2bank address
// ld l2bank address
dffe  #(3) ld1_l2bnka (
dffe_s  #(3) ld1_l2bnka (
        .din    ({non_l2bnk_mx1,ldst_va_mx1[7:6]}),
        .din    ({non_l2bnk_mx1,ldst_va_mx1[7:6]}),
        .q      (ld1_l2bnk_addr[2:0]),
        .q      (ld1_l2bnk_addr[2:0]),
  .en (ld1_l2cache_rq),
  .en (ld1_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - add byp for address to be available in w-cycle
//bug2705 - add byp for address to be available in w-cycle
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
Line 3508... Line 2122...
//                                              ld1_l2bnk_addr[2:0] ;
//                                              ld1_l2bnk_addr[2:0] ;
 
 
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         spec pick and kill pkt vld in w2
//         spec pick and kill pkt vld in w2
dff #(1) ff_non_l2bnk_mx1_d1 (
dff_s #(1) ff_non_l2bnk_mx1_d1 (
        .din    (non_l2bnk_mx1),
        .din    (non_l2bnk_mx1),
        .q      (non_l2bnk_mx1_d1),
        .q      (non_l2bnk_mx1_d1),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - change ld1_l2bnk_addr[2:0] to ld1_l2bnk_addr_mx[2:0]
//bug2705 - change ld1_l2bnk_addr[2:0] to ld1_l2bnk_addr_mx[2:0]
assign ld1_l2bnk_dest[0] = ~ld1_l2bnk_addr_mx[2] & ~ld1_l2bnk_addr_mx[1] & ~ld1_l2bnk_addr_mx[0] ;
assign ld1_l2bnk_dest[0] = ~ld1_l2bnk_addr_mx[2] & ~ld1_l2bnk_addr_mx[1] & ~ld1_l2bnk_addr_mx[0] ;
assign ld1_l2bnk_dest[1] = ~ld1_l2bnk_addr_mx[2] & ~ld1_l2bnk_addr_mx[1] &  ld1_l2bnk_addr_mx[0] ;
assign ld1_l2bnk_dest[1] = ~ld1_l2bnk_addr_mx[2] & ~ld1_l2bnk_addr_mx[1] &  ld1_l2bnk_addr_mx[0] ;
Line 3555... Line 2169...
assign ld2_l2cache_rq = ld2_l2cache_rq_g | ld2_ldbl_rq_w2 ;
assign ld2_l2cache_rq = ld2_l2cache_rq_g | ld2_ldbl_rq_w2 ;
 
 
 
 
// ld valid
// ld valid
wire pref_rq_vld2;
wire pref_rq_vld2;
dffre #(2) ld2_vld (
dffre_s #(2) ld2_vld (
        .din    ({ld2_l2cache_rq, pref_rq_vld2_mx}),
        .din    ({ld2_l2cache_rq, pref_rq_vld2_mx}),
        .q      ({ld2_pkt_vld_unmasked, pref_rq_vld2} ),
        .q      ({ld2_pkt_vld_unmasked, pref_rq_vld2} ),
  .rst  (ld2_vld_reset),  .en (ld2_l2cache_rq),
  .rst  (ld2_vld_reset),  .en (ld2_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// bug2705 - speculative pick in w-cycle - begin
// bug2705 - speculative pick in w-cycle - begin
wire    ld2_spec_vld_g ;
wire    ld2_spec_vld_g ;
assign  ld2_spec_vld_g  =  ld2_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g  &
assign  ld2_spec_vld_g  =  ld2_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g  &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~(ld0_pkt_vld_unmasked | ld1_pkt_vld_unmasked | ld3_pkt_vld_unmasked);
                           ~(ld0_pkt_vld_unmasked | ld1_pkt_vld_unmasked | ld3_pkt_vld_unmasked);
//assign  ld2_spec_vld_g  =  ld2_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
//assign  ld2_spec_vld_g  =  ld2_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
 
 
dff #(1) ff_ld2_spec_pick_vld_w2 (
dff_s #(1) ff_ld2_spec_pick_vld_w2 (
        .din    (ld2_spec_pick_vld_g),
        .din    (ld2_spec_pick_vld_g),
        .q      (ld2_spec_pick_vld_w2),
        .q      (ld2_spec_pick_vld_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// kill packet valid if spec req is picked in w and stb hits in w2
// kill packet valid if spec req is picked in w and stb hits in w2
wire    ld2_pkt_vld_tmp ;
wire    ld2_pkt_vld_tmp ;
assign lsu_ld2_spec_vld_kill_w2  =  ld2_spec_pick_vld_w2 & (~ld2_l2cache_rq_w2 | ld2_l2cache_rq_kill | ld2_ldbl_rq_w2 | non_l2bnk_mx2_d1) ;
assign lsu_ld2_spec_vld_kill_w2  =  ld2_spec_pick_vld_w2 & (~ld2_l2cache_rq_w2 | ld2_l2cache_rq_kill | ld2_ldbl_rq_w2 | non_l2bnk_mx2_d1) ;
Line 3598... Line 2212...
wire  ld2_l2cache_rq_g_tmp;
wire  ld2_l2cache_rq_g_tmp;
wire  ld2_l2cache_rq_w2_tmp;
wire  ld2_l2cache_rq_w2_tmp;
 
 
assign ld2_l2cache_rq_g_tmp  =  ld2_l2cache_rq_g & ~pref_inst_g ;
assign ld2_l2cache_rq_g_tmp  =  ld2_l2cache_rq_g & ~pref_inst_g ;
 
 
dff #(1) ff_ld2_l2cache_rq_w2 (
dff_s #(1) ff_ld2_l2cache_rq_w2 (
         .din    (ld2_l2cache_rq_g_tmp),
         .din    (ld2_l2cache_rq_g_tmp),
         .q      (ld2_l2cache_rq_w2_tmp),
         .q      (ld2_l2cache_rq_w2_tmp),
         .clk  (clk),
         .clk  (clk),
         .se     (1'b0),       .si (),          .so ()
         .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
         );
         );
 
 
//wire ld2_unfilled_en ;
//wire ld2_unfilled_en ;
//assign        ld2_unfilled_en = ld2_l2cache_rq & ~pref_inst_g ;
//assign        ld2_unfilled_en = ld2_l2cache_rq & ~pref_inst_g ;
wire ld2_unfilled_wy_en ;
wire ld2_unfilled_wy_en ;
Line 3614... Line 2228...
 
 
wire  ld2_l2cache_rq_tmp;
wire  ld2_l2cache_rq_tmp;
assign ld2_l2cache_rq_tmp  = ld2_unfilled_wy_en & ~ld2_l2cache_rq_kill;
assign ld2_l2cache_rq_tmp  = ld2_unfilled_wy_en & ~ld2_l2cache_rq_kill;
 
 
// ld valid until fill occur.
// ld valid until fill occur.
dffre  #(1) ld2out_state (
dffre_s  #(1) ld2out_state (
        //.din    (ld2_l2cache_rq),
        //.din    (ld2_l2cache_rq),
        .din    (ld2_l2cache_rq_tmp),
        .din    (ld2_l2cache_rq_tmp),
        .q      (ld2_unfilled_tmp),
        .q      (ld2_unfilled_tmp),
        .rst    (ld2_fill_reset_d2),  .en     (ld2_unfilled_wy_en),
        .rst    (ld2_fill_reset_d2),  .en     (ld2_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
dffre  #(2) ld2out_state_way (
dffre_s  #(2) ld2out_state_way (
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .q      (ld2_unfilled_wy[1:0]),
        .q      (ld2_unfilled_wy[1:0]),
        .rst    (ld2_fill_reset_d2),  .en     (ld2_unfilled_wy_en),
        .rst    (ld2_fill_reset_d2),  .en     (ld2_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
assign  ld2_fill_reset_d2 = ld2_fill_reset_d2_tmp | ld2_l2cache_rq_kill ;
assign  ld2_fill_reset_d2 = ld2_fill_reset_d2_tmp | ld2_l2cache_rq_kill ;
//assign        ld2_unfilled = ld2_unfilled_tmp & ~ld2_l2cache_rq_kill ;
//assign        ld2_unfilled = ld2_unfilled_tmp & ~ld2_l2cache_rq_kill ;
assign  ld2_unfilled = ld2_unfilled_tmp ;
assign  ld2_unfilled = ld2_unfilled_tmp ;
 
 
// ld l2bank address
// ld l2bank address
dffe  #(3) ld2_l2bnka (
dffe_s  #(3) ld2_l2bnka (
        .din    ({non_l2bnk_mx2,ldst_va_mx2[7:6]}),
        .din    ({non_l2bnk_mx2,ldst_va_mx2[7:6]}),
        .q      (ld2_l2bnk_addr[2:0]),
        .q      (ld2_l2bnk_addr[2:0]),
  .en (ld2_l2cache_rq),
  .en (ld2_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - add byp for address to be available in w-cycle
//bug2705 - add byp for address to be available in w-cycle
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
Line 3661... Line 2275...
//                                              ld2_l2bnk_addr[2:0] ;
//                                              ld2_l2bnk_addr[2:0] ;
 
 
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         spec pick and kill pkt vld in w2
//         spec pick and kill pkt vld in w2
dff #(1) ff_non_l2bnk_mx2_d1 (
dff_s #(1) ff_non_l2bnk_mx2_d1 (
        .din    (non_l2bnk_mx2),
        .din    (non_l2bnk_mx2),
        .q      (non_l2bnk_mx2_d1),
        .q      (non_l2bnk_mx2_d1),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - change ld2_l2bnk_addr[2:0] to ld2_l2bnk_addr_mx[2:0]
//bug2705 - change ld2_l2bnk_addr[2:0] to ld2_l2bnk_addr_mx[2:0]
assign ld2_l2bnk_dest[0] = ~ld2_l2bnk_addr_mx[2] & ~ld2_l2bnk_addr_mx[1] & ~ld2_l2bnk_addr_mx[0] ;
assign ld2_l2bnk_dest[0] = ~ld2_l2bnk_addr_mx[2] & ~ld2_l2bnk_addr_mx[1] & ~ld2_l2bnk_addr_mx[0] ;
assign ld2_l2bnk_dest[1] = ~ld2_l2bnk_addr_mx[2] & ~ld2_l2bnk_addr_mx[1] &  ld2_l2bnk_addr_mx[0] ;
assign ld2_l2bnk_dest[1] = ~ld2_l2bnk_addr_mx[2] & ~ld2_l2bnk_addr_mx[1] &  ld2_l2bnk_addr_mx[0] ;
Line 3706... Line 2320...
assign  ld3_l2cache_rq =  ld3_l2cache_rq_g | ld3_ldbl_rq_w2 ;
assign  ld3_l2cache_rq =  ld3_l2cache_rq_g | ld3_ldbl_rq_w2 ;
 
 
 
 
// ld valid
// ld valid
wire pref_rq_vld3;
wire pref_rq_vld3;
dffre  #(2) ld3_vld (
dffre_s  #(2) ld3_vld (
        .din    ({ld3_l2cache_rq, pref_rq_vld3_mx} ),
        .din    ({ld3_l2cache_rq, pref_rq_vld3_mx} ),
        .q      ({ld3_pkt_vld_unmasked, pref_rq_vld3}),
        .q      ({ld3_pkt_vld_unmasked, pref_rq_vld3}),
  .rst  (ld3_vld_reset),  .en (ld3_l2cache_rq),
  .rst  (ld3_vld_reset),  .en (ld3_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// bug2705 - speculative pick in w-cycle - begin
// bug2705 - speculative pick in w-cycle - begin
wire    ld3_spec_vld_g ;
wire    ld3_spec_vld_g ;
assign  ld3_spec_vld_g  =  ld3_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g  &
assign  ld3_spec_vld_g  =  ld3_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g  &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~atomic_or_ldxa_internal_rq_g &
                           ~(ld0_pkt_vld_unmasked | ld1_pkt_vld_unmasked | ld2_pkt_vld_unmasked);
                           ~(ld0_pkt_vld_unmasked | ld1_pkt_vld_unmasked | ld2_pkt_vld_unmasked);
//assign  ld3_spec_vld_g  =  ld3_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
//assign  ld3_spec_vld_g  =  ld3_inst_vld_unflushed & lsu_inst_vld_tmp & ~dbl_force_l2access_g & tlb_cam_hit_g ;
 
 
 
 
dff #(1) ff_ld3_spec_pick_vld_w2 (
dff_s #(1) ff_ld3_spec_pick_vld_w2 (
        .din    (ld3_spec_pick_vld_g),
        .din    (ld3_spec_pick_vld_g),
        .q      (ld3_spec_pick_vld_w2),
        .q      (ld3_spec_pick_vld_w2),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// kill packet valid if spec req is picked in w and stb hits in w2
// kill packet valid if spec req is picked in w and stb hits in w2
wire    ld3_pkt_vld_tmp ;
wire    ld3_pkt_vld_tmp ;
assign lsu_ld3_spec_vld_kill_w2  =  ld3_spec_pick_vld_w2 & (~ld3_l2cache_rq_w2 | ld3_l2cache_rq_kill | ld3_ldbl_rq_w2 | non_l2bnk_mx3_d1) ;
assign lsu_ld3_spec_vld_kill_w2  =  ld3_spec_pick_vld_w2 & (~ld3_l2cache_rq_w2 | ld3_l2cache_rq_kill | ld3_ldbl_rq_w2 | non_l2bnk_mx3_d1) ;
Line 3749... Line 2363...
wire  ld3_l2cache_rq_g_tmp;
wire  ld3_l2cache_rq_g_tmp;
wire  ld3_l2cache_rq_w2_tmp;
wire  ld3_l2cache_rq_w2_tmp;
 
 
assign ld3_l2cache_rq_g_tmp  =  ld3_l2cache_rq_g & ~pref_inst_g ;
assign ld3_l2cache_rq_g_tmp  =  ld3_l2cache_rq_g & ~pref_inst_g ;
 
 
dff #(1) ff_ld3_l2cache_rq_w2 (
dff_s #(1) ff_ld3_l2cache_rq_w2 (
         .din    (ld3_l2cache_rq_g_tmp),
         .din    (ld3_l2cache_rq_g_tmp),
         .q      (ld3_l2cache_rq_w2_tmp),
         .q      (ld3_l2cache_rq_w2_tmp),
         .clk  (clk),
         .clk  (clk),
         .se     (1'b0),       .si (),          .so ()
         .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
         );
         );
 
 
//wire ld3_unfilled_en ;
//wire ld3_unfilled_en ;
//assign        ld3_unfilled_en = ld3_l2cache_rq & ~pref_inst_g ;
//assign        ld3_unfilled_en = ld3_l2cache_rq & ~pref_inst_g ;
wire ld3_unfilled_wy_en ;
wire ld3_unfilled_wy_en ;
Line 3765... Line 2379...
 
 
wire  ld3_l2cache_rq_tmp;
wire  ld3_l2cache_rq_tmp;
assign ld3_l2cache_rq_tmp  = ld3_unfilled_wy_en & ~ld3_l2cache_rq_kill;
assign ld3_l2cache_rq_tmp  = ld3_unfilled_wy_en & ~ld3_l2cache_rq_kill;
 
 
// ld valid until fill occur.
// ld valid until fill occur.
dffre #(1)  ld3out_state (
dffre_s #(1)  ld3out_state (
        //.din    (ld3_l2cache_rq),
        //.din    (ld3_l2cache_rq),
        .din    (ld3_l2cache_rq_tmp),
        .din    (ld3_l2cache_rq_tmp),
        .q      (ld3_unfilled_tmp),
        .q      (ld3_unfilled_tmp),
        .rst    (ld3_fill_reset_d2),  .en     (ld3_unfilled_wy_en),
        .rst    (ld3_fill_reset_d2),  .en     (ld3_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
dffre #(2)  ld3out_state_way (
dffre_s #(2)  ld3out_state_way (
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .din    (lsu_lmq_pkt_way_w2[1:0]),
        .q      (ld3_unfilled_wy[1:0]),
        .q      (ld3_unfilled_wy[1:0]),
        .rst    (ld3_fill_reset_d2),  .en     (ld3_unfilled_wy_en),
        .rst    (ld3_fill_reset_d2),  .en     (ld3_unfilled_wy_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
assign  ld3_fill_reset_d2 = ld3_fill_reset_d2_tmp | ld3_l2cache_rq_kill ;
assign  ld3_fill_reset_d2 = ld3_fill_reset_d2_tmp | ld3_l2cache_rq_kill ;
//assign        ld3_unfilled = ld3_unfilled_tmp & ~ld3_l2cache_rq_kill ;
//assign        ld3_unfilled = ld3_unfilled_tmp & ~ld3_l2cache_rq_kill ;
assign  ld3_unfilled = ld3_unfilled_tmp;
assign  ld3_unfilled = ld3_unfilled_tmp;
 
 
// ld l2bank address
// ld l2bank address
dffe  #(3) ld3_l2bnka (
dffe_s  #(3) ld3_l2bnka (
        .din    ({non_l2bnk_mx3,ldst_va_mx3[7:6]}),
        .din    ({non_l2bnk_mx3,ldst_va_mx3[7:6]}),
        .q      (ld3_l2bnk_addr[2:0]),
        .q      (ld3_l2bnk_addr[2:0]),
  .en (ld3_l2cache_rq),
  .en (ld3_l2cache_rq),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705 - add byp for address to be available in w-cycle
//bug2705 - add byp for address to be available in w-cycle
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
Line 3812... Line 2426...
//                                              ld3_l2bnk_addr[2:0] ;
//                                              ld3_l2bnk_addr[2:0] ;
 
 
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//7/21/03: timing fix - non_l2bnk_mx0 (uses tlb_pgnum_g[39:37] which arrives in qctl1 ~400ps)
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         this will cause timing paths in spec pick in w-cycle; hence assume $able access for
//         spec pick and kill pkt vld in w2
//         spec pick and kill pkt vld in w2
dff #(1) ff_non_l2bnk_mx3_d1 (
dff_s #(1) ff_non_l2bnk_mx3_d1 (
        .din    (non_l2bnk_mx3),
        .din    (non_l2bnk_mx3),
        .q      (non_l2bnk_mx3_d1),
        .q      (non_l2bnk_mx3_d1),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
//bug2705 - change ld3_l2bnk_addr[2:0] to ld3_l2bnk_addr_mx[2:0]
//bug2705 - change ld3_l2bnk_addr[2:0] to ld3_l2bnk_addr_mx[2:0]
assign ld3_l2bnk_dest[0] = ~ld3_l2bnk_addr_mx[2] & ~ld3_l2bnk_addr_mx[1] & ~ld3_l2bnk_addr_mx[0] ;
assign ld3_l2bnk_dest[0] = ~ld3_l2bnk_addr_mx[2] & ~ld3_l2bnk_addr_mx[1] & ~ld3_l2bnk_addr_mx[0] ;
Line 3831... Line 2445...
 
 
//=================================================================================================
//=================================================================================================
//  LMQ Miscellaneous Control
//  LMQ Miscellaneous Control
//=================================================================================================
//=================================================================================================
 
 
dff #(1) stgm_cas (
dff_s #(1) stgm_cas (
        .din    (ifu_lsu_casa_e),
        .din    (ifu_lsu_casa_e),
        .q      (casa_m),
        .q      (casa_m),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff  #(1) stgg_cas (
dff_s  #(1) stgg_cas (
        .din    (casa_m),
        .din    (casa_m),
        .q      (casa_g),
        .q      (casa_g),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//assign  casa0_g = casa_g & thread0_g ;
//assign  casa0_g = casa_g & thread0_g ;
//assign  casa1_g = casa_g & thread1_g ;
//assign  casa1_g = casa_g & thread1_g ;
//assign  casa2_g = casa_g & thread2_g ;
//assign  casa2_g = casa_g & thread2_g ;
Line 3867... Line 2481...
// THREAD0
// THREAD0
 
 
// timing fix: 9/15/03 - reduce loading on pcx_rq_for_stb[3:0] to stb_clt[0-3]. it had FO2 (stb_ctl,qdp2 - cap=0.5-0.8)
// timing fix: 9/15/03 - reduce loading on pcx_rq_for_stb[3:0] to stb_clt[0-3]. it had FO2 (stb_ctl,qdp2 - cap=0.5-0.8)
//             move the flop from qdp2 to qctl1
//             move the flop from qdp2 to qctl1
 
 
dff #(4)  ff_pcx_rq_for_stb_d1 (
dff_s #(4)  ff_pcx_rq_for_stb_d1 (
        .din    (pcx_rq_for_stb[3:0]),
        .din    (pcx_rq_for_stb[3:0]),
        .q      (pcx_rq_for_stb_d1[3:0]),
        .q      (pcx_rq_for_stb_d1[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(4)  srqsel_d1 (
dff_s #(4)  srqsel_d1 (
        .din    (pcx_rq_for_stb[3:0]),
        .din    (pcx_rq_for_stb[3:0]),
        //.q      ({st3_pcx_rq_tmp, st2_pcx_rq_tmp,st1_pcx_rq_tmp, st0_pcx_rq_tmp}),
        //.q      ({st3_pcx_rq_tmp, st2_pcx_rq_tmp,st1_pcx_rq_tmp, st0_pcx_rq_tmp}),
        .q      ({st3_pcx_rq_sel_d1, st2_pcx_rq_sel_d1,st1_pcx_rq_sel_d1, st0_pcx_rq_sel_d1}),
        .q      ({st3_pcx_rq_sel_d1, st2_pcx_rq_sel_d1,st1_pcx_rq_sel_d1, st0_pcx_rq_sel_d1}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(4)  srqsel_d2 (
dff_s #(4)  srqsel_d2 (
        .din      ({st3_pcx_rq_sel_d1, st2_pcx_rq_sel_d1,st1_pcx_rq_sel_d1, st0_pcx_rq_sel_d1}),
        .din      ({st3_pcx_rq_sel_d1, st2_pcx_rq_sel_d1,st1_pcx_rq_sel_d1, st0_pcx_rq_sel_d1}),
        .q      ({st3_pcx_rq_sel_d2, st2_pcx_rq_sel_d2,st1_pcx_rq_sel_d2, st0_pcx_rq_sel_d2}),
        .q      ({st3_pcx_rq_sel_d2, st2_pcx_rq_sel_d2,st1_pcx_rq_sel_d2, st0_pcx_rq_sel_d2}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(4)  srqsel_d3 (
dff_s #(4)  srqsel_d3 (
        .din    ({st3_pcx_rq_sel_d2, st2_pcx_rq_sel_d2,st1_pcx_rq_sel_d2, st0_pcx_rq_sel_d2}),
        .din    ({st3_pcx_rq_sel_d2, st2_pcx_rq_sel_d2,st1_pcx_rq_sel_d2, st0_pcx_rq_sel_d2}),
        .q      ({st3_pcx_rq_sel_d3, st2_pcx_rq_sel_d3,st1_pcx_rq_sel_d3, st0_pcx_rq_sel_d3}),
        .q      ({st3_pcx_rq_sel_d3, st2_pcx_rq_sel_d3,st1_pcx_rq_sel_d3, st0_pcx_rq_sel_d3}),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    ld0_ldbl_rawp_en_w2 ;
wire    ld0_ldbl_rawp_en_w2 ;
assign  ld0_ldbl_rawp_en_w2 = ld0_ldbl_rq_w2 & ~ld_rawp_st_ced_w2 & ~ld0_rawp_reset ;
assign  ld0_ldbl_rawp_en_w2 = ld0_ldbl_rq_w2 & ~ld_rawp_st_ced_w2 & ~ld0_rawp_reset ;
 
 
Line 3920... Line 2534...
        //(((ld_stb_partial_raw_g) & ~ld_rawp_st_ced_g & ~ld0_rawp_reset)     // partial_raw
        //(((ld_stb_partial_raw_g) & ~ld_rawp_st_ced_g & ~ld0_rawp_reset)     // partial_raw
        //& ~atomic_g & ld0_inst_vld_g) |          // cas inst - 2nd pkt
        //& ~atomic_g & ld0_inst_vld_g) |          // cas inst - 2nd pkt
        ld0_ldbl_rawp_en_w2 ;
        ld0_ldbl_rawp_en_w2 ;
 
 
// ack-id and wait-for-ack disable - Thread 0
// ack-id and wait-for-ack disable - Thread 0
dffre #(1)  ldrawp0_dis (
dffre_s #(1)  ldrawp0_dis (
        .din    (ld0_rawp_en),
        .din    (ld0_rawp_en),
        .q      (ld0_rawp_disabled),
        .q      (ld0_rawp_disabled),
        .rst    (ld0_rawp_reset),  .en     (ld0_rawp_en),
        .rst    (ld0_rawp_reset),  .en     (ld0_rawp_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dffe #(3)  ldrawp0_ackid (
dffe_s #(3)  ldrawp0_ackid (
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .q      (ld0_rawp_ackid[2:0]),
        .q      (ld0_rawp_ackid[2:0]),
        .en     (ld0_inst_vld_w2),
        .en     (ld0_inst_vld_w2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// THREAD1
// THREAD1
 
 
wire    ld1_ldbl_rawp_en_w2 ;
wire    ld1_ldbl_rawp_en_w2 ;
Line 3957... Line 2571...
        //(((ld_stb_partial_raw_g | (ld_stb_full_raw_g & ldst_dbl_g)) & ~ld_rawp_st_ced_g & ~ld1_rawp_reset) // partial raw
        //(((ld_stb_partial_raw_g | (ld_stb_full_raw_g & ldst_dbl_g)) & ~ld_rawp_st_ced_g & ~ld1_rawp_reset) // partial raw
        //& ~atomic_g  & ld1_inst_vld_g)  |                // cas inst - 2nd pkt
        //& ~atomic_g  & ld1_inst_vld_g)  |                // cas inst - 2nd pkt
        ld1_ldbl_rawp_en_w2 ;
        ld1_ldbl_rawp_en_w2 ;
 
 
// ack-id and wait-for-ack disable - Thread 0
// ack-id and wait-for-ack disable - Thread 0
dffre #(1)  ldrawp1_dis (
dffre_s #(1)  ldrawp1_dis (
        .din    (ld1_rawp_en),
        .din    (ld1_rawp_en),
        .q      (ld1_rawp_disabled),
        .q      (ld1_rawp_disabled),
        .rst    (ld1_rawp_reset),  .en     (ld1_rawp_en),
        .rst    (ld1_rawp_reset),  .en     (ld1_rawp_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dffe #(3)  ldrawp1_ackid (
dffe_s #(3)  ldrawp1_ackid (
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .q      (ld1_rawp_ackid[2:0]),
        .q      (ld1_rawp_ackid[2:0]),
        .en     (ld1_inst_vld_w2),
        .en     (ld1_inst_vld_w2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// THREAD2
// THREAD2
 
 
wire    ld2_ldbl_rawp_en_w2 ;
wire    ld2_ldbl_rawp_en_w2 ;
Line 3991... Line 2605...
        //(((ld_stb_partial_raw_g) & ~ld_rawp_st_ced_g & ~ld2_rawp_reset) // partial raw
        //(((ld_stb_partial_raw_g) & ~ld_rawp_st_ced_g & ~ld2_rawp_reset) // partial raw
        //& ~atomic_g & ld2_inst_vld_g) |          // cas inst - 2nd pkt
        //& ~atomic_g & ld2_inst_vld_g) |          // cas inst - 2nd pkt
        ld2_ldbl_rawp_en_w2 ;
        ld2_ldbl_rawp_en_w2 ;
 
 
// ack-id and wait-for-ack disable - Thread 0
// ack-id and wait-for-ack disable - Thread 0
dffre #(1)  ldrawp2_dis (
dffre_s #(1)  ldrawp2_dis (
        .din    (ld2_rawp_en),
        .din    (ld2_rawp_en),
        .q      (ld2_rawp_disabled),
        .q      (ld2_rawp_disabled),
        .rst    (ld2_rawp_reset),  .en     (ld2_rawp_en),
        .rst    (ld2_rawp_reset),  .en     (ld2_rawp_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dffe #(3)  ldrawp2_ackid (
dffe_s #(3)  ldrawp2_ackid (
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .q      (ld2_rawp_ackid[2:0]),
        .q      (ld2_rawp_ackid[2:0]),
        .en     (ld2_inst_vld_w2),
        .en     (ld2_inst_vld_w2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// THREAD3
// THREAD3
 
 
wire    ld3_ldbl_rawp_en_w2 ;
wire    ld3_ldbl_rawp_en_w2 ;
Line 4025... Line 2639...
        //(((ld_stb_partial_raw_g) & ~ld_rawp_st_ced_g & ~ld3_rawp_reset) // partial raw
        //(((ld_stb_partial_raw_g) & ~ld_rawp_st_ced_g & ~ld3_rawp_reset) // partial raw
        //& ~atomic_g & ld3_inst_vld_g) |          // cas inst - 2nd pkt
        //& ~atomic_g & ld3_inst_vld_g) |          // cas inst - 2nd pkt
        ld3_ldbl_rawp_en_w2 ;
        ld3_ldbl_rawp_en_w2 ;
 
 
// ack-id and wait-for-ack disable - Thread 0
// ack-id and wait-for-ack disable - Thread 0
dffre #(1)  ldrawp3_dis (
dffre_s #(1)  ldrawp3_dis (
        .din    (ld3_rawp_en),
        .din    (ld3_rawp_en),
        .q      (ld3_rawp_disabled),
        .q      (ld3_rawp_disabled),
        .rst    (ld3_rawp_reset),  .en     (ld3_rawp_en),
        .rst    (ld3_rawp_reset),  .en     (ld3_rawp_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dffe #(3)  ldrawp3_ackid (
dffe_s #(3)  ldrawp3_ackid (
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .din    (ld_rawp_st_ackid_w2[2:0]),
        .q      (ld3_rawp_ackid[2:0]),
        .q      (ld3_rawp_ackid[2:0]),
        .en     (ld3_inst_vld_w2),
        .en     (ld3_inst_vld_w2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
 
 
//=================================================================================================
//=================================================================================================
Line 4064... Line 2678...
wire    intrpt_pkt_vld_unmasked ;
wire    intrpt_pkt_vld_unmasked ;
// assumption is that pkt vld cannot be turned around in same cycle
// assumption is that pkt vld cannot be turned around in same cycle
assign intrpt_vld_en = ~intrpt_pkt_vld_unmasked ;
assign intrpt_vld_en = ~intrpt_pkt_vld_unmasked ;
//assign intrpt_vld_en = ~lsu_intrpt_pkt_vld ;
//assign intrpt_vld_en = ~lsu_intrpt_pkt_vld ;
 
 
dff #(1) intpkt_stgd2 (
dff_s #(1) intpkt_stgd2 (
        .din    (intrpt_pcx_rq_sel_d1),
        .din    (intrpt_pcx_rq_sel_d1),
        .q      (intrpt_pcx_rq_sel_d2),
        .q      (intrpt_pcx_rq_sel_d2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// intrpt valid
// intrpt valid
dffre  intrpt_vld (
dffre_s  intrpt_vld (
        .din    (tlu_lsu_pcxpkt_vld),
        .din    (tlu_lsu_pcxpkt_vld),
        .q      (intrpt_pkt_vld_unmasked),
        .q      (intrpt_pkt_vld_unmasked),
        .rst    (intrpt_vld_reset),     .en     (intrpt_vld_en),
        .rst    (intrpt_vld_reset),     .en     (intrpt_vld_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  intrpt_thread[0] = ~tlu_lsu_pcxpkt_tid[19] & ~tlu_lsu_pcxpkt_tid[18] ;
assign  intrpt_thread[0] = ~tlu_lsu_pcxpkt_tid[19] & ~tlu_lsu_pcxpkt_tid[18] ;
assign  intrpt_thread[1] = ~tlu_lsu_pcxpkt_tid[19] &  tlu_lsu_pcxpkt_tid[18] ;
assign  intrpt_thread[1] = ~tlu_lsu_pcxpkt_tid[19] &  tlu_lsu_pcxpkt_tid[18] ;
assign  intrpt_thread[2] =  tlu_lsu_pcxpkt_tid[19] & ~tlu_lsu_pcxpkt_tid[18] ;
assign  intrpt_thread[2] =  tlu_lsu_pcxpkt_tid[19] & ~tlu_lsu_pcxpkt_tid[18] ;
Line 4092... Line 2706...
  (intrpt_thread[1] & lsu_stb_empty[1]) |
  (intrpt_thread[1] & lsu_stb_empty[1]) |
  (intrpt_thread[2] & lsu_stb_empty[2]) |
  (intrpt_thread[2] & lsu_stb_empty[2]) |
  (intrpt_thread[3] & lsu_stb_empty[3]) ;
  (intrpt_thread[3] & lsu_stb_empty[3]) ;
 
 
wire    intrpt_clr_d1 ;
wire    intrpt_clr_d1 ;
dff #(1) intclr_stgd1 (
dff_s #(1) intclr_stgd1 (
        .din    (intrpt_clr),
        .din    (intrpt_clr),
        .q      (intrpt_clr_d1),
        .q      (intrpt_clr_d1),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire    [3:0]    intrpt_cmplt ;
wire    [3:0]    intrpt_cmplt ;
 
 
assign  intrpt_cmplt[0] = lsu_tlu_pcxpkt_ack & intrpt_thread[0] ;
assign  intrpt_cmplt[0] = lsu_tlu_pcxpkt_ack & intrpt_thread[0] ;
assign  intrpt_cmplt[1] = lsu_tlu_pcxpkt_ack & intrpt_thread[1] ;
assign  intrpt_cmplt[1] = lsu_tlu_pcxpkt_ack & intrpt_thread[1] ;
assign  intrpt_cmplt[2] = lsu_tlu_pcxpkt_ack & intrpt_thread[2] ;
assign  intrpt_cmplt[2] = lsu_tlu_pcxpkt_ack & intrpt_thread[2] ;
assign  intrpt_cmplt[3] = lsu_tlu_pcxpkt_ack & intrpt_thread[3] ;
assign  intrpt_cmplt[3] = lsu_tlu_pcxpkt_ack & intrpt_thread[3] ;
 
 
dff #(4) intrpt_stg (
dff_s #(4) intrpt_stg (
        .din    (intrpt_cmplt[3:0]),
        .din    (intrpt_cmplt[3:0]),
        .q      (lsu_intrpt_cmplt[3:0]),
        .q      (lsu_intrpt_cmplt[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  intrpt_pkt_vld =
assign  intrpt_pkt_vld =
intrpt_pkt_vld_unmasked & ~(intrpt_pcx_rq_sel_d1 | intrpt_pcx_rq_sel_d2) & intrpt_clr_d1 ;
intrpt_pkt_vld_unmasked & ~(intrpt_pcx_rq_sel_d1 | intrpt_pcx_rq_sel_d2) & intrpt_clr_d1 ;
 
 
// ** enabled flop should not be required !!
// ** enabled flop should not be required !!
// intrpt l2bank address
// intrpt l2bank address
// ?? Can interrupt requests go to io-bridge ??
// ?? Can interrupt requests go to io-bridge ??
// Using upper 3b of 5b thread field of INTR_W to address 4 l2 banks
// Using upper 3b of 5b thread field of INTR_W to address 4 l2 banks
dffe #(3) intrpt_l2bnka (
dffe_s #(3) intrpt_l2bnka (
        .din    ({1'b0,tlu_lsu_pcxpkt_l2baddr[11:10]}),
        .din    ({1'b0,tlu_lsu_pcxpkt_l2baddr[11:10]}),
        .q      (intrpt_l2bnk_addr[2:0]),
        .q      (intrpt_l2bnk_addr[2:0]),
        .en     (intrpt_vld_en),
        .en     (intrpt_vld_en),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// IO Requests should not go to iobrdge.
// IO Requests should not go to iobrdge.
assign intrpt_l2bnk_dest[0] =
assign intrpt_l2bnk_dest[0] =
~intrpt_l2bnk_addr[2] & ~intrpt_l2bnk_addr[1] & ~intrpt_l2bnk_addr[0] ;
~intrpt_l2bnk_addr[2] & ~intrpt_l2bnk_addr[1] & ~intrpt_l2bnk_addr[0] ;
Line 4165... Line 2779...
assign lmq_enable[1] = (ld1_inst_vld_unflushed | pref_vld1_g) & lsu_inst_vld_tmp & ~ifu_lsu_flush_w ;
assign lmq_enable[1] = (ld1_inst_vld_unflushed | pref_vld1_g) & lsu_inst_vld_tmp & ~ifu_lsu_flush_w ;
assign lmq_enable[2] = (ld2_inst_vld_unflushed | pref_vld2_g) & lsu_inst_vld_tmp & ~ifu_lsu_flush_w ;
assign lmq_enable[2] = (ld2_inst_vld_unflushed | pref_vld2_g) & lsu_inst_vld_tmp & ~ifu_lsu_flush_w ;
assign lmq_enable[3] = (ld3_inst_vld_unflushed | pref_vld3_g) & lsu_inst_vld_tmp & ~ifu_lsu_flush_w ;
assign lmq_enable[3] = (ld3_inst_vld_unflushed | pref_vld3_g) & lsu_inst_vld_tmp & ~ifu_lsu_flush_w ;
 
 
// timing fix: 5/19/03: move secondary hit way generation to w2
// timing fix: 5/19/03: move secondary hit way generation to w2
dff #(4) ff_lmq_enable_w2 (
dff_s #(4) ff_lmq_enable_w2 (
        .din    (lmq_enable[3:0]),
        .din    (lmq_enable[3:0]),
        .q      (lmq_enable_w2[3:0]),
        .q      (lmq_enable_w2[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
// needs to be 1-hot always.
// needs to be 1-hot always.
assign imiss_pcx_mx_sel = imiss_pcx_rq_sel_d1 ;
assign imiss_pcx_mx_sel = imiss_pcx_rq_sel_d1 ;
Line 4236... Line 2850...
assign  st0_atom_rq = (st0_pcx_rq_sel & st0_atomic_vld) ;
assign  st0_atom_rq = (st0_pcx_rq_sel & st0_atomic_vld) ;
assign  st1_atom_rq = (st1_pcx_rq_sel & st1_atomic_vld) ;
assign  st1_atom_rq = (st1_pcx_rq_sel & st1_atomic_vld) ;
assign  st2_atom_rq = (st2_pcx_rq_sel & st2_atomic_vld) ;
assign  st2_atom_rq = (st2_pcx_rq_sel & st2_atomic_vld) ;
assign  st3_atom_rq = (st3_pcx_rq_sel & st3_atomic_vld) ;
assign  st3_atom_rq = (st3_pcx_rq_sel & st3_atomic_vld) ;
 
 
dff #(8)  avlds_d1 (
dff_s #(8)  avlds_d1 (
        .din    ({st0_atom_rq,st1_atom_rq,st2_atom_rq,st3_atom_rq,
        .din    ({st0_atom_rq,st1_atom_rq,st2_atom_rq,st3_atom_rq,
    st0_cas_vld,st1_cas_vld,st2_cas_vld,st3_cas_vld}),
    st0_cas_vld,st1_cas_vld,st2_cas_vld,st3_cas_vld}),
        .q      ({st0_atom_rq_d1,st1_atom_rq_d1,st2_atom_rq_d1,st3_atom_rq_d1,
        .q      ({st0_atom_rq_d1,st1_atom_rq_d1,st2_atom_rq_d1,st3_atom_rq_d1,
    st0_cas_vld_d1,st1_cas_vld_d1,st2_cas_vld_d1,st3_cas_vld_d1}),
    st0_cas_vld_d1,st1_cas_vld_d1,st2_cas_vld_d1,st3_cas_vld_d1}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(8)  avlds_d2 (
dff_s #(8)  avlds_d2 (
        .din    ({st0_atom_rq_d1,st1_atom_rq_d1,st2_atom_rq_d1,st3_atom_rq_d1,
        .din    ({st0_atom_rq_d1,st1_atom_rq_d1,st2_atom_rq_d1,st3_atom_rq_d1,
    st0_cas_vld_d1,st1_cas_vld_d1,st2_cas_vld_d1,st3_cas_vld_d1}),
    st0_cas_vld_d1,st1_cas_vld_d1,st2_cas_vld_d1,st3_cas_vld_d1}),
        .q      ({st0_atom_rq_d2,st1_atom_rq_d2,st2_atom_rq_d2,st3_atom_rq_d2,
        .q      ({st0_atom_rq_d2,st1_atom_rq_d2,st2_atom_rq_d2,st3_atom_rq_d2,
    st0_cas_vld_d2,st1_cas_vld_d2,st2_cas_vld_d2,st3_cas_vld_d2}),
    st0_cas_vld_d2,st1_cas_vld_d2,st2_cas_vld_d2,st3_cas_vld_d2}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//timing fix : 7/28/03 - move the OR before flop
//timing fix : 7/28/03 - move the OR before flop
assign st_atom_rq = st0_atom_rq | st1_atom_rq | st2_atom_rq | st3_atom_rq ;
assign st_atom_rq = st0_atom_rq | st1_atom_rq | st2_atom_rq | st3_atom_rq ;
//assign st_atom_rq_d1 = st0_atom_rq_d1 | st1_atom_rq_d1 | st2_atom_rq_d1 | st3_atom_rq_d1 ; 
//assign st_atom_rq_d1 = st0_atom_rq_d1 | st1_atom_rq_d1 | st2_atom_rq_d1 | st3_atom_rq_d1 ; 
 
 
// timing fix: 7/28/03 - move the OR before flop
// timing fix: 7/28/03 - move the OR before flop
dff #(1)  ff_st_atom_pq (
dff_s #(1)  ff_st_atom_pq (
  .din (st_atom_rq),
  .din (st_atom_rq),
  .q   (st_atom_rq_d1),
  .q   (st_atom_rq_d1),
  .clk (clk),
  .clk (clk),
  .se  (1'b0), .si (), .so ()
  .se  (1'b0), `SIMPLY_RISC_SCANIN, .so ()
  );
  );
 
 
 
 
assign st_cas_rq_d2 =
assign st_cas_rq_d2 =
  (st0_atom_rq_d2 & st0_cas_vld_d2)  |
  (st0_atom_rq_d2 & st0_cas_vld_d2)  |
Line 4287... Line 2901...
//    fpop_atom_rq_pq ;
//    fpop_atom_rq_pq ;
 
 
wire  spc_pcx_atom_w, spc_pcx_atom_pq_tmp ;
wire  spc_pcx_atom_w, spc_pcx_atom_pq_tmp ;
assign spc_pcx_atom_w  =  st_atom_rq | fpop_atom_req ;
assign spc_pcx_atom_w  =  st_atom_rq | fpop_atom_req ;
 
 
dff #(1)  ff_spc_pcx_atom_pq (
dff_s #(1)  ff_spc_pcx_atom_pq (
  .din (spc_pcx_atom_w),
  .din (spc_pcx_atom_w),
  .q   (spc_pcx_atom_pq_tmp),
  .q   (spc_pcx_atom_pq_tmp),
  .clk (clk),
  .clk (clk),
  .se  (1'b0), .si (), .so ()
  .se  (1'b0), `SIMPLY_RISC_SCANIN, .so ()
  );
  );
 
 
bw_u1_buf_30x UZfix_spc_pcx_atom_pq_buf1 ( .a(spc_pcx_atom_pq_tmp), .z(spc_pcx_atom_pq) );
bw_u1_buf_30x UZfix_spc_pcx_atom_pq_buf1 ( .a(spc_pcx_atom_pq_tmp), .z(spc_pcx_atom_pq) );
bw_u1_buf_30x UZsize_spc_pcx_atom_pq_buf2 ( .a(spc_pcx_atom_pq_tmp), .z(spc_pcx_atom_pq_buf2) );
bw_u1_buf_30x UZsize_spc_pcx_atom_pq_buf2 ( .a(spc_pcx_atom_pq_tmp), .z(spc_pcx_atom_pq_buf2) );
 
 
Line 4334... Line 2948...
  //(|(queue_write[4:0] & strm_l2bnk_dest[4:0])) & strm_pkt_vld & ~mcycle_squash_d1;
  //(|(queue_write[4:0] & strm_l2bnk_dest[4:0])) & strm_pkt_vld & ~mcycle_squash_d1;
 
 
wire lsu_fwdpkt_vld_d1 ;
wire lsu_fwdpkt_vld_d1 ;
wire    [4:0]    fwdpkt_dest_d1 ;
wire    [4:0]    fwdpkt_dest_d1 ;
// This delay is to compensate for the 1-cycle delay for internal rd/wr.
// This delay is to compensate for the 1-cycle delay for internal rd/wr.
dff #(6)  fvld_stgd1 (
dff_s #(6)  fvld_stgd1 (
  .din ({lsu_fwdpkt_vld,lsu_fwdpkt_dest[4:0]}),
  .din ({lsu_fwdpkt_vld,lsu_fwdpkt_dest[4:0]}),
  .q   ({lsu_fwdpkt_vld_d1,fwdpkt_dest_d1[4:0]}),
  .q   ({lsu_fwdpkt_vld_d1,fwdpkt_dest_d1[4:0]}),
  .clk (clk),
  .clk (clk),
  .se  (1'b0), .si (), .so ()
  .se  (1'b0), `SIMPLY_RISC_SCANIN, .so ()
  );
  );
 
 
// FWD PKT
// FWD PKT
//timing fix: 05/20/03 - move mycle_squash_d1 after pick instead of before pick
//timing fix: 05/20/03 - move mycle_squash_d1 after pick instead of before pick
assign fwdpkt_rq_vld =
assign fwdpkt_rq_vld =
Line 4417... Line 3031...
//                  ld1_pcx_rq_pick,ld0_pcx_rq_pick}),
//                  ld1_pcx_rq_pick,ld0_pcx_rq_pick}),
//    .events_final (ld_events_final[3:0]),
//    .events_final (ld_events_final[3:0]),
//    .rclk         (rclk),
//    .rclk         (rclk),
//    .grst_l       (grst_l),
//    .grst_l       (grst_l),
//    .arst_l       (arst_l),
//    .arst_l       (arst_l),
//    .si(),
//    `SIMPLY_RISC_SCANIN,
//    .se(se),
//    .se(se),
//    .so()
//    .so()
//  );
//  );
 
 
lsu_rrobin_picker2 ld4_rrobin  (
lsu_rrobin_picker2 ld4_rrobin  (
Line 4430... Line 3044...
    .pick_one_hot ({ld3_pcx_rq_pick,ld2_pcx_rq_pick,ld1_pcx_rq_pick,ld0_pcx_rq_pick}),
    .pick_one_hot ({ld3_pcx_rq_pick,ld2_pcx_rq_pick,ld1_pcx_rq_pick,ld0_pcx_rq_pick}),
    .events_picked({ld3_pcx_rq_sel,ld2_pcx_rq_sel,ld1_pcx_rq_sel,ld0_pcx_rq_sel}),
    .events_picked({ld3_pcx_rq_sel,ld2_pcx_rq_sel,ld1_pcx_rq_sel,ld0_pcx_rq_sel}),
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so()
    .so()
  );
  );
 
 
 
 
Line 4507... Line 3121...
//    //.en           (pcx_rq_for_stb_en),                                                                
//    //.en           (pcx_rq_for_stb_en),                                                                
//    .events_final (st_events_final[3:0]),
//    .events_final (st_events_final[3:0]),
//    .rclk         (rclk),
//    .rclk         (rclk),
//    .grst_l       (grst_l),
//    .grst_l       (grst_l),
//    .arst_l       (arst_l),
//    .arst_l       (arst_l),
//    .si(),
//    `SIMPLY_RISC_SCANIN,
//    .se(se),
//    .se(se),
//    .so()
//    .so()
//
//
//  );
//  );
 
 
Line 4522... Line 3136...
 
 
    .events_picked(pcx_rq_for_stb[3:0]),
    .events_picked(pcx_rq_for_stb[3:0]),
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so()
    .so()
  );
  );
 
 
 
 
Line 4543... Line 3157...
   wire stb_cam_hit_w;
   wire stb_cam_hit_w;
 
 
//bug3503
//bug3503
assign stb_cam_hit_w  =  stb_cam_hit_bf & lsu_inst_vld_w ;
assign stb_cam_hit_w  =  stb_cam_hit_bf & lsu_inst_vld_w ;
 
 
dff #(1)  stb_cam_hit_stg_w2  (
dff_s #(1)  stb_cam_hit_stg_w2  (
  .din (stb_cam_hit_w),
  .din (stb_cam_hit_w),
  .q   (stb_cam_hit_w2),
  .q   (stb_cam_hit_w2),
  .clk (clk),
  .clk (clk),
  .se  (1'b0), .si (), .so ()
  .se  (1'b0), `SIMPLY_RISC_SCANIN, .so ()
  );
  );
 
 
 
 
//RAW read STB at W3 (not W2), so stb_cam_hit_w2 isn't critical   
//RAW read STB at W3 (not W2), so stb_cam_hit_w2 isn't critical   
//assign pcx_rq_for_stb_en = ~(|lsu_st_ack_rq_stb[3:0]) &   ~stb_cam_hit_w2 & ~stb_cam_wptr_vld;
//assign pcx_rq_for_stb_en = ~(|lsu_st_ack_rq_stb[3:0]) &   ~stb_cam_hit_w2 & ~stb_cam_wptr_vld;
Line 4626... Line 3240...
//                  intrpt_pcx_rq_pick,fwdpkt_pcx_rq_pick}),
//                  intrpt_pcx_rq_pick,fwdpkt_pcx_rq_pick}),
//    .events_final (misc_events_final[3:0]),
//    .events_final (misc_events_final[3:0]),
//    .rclk         (rclk),
//    .rclk         (rclk),
//    .grst_l       (grst_l),
//    .grst_l       (grst_l),
//    .arst_l       (arst_l),
//    .arst_l       (arst_l),
//    .si(),
//    `SIMPLY_RISC_SCANIN,
//    .se(se),
//    .se(se),
//    .so()
//    .so()
//  );
//  );
 
 
lsu_rrobin_picker2 misc4_rrobin  (
lsu_rrobin_picker2 misc4_rrobin  (
Line 4640... Line 3254...
 
 
    .events_picked({strm_pcx_rq_sel,fpop_pcx_rq_sel,intrpt_pcx_rq_sel,fwdpkt_pcx_rq_sel}),
    .events_picked({strm_pcx_rq_sel,fpop_pcx_rq_sel,intrpt_pcx_rq_sel,fwdpkt_pcx_rq_sel}),
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so()
    .so()
  );
  );
 
 
 
 
Line 4718... Line 3332...
    .events_picked(all_pick_status_set[3:0]),
    .events_picked(all_pick_status_set[3:0]),
    //.en           (all4_rrobin_en),      // bug 3348
    //.en           (all4_rrobin_en),      // bug 3348
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so()
    .so()
  );
  );
 
 
 
 
Line 4747... Line 3361...
/*assign  ld0_pcx_rq_sel = ld0_pcx_rq_vld ;
/*assign  ld0_pcx_rq_sel = ld0_pcx_rq_vld ;
assign  ld1_pcx_rq_sel = ld1_pcx_rq_vld & ~ld0_pcx_rq_vld ;
assign  ld1_pcx_rq_sel = ld1_pcx_rq_vld & ~ld0_pcx_rq_vld ;
assign  ld2_pcx_rq_sel = ld2_pcx_rq_vld & ~(ld0_pcx_rq_vld | ld1_pcx_rq_vld);
assign  ld2_pcx_rq_sel = ld2_pcx_rq_vld & ~(ld0_pcx_rq_vld | ld1_pcx_rq_vld);
assign  ld3_pcx_rq_sel = ld3_pcx_rq_vld & ~(ld0_pcx_rq_vld | ld1_pcx_rq_vld | ld2_pcx_rq_vld)   ; */
assign  ld3_pcx_rq_sel = ld3_pcx_rq_vld & ~(ld0_pcx_rq_vld | ld1_pcx_rq_vld | ld2_pcx_rq_vld)   ; */
 
 
dff #(4)  lrsel_stgd1 (
dff_s #(4)  lrsel_stgd1 (
        .din    ({ld0_pcx_rq_sel, ld1_pcx_rq_sel, ld2_pcx_rq_sel, ld3_pcx_rq_sel}),
        .din    ({ld0_pcx_rq_sel, ld1_pcx_rq_sel, ld2_pcx_rq_sel, ld3_pcx_rq_sel}),
        .q      ({ld0_pcx_rq_sel_d1, ld1_pcx_rq_sel_d1, ld2_pcx_rq_sel_d1, ld3_pcx_rq_sel_d1}),
        .q      ({ld0_pcx_rq_sel_d1, ld1_pcx_rq_sel_d1, ld2_pcx_rq_sel_d1, ld3_pcx_rq_sel_d1}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug2705- kill pcx pick if spec vld kill is set
//bug2705- kill pcx pick if spec vld kill is set
assign  lsu_ld0_pcx_rq_sel_d1  =  ld0_pcx_rq_sel_d1 & ~lsu_ld0_spec_vld_kill_w2 ;
assign  lsu_ld0_pcx_rq_sel_d1  =  ld0_pcx_rq_sel_d1 & ~lsu_ld0_spec_vld_kill_w2 ;
assign  lsu_ld1_pcx_rq_sel_d1  =  ld1_pcx_rq_sel_d1 & ~lsu_ld1_spec_vld_kill_w2 ;
assign  lsu_ld1_pcx_rq_sel_d1  =  ld1_pcx_rq_sel_d1 & ~lsu_ld1_spec_vld_kill_w2 ;
assign  lsu_ld2_pcx_rq_sel_d1  =  ld2_pcx_rq_sel_d1 & ~lsu_ld2_spec_vld_kill_w2 ;
assign  lsu_ld2_pcx_rq_sel_d1  =  ld2_pcx_rq_sel_d1 & ~lsu_ld2_spec_vld_kill_w2 ;
assign  lsu_ld3_pcx_rq_sel_d1  =  ld3_pcx_rq_sel_d1 & ~lsu_ld3_spec_vld_kill_w2 ;
assign  lsu_ld3_pcx_rq_sel_d1  =  ld3_pcx_rq_sel_d1 & ~lsu_ld3_spec_vld_kill_w2 ;
 
 
 
 
dff #(4)  lrsel_stgd2 (
dff_s #(4)  lrsel_stgd2 (
        .din    ({lsu_ld0_pcx_rq_sel_d1, lsu_ld1_pcx_rq_sel_d1, lsu_ld2_pcx_rq_sel_d1, lsu_ld3_pcx_rq_sel_d1}),
        .din    ({lsu_ld0_pcx_rq_sel_d1, lsu_ld1_pcx_rq_sel_d1, lsu_ld2_pcx_rq_sel_d1, lsu_ld3_pcx_rq_sel_d1}),
        .q      ({ld0_pcx_rq_sel_d2, ld1_pcx_rq_sel_d2, ld2_pcx_rq_sel_d2, ld3_pcx_rq_sel_d2}),
        .q      ({ld0_pcx_rq_sel_d2, ld1_pcx_rq_sel_d2, ld2_pcx_rq_sel_d2, ld3_pcx_rq_sel_d2}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Used to complete prefetch. Be careful ! ld could be squashed. Add pcx_req_squash.
// Used to complete prefetch. Be careful ! ld could be squashed. Add pcx_req_squash.
assign  lsu_ld_pcx_rq_sel_d2[3] = ld3_pcx_rq_sel_d2 ;
assign  lsu_ld_pcx_rq_sel_d2[3] = ld3_pcx_rq_sel_d2 ;
assign  lsu_ld_pcx_rq_sel_d2[2] = ld2_pcx_rq_sel_d2 ;
assign  lsu_ld_pcx_rq_sel_d2[2] = ld2_pcx_rq_sel_d2 ;
Line 4780... Line 3394...
wire    ld_pcxpkt_vld ;
wire    ld_pcxpkt_vld ;
assign  ld_pcxpkt_vld =
assign  ld_pcxpkt_vld =
  lsu_ld0_pcx_rq_sel_d1 | lsu_ld1_pcx_rq_sel_d1 | lsu_ld2_pcx_rq_sel_d1 | lsu_ld3_pcx_rq_sel_d1 ;
  lsu_ld0_pcx_rq_sel_d1 | lsu_ld1_pcx_rq_sel_d1 | lsu_ld2_pcx_rq_sel_d1 | lsu_ld3_pcx_rq_sel_d1 ;
  //ld0_pcx_rq_sel_d1 | ld1_pcx_rq_sel_d1 | ld2_pcx_rq_sel_d1 | ld3_pcx_rq_sel_d1 ;
  //ld0_pcx_rq_sel_d1 | ld1_pcx_rq_sel_d1 | ld2_pcx_rq_sel_d1 | ld3_pcx_rq_sel_d1 ;
 
 
dff #(1)  icindx_stgd1 (
dff_s #(1)  icindx_stgd1 (
        .din    (ld_pcxpkt_vld),
        .din    (ld_pcxpkt_vld),
        .q      (lsu_ifu_ld_pcxpkt_vld),
        .q      (lsu_ifu_ld_pcxpkt_vld),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
wire  [3:0]           ld_pcx_rq_sel ;
wire  [3:0]           ld_pcx_rq_sel ;
 
 
assign  ld_pcx_rq_sel[0] =  ld0_pcx_rq_sel_d1 | st0_atom_rq_d2 ;
assign  ld_pcx_rq_sel[0] =  ld0_pcx_rq_sel_d1 | st0_atom_rq_d2 ;
Line 4877... Line 3491...
//wire  error_rst_d1 ;
//wire  error_rst_d1 ;
//dff #(1)  erst_stgd1 (
//dff #(1)  erst_stgd1 (
//        .din    (error_rst), 
//        .din    (error_rst), 
//      .q      (error_rst_d1),
//      .q      (error_rst_d1),
//        .clk          (clk),
//        .clk          (clk),
//        .se     (1'b0),       .si (),          .so ()
//        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
//        ); 
//        ); 
 
 
wire   [3:0]  dtag_perr_pkt2_vld ;
wire   [3:0]  dtag_perr_pkt2_vld ;
assign  dtag_perr_pkt2_vld[0] =  lsu_ld0_pcx_rq_sel_d1 & lsu_dtag_perror_w2[0];
assign  dtag_perr_pkt2_vld[0] =  lsu_ld0_pcx_rq_sel_d1 & lsu_dtag_perror_w2[0];
assign  dtag_perr_pkt2_vld[1] =  lsu_ld1_pcx_rq_sel_d1 & lsu_dtag_perror_w2[1];
assign  dtag_perr_pkt2_vld[1] =  lsu_ld1_pcx_rq_sel_d1 & lsu_dtag_perror_w2[1];
assign  dtag_perr_pkt2_vld[2] =  lsu_ld2_pcx_rq_sel_d1 & lsu_dtag_perror_w2[2];
assign  dtag_perr_pkt2_vld[2] =  lsu_ld2_pcx_rq_sel_d1 & lsu_dtag_perror_w2[2];
assign  dtag_perr_pkt2_vld[3] =  lsu_ld3_pcx_rq_sel_d1 & lsu_dtag_perror_w2[3];
assign  dtag_perr_pkt2_vld[3] =  lsu_ld3_pcx_rq_sel_d1 & lsu_dtag_perror_w2[3];
 
 
//bug:2877 - dtag parity error 2nd packet request; flop to sync w/ ld?_pcx_rq_sel_d2
//bug:2877 - dtag parity error 2nd packet request; flop to sync w/ ld?_pcx_rq_sel_d2
dff #(4) ff_dtag_perr_pkt2_vld_d1 (
dff_s #(4) ff_dtag_perr_pkt2_vld_d1 (
        .din    (dtag_perr_pkt2_vld[3:0]),
        .din    (dtag_perr_pkt2_vld[3:0]),
        .q      (dtag_perr_pkt2_vld_d1[3:0]),
        .q      (dtag_perr_pkt2_vld_d1[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
 
 
//bug:2877 - dtag parity error 2nd packet request; error_rst can be removed from mcycle_mask_d1 since
//bug:2877 - dtag parity error 2nd packet request; error_rst can be removed from mcycle_mask_d1 since
Line 4903... Line 3517...
assign  mcycle_squash_d1 =
assign  mcycle_squash_d1 =
 // error_rst | // dtag parity error requires two ld pkts
 // error_rst | // dtag parity error requires two ld pkts
  //(|lsu_error_rst[3:0]) | // dtag parity error requires two ld pkts
  //(|lsu_error_rst[3:0]) | // dtag parity error requires two ld pkts
  spc_pcx_atom_pq_buf2 ;   // cas/fpop
  spc_pcx_atom_pq_buf2 ;   // cas/fpop
 
 
dff #(1)  sqsh_stgd1 (
dff_s #(1)  sqsh_stgd1 (
        .din    (pcx_req_squash),
        .din    (pcx_req_squash),
        .q      (pcx_req_squash_d1),
        .q      (pcx_req_squash_d1),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff #(1)  sqsh_stgd2 (
dff_s #(1)  sqsh_stgd2 (
        .din    (pcx_req_squash_d1),
        .din    (pcx_req_squash_d1),
        .q      (pcx_req_squash_d2),
        .q      (pcx_req_squash_d2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
//timing fix: 9/19/03 - split the lsu_pcx_req_squash to 4 signals to stb_ctl[0-3] to reduce loading
//timing fix: 9/19/03 - split the lsu_pcx_req_squash to 4 signals to stb_ctl[0-3] to reduce loading
assign  lsu_pcx_req_squash = pcx_req_squash & ~st_atom_rq_d1 ;
assign  lsu_pcx_req_squash = pcx_req_squash & ~st_atom_rq_d1 ;
assign  lsu_pcx_req_squash0 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash0 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash1 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash1 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash2 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash2 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash3 = lsu_pcx_req_squash ;
assign  lsu_pcx_req_squash3 = lsu_pcx_req_squash ;
 
 
assign  lsu_pcx_req_squash_d1 = pcx_req_squash_d1 ;
assign  lsu_pcx_req_squash_d1 = pcx_req_squash_d1 ;
 
 
dff #(5)  rsel_stgd1 (
dff_s #(5)  rsel_stgd1 (
        //.din    ({imiss_strm_pcx_rq_sel,
        //.din    ({imiss_strm_pcx_rq_sel,
        .din    ({
        .din    ({
    imiss_pcx_rq_sel, strm_pcx_rq_sel, intrpt_pcx_rq_sel, fpop_pcx_rq_sel,
    imiss_pcx_rq_sel, strm_pcx_rq_sel, intrpt_pcx_rq_sel, fpop_pcx_rq_sel,
    fwdpkt_pcx_rq_sel}),
    fwdpkt_pcx_rq_sel}),
        //.q      ({imiss_strm_pcx_rq_sel_d1,
        //.q      ({imiss_strm_pcx_rq_sel_d1,
        .q      ({
        .q      ({
    imiss_pcx_rq_sel_d1, strm_pcx_rq_sel_d1, intrpt_pcx_rq_sel_d1,fpop_pcx_rq_sel_d1,
    imiss_pcx_rq_sel_d1, strm_pcx_rq_sel_d1, intrpt_pcx_rq_sel_d1,fpop_pcx_rq_sel_d1,
    fwdpkt_pcx_rq_sel_d1}),
    fwdpkt_pcx_rq_sel_d1}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  lsu_imiss_pcx_rq_sel_d1  =  imiss_pcx_rq_sel_d1;
assign  lsu_imiss_pcx_rq_sel_d1  =  imiss_pcx_rq_sel_d1;
 
 
dff  imrqs_stgd2 (
dff_s  imrqs_stgd2 (
        .din    (imiss_pcx_rq_sel_d1),
        .din    (imiss_pcx_rq_sel_d1),
        .q      (imiss_pcx_rq_sel_d2),
        .q      (imiss_pcx_rq_sel_d2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff  fwdrqs_stgd2 (
dff_s  fwdrqs_stgd2 (
        .din    (fwdpkt_pcx_rq_sel_d1),
        .din    (fwdpkt_pcx_rq_sel_d1),
        .q      (fwdpkt_pcx_rq_sel_d2),
        .q      (fwdpkt_pcx_rq_sel_d2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff  fwdrqs_stgd3 (
dff_s  fwdrqs_stgd3 (
        .din    (fwdpkt_pcx_rq_sel_d2),
        .din    (fwdpkt_pcx_rq_sel_d2),
        .q      (fwdpkt_pcx_rq_sel_d3),
        .q      (fwdpkt_pcx_rq_sel_d3),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff  fpop_stgd2 (
dff_s  fpop_stgd2 (
        .din    (fpop_pcx_rq_sel_d1), .q  (fpop_pcx_rq_sel_d2),
        .din    (fpop_pcx_rq_sel_d1), .q  (fpop_pcx_rq_sel_d2),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug4665: add sehold to pcx_pkt_src_sel[1]
//bug4665: add sehold to pcx_pkt_src_sel[1]
//wire  ld_pcx_rq_sel_d1,st_pcx_rq_sel_d1,misc_pcx_rq_sel_d1;
//wire  ld_pcx_rq_sel_d1,st_pcx_rq_sel_d1,misc_pcx_rq_sel_d1;
wire    ld_pcx_rq_sel_d1,st_pcx_rq_sel_d1;
wire    ld_pcx_rq_sel_d1,st_pcx_rq_sel_d1;
wire    all_pcx_rq_pick_b2 ;
wire    all_pcx_rq_pick_b2 ;
assign  all_pcx_rq_pick_b2  =  sehold ? st_pcx_rq_sel_d1 : all_pcx_rq_pick[2] ;
assign  all_pcx_rq_pick_b2  =  sehold ? st_pcx_rq_sel_d1 : all_pcx_rq_pick[2] ;
 
 
dff #(2)  pick_stgd1 (
dff_s #(2)  pick_stgd1 (
        .din    ({all_pcx_rq_pick_b2, all_pcx_rq_pick[1]}),
        .din    ({all_pcx_rq_pick_b2, all_pcx_rq_pick[1]}),
        .q      ({st_pcx_rq_sel_d1,ld_pcx_rq_sel_d1}),
        .q      ({st_pcx_rq_sel_d1,ld_pcx_rq_sel_d1}),
        //.din    ({all_pcx_rq_pick[3], all_pcx_rq_pick_b2, all_pcx_rq_pick[1]}), 
        //.din    ({all_pcx_rq_pick[3], all_pcx_rq_pick_b2, all_pcx_rq_pick[1]}), 
        //.q      ({misc_pcx_rq_sel_d1,st_pcx_rq_sel_d1,ld_pcx_rq_sel_d1}),
        //.q      ({misc_pcx_rq_sel_d1,st_pcx_rq_sel_d1,ld_pcx_rq_sel_d1}),
        //.din    (all_pcx_rq_pick[2:1]), .q      ({st_pcx_rq_sel_d1,ld_pcx_rq_sel_d1}),
        //.din    (all_pcx_rq_pick[2:1]), .q      ({st_pcx_rq_sel_d1,ld_pcx_rq_sel_d1}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// add other sources in such as interrupt and fpop.
// add other sources in such as interrupt and fpop.
//bug:2877 - dtag parity error 2nd packet request; remove error_rst_d1 since dtag parity error does not
//bug:2877 - dtag parity error 2nd packet request; remove error_rst_d1 since dtag parity error does not
//           behave as an atomic
//           behave as an atomic
Line 5110... Line 3724...
  //(current_pkt_dest[4:0] & 
  //(current_pkt_dest[4:0] & 
  //{5{(ld_pcx_rq_vld | st_pcx_rq_vld | imiss_pcx_rq_vld | strm_pcx_rq_vld | intrpt_pcx_rq_vld | fpop_atom_req | fwdpkt_rq_vld)}}) ;
  //{5{(ld_pcx_rq_vld | st_pcx_rq_vld | imiss_pcx_rq_vld | strm_pcx_rq_vld | intrpt_pcx_rq_vld | fpop_atom_req | fwdpkt_rq_vld)}}) ;
 
 
//timing fix: 9/19/03 - instantiate buffer for spc_pcx_req_pq
//timing fix: 9/19/03 - instantiate buffer for spc_pcx_req_pq
wire  [4:0]  spc_pcx_req_pq_tmp ;
wire  [4:0]  spc_pcx_req_pq_tmp ;
dff #(5)  rq_stgpq (
dff_s #(5)  rq_stgpq (
        .din    (spc_pcx_req_g[4:0]), .q  (spc_pcx_req_pq_tmp[4:0]),
        .din    (spc_pcx_req_g[4:0]), .q  (spc_pcx_req_pq_tmp[4:0]),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
bw_u1_buf_30x UZfix_spc_pcx_req_pq0_buf1 ( .a(spc_pcx_req_pq_tmp[0]), .z(spc_pcx_req_pq[0]) );
bw_u1_buf_30x UZfix_spc_pcx_req_pq0_buf1 ( .a(spc_pcx_req_pq_tmp[0]), .z(spc_pcx_req_pq[0]) );
bw_u1_buf_30x UZfix_spc_pcx_req_pq1_buf1 ( .a(spc_pcx_req_pq_tmp[1]), .z(spc_pcx_req_pq[1]) );
bw_u1_buf_30x UZfix_spc_pcx_req_pq1_buf1 ( .a(spc_pcx_req_pq_tmp[1]), .z(spc_pcx_req_pq[1]) );
Line 5136... Line 3750...
//assign spc_pcx_req_vld_pq =  |spc_pcx_req_pq[4:0];
//assign spc_pcx_req_vld_pq =  |spc_pcx_req_pq[4:0];
//
//
//dff #(1)  rq_stgpq1 (
//dff #(1)  rq_stgpq1 (
//        .din    (spc_pcx_req_vld_pq), .q  (spc_pcx_req_vld_pq1),
//        .din    (spc_pcx_req_vld_pq), .q  (spc_pcx_req_vld_pq1),
//        .clk  (clk),
//        .clk  (clk),
//        .se     (1'b0),       .si (),          .so ()
//        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
//        ); 
//        ); 
 
 
assign spc_pcx_req_update_g[4:0] =
assign spc_pcx_req_update_g[4:0] =
        (st_atom_rq_d1 | fpop_atom_rq_pq) ?
        (st_atom_rq_d1 | fpop_atom_rq_pq) ?
        spc_pcx_req_pq_buf2[4:0] :           // Recirculate same request if back to back case - stda, cas etc
        spc_pcx_req_pq_buf2[4:0] :           // Recirculate same request if back to back case - stda, cas etc
        (current_pkt_dest[4:0] &
        (current_pkt_dest[4:0] &
        {5{pcx_rq_sel}}) ;
        {5{pcx_rq_sel}}) ;
        //{5{(ld_pcx_rq_vld | st_pcx_rq_vld | imiss_pcx_rq_vld | strm_pcx_rq_vld | intrpt_pcx_rq_vld | fpop_pcx_rq_vld | fwdpkt_rq_vld)}}) ;
        //{5{(ld_pcx_rq_vld | st_pcx_rq_vld | imiss_pcx_rq_vld | strm_pcx_rq_vld | intrpt_pcx_rq_vld | fpop_pcx_rq_vld | fwdpkt_rq_vld)}}) ;
                                        // Standard request
                                        // Standard request
 
 
dff #(5)  urq_stgpq (
dff_s #(5)  urq_stgpq (
        .din    (spc_pcx_req_update_g[4:0]), .q  (spc_pcx_req_update_w2[4:0]),
        .din    (spc_pcx_req_update_g[4:0]), .q  (spc_pcx_req_update_w2[4:0]),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//=================================================================================================
//=================================================================================================
//      2-CYCLE OP HANDLING
//      2-CYCLE OP HANDLING
//=================================================================================================
//=================================================================================================
Line 5213... Line 3827...
                            (st2_atomic_pend_d1 & ~st2_qmon_2entry_avail) ;                  //recycle/reset
                            (st2_atomic_pend_d1 & ~st2_qmon_2entry_avail) ;                  //recycle/reset
 
 
assign  st3_atomic_pend  =  (pcx_rq_for_stb_tmp[3] & st3_atomic_vld & ~st3_qmon_2entry_avail) |  //set
assign  st3_atomic_pend  =  (pcx_rq_for_stb_tmp[3] & st3_atomic_vld & ~st3_qmon_2entry_avail) |  //set
                            (st3_atomic_pend_d1 & ~st3_qmon_2entry_avail) ;                  //recycle/reset
                            (st3_atomic_pend_d1 & ~st3_qmon_2entry_avail) ;                  //recycle/reset
 
 
dff #(4)  ff_st0to3_atomic_pend_d1 (
dff_s #(4)  ff_st0to3_atomic_pend_d1 (
        .din ({st3_atomic_pend,st2_atomic_pend,st1_atomic_pend,st0_atomic_pend}),
        .din ({st3_atomic_pend,st2_atomic_pend,st1_atomic_pend,st0_atomic_pend}),
        .q   ({st3_atomic_pend_d1,st2_atomic_pend_d1,st1_atomic_pend_d1,st0_atomic_pend_d1}),
        .q   ({st3_atomic_pend_d1,st2_atomic_pend_d1,st1_atomic_pend_d1,st0_atomic_pend_d1}),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
//bug4513 - kill all requests after atomic if 2 entries to the bank are not available
//bug4513 - kill all requests after atomic if 2 entries to the bank are not available
assign  mcycle_mask_qwr[3:0] =
assign  mcycle_mask_qwr[3:0] =
        ({4{st0_atomic_pend}} & st0_l2bnk_dest[3:0]) |
        ({4{st0_atomic_pend}} & st0_l2bnk_dest[3:0]) |
Line 5238... Line 3852...
assign fpop_atomic_pend = (fpop_pcx_rq_sel_tmp & ~fpop_qmon_2entry_avail) |
assign fpop_atomic_pend = (fpop_pcx_rq_sel_tmp & ~fpop_qmon_2entry_avail) |
                          (fpop_atomic_pend_d1 & ~fpop_qmon_2entry_avail) ;
                          (fpop_atomic_pend_d1 & ~fpop_qmon_2entry_avail) ;
 
 
assign  fpop_q_wr[4:0] = fpop_atomic_pend_d1 ? pre_qwr[4:0] : queue_write[4:0] ;
assign  fpop_q_wr[4:0] = fpop_atomic_pend_d1 ? pre_qwr[4:0] : queue_write[4:0] ;
 
 
dff #(1)  ff_fpop_atomic_pend_d1 (
dff_s #(1)  ff_fpop_atomic_pend_d1 (
        .din (fpop_atomic_pend),
        .din (fpop_atomic_pend),
        .q   (fpop_atomic_pend_d1),
        .q   (fpop_atomic_pend_d1),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
dff #(5)  ff_mcycle_mask_qwr_b4to0 (
dff_s #(5)  ff_mcycle_mask_qwr_b4to0 (
        .din ({fpop_atomic_pend,mcycle_mask_qwr[3:0]}),
        .din ({fpop_atomic_pend,mcycle_mask_qwr[3:0]}),
        .q   (mcycle_mask_qwr_d1[4:0]),
        .q   (mcycle_mask_qwr_d1[4:0]),
        .clk  (clk),
        .clk  (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
 
 
//                      PCX REQUEST GENERATION (END)
//                      PCX REQUEST GENERATION (END)
//*************************************************************************************************
//*************************************************************************************************
Line 5302... Line 3916...
// L2 Bank0 Queue Monitor
// L2 Bank0 Queue Monitor
lsu_pcx_qmon  l2bank0_qmon (
lsu_pcx_qmon  l2bank0_qmon (
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so(),
    .so(),
  .send_by_pcx  (pcx_spc_grant_px[0]),
  .send_by_pcx  (pcx_spc_grant_px[0]),
  .send_to_pcx  (spc_pcx_req_update_w2[0]),
  .send_to_pcx  (spc_pcx_req_update_w2[0]),
  //.qwrite   (queue_write[0]),
  //.qwrite   (queue_write[0]),
Line 5317... Line 3931...
// L2 Bank1 Queue Monitor
// L2 Bank1 Queue Monitor
lsu_pcx_qmon  l2bank1_qmon (
lsu_pcx_qmon  l2bank1_qmon (
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so(),
    .so(),
  .send_by_pcx  (pcx_spc_grant_px[1]),
  .send_by_pcx  (pcx_spc_grant_px[1]),
  .send_to_pcx  (spc_pcx_req_update_w2[1]),
  .send_to_pcx  (spc_pcx_req_update_w2[1]),
  //.qwrite   (queue_write[1]),
  //.qwrite   (queue_write[1]),
Line 5332... Line 3946...
// L2 Bank2 Queue Monitor
// L2 Bank2 Queue Monitor
lsu_pcx_qmon  l2bank2_qmon (
lsu_pcx_qmon  l2bank2_qmon (
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so(),
    .so(),
  .send_by_pcx  (pcx_spc_grant_px[2]),
  .send_by_pcx  (pcx_spc_grant_px[2]),
  .send_to_pcx  (spc_pcx_req_update_w2[2]),
  .send_to_pcx  (spc_pcx_req_update_w2[2]),
  //.qwrite   (queue_write[2]),
  //.qwrite   (queue_write[2]),
Line 5347... Line 3961...
// L2 Bank3 Queue Monitor
// L2 Bank3 Queue Monitor
lsu_pcx_qmon  l2bank3_qmon (
lsu_pcx_qmon  l2bank3_qmon (
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so(),
    .so(),
  .send_by_pcx  (pcx_spc_grant_px[3]),
  .send_by_pcx  (pcx_spc_grant_px[3]),
  .send_to_pcx  (spc_pcx_req_update_w2[3]),
  .send_to_pcx  (spc_pcx_req_update_w2[3]),
  //.qwrite   (queue_write[3]),
  //.qwrite   (queue_write[3]),
Line 5362... Line 3976...
// FP/IO Bridge Queue Monitor
// FP/IO Bridge Queue Monitor
lsu_pcx_qmon  fpiobridge_qmon (
lsu_pcx_qmon  fpiobridge_qmon (
    .rclk         (rclk),
    .rclk         (rclk),
    .grst_l       (grst_l),
    .grst_l       (grst_l),
    .arst_l       (arst_l),
    .arst_l       (arst_l),
    .si(),
    `SIMPLY_RISC_SCANIN,
    .se(se),
    .se(se),
    .so(),
    .so(),
  .send_by_pcx  (pcx_spc_grant_px[4]),
  .send_by_pcx  (pcx_spc_grant_px[4]),
  .send_to_pcx  (spc_pcx_req_update_w2[4]),
  .send_to_pcx  (spc_pcx_req_update_w2[4]),
  //.qwrite   (queue_write[4]),
  //.qwrite   (queue_write[4]),
Line 5411... Line 4025...
//assign  lsu_error_rst[3:0]  =  error_rst[3:0];
//assign  lsu_error_rst[3:0]  =  error_rst[3:0];
 
 
wire    dtag_perror3,dtag_perror2,dtag_perror1,dtag_perror0;
wire    dtag_perror3,dtag_perror2,dtag_perror1,dtag_perror0;
 
 
// Thread 0
// Thread 0
dffre  #(1) error_t0 (
dffre_s  #(1) error_t0 (
        .din    (lsu_dcache_tag_perror_g),
        .din    (lsu_dcache_tag_perror_g),
        .q      (dtag_perror0),
        .q      (dtag_perror0),
        .rst  (error_rst_thrd[0]), .en     (error_en[0]),
        .rst  (error_rst_thrd[0]), .en     (error_en[0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Thread 1
// Thread 1
dffre  #(1) error_t1 (
dffre_s  #(1) error_t1 (
        .din    (lsu_dcache_tag_perror_g),
        .din    (lsu_dcache_tag_perror_g),
        .q      (dtag_perror1),
        .q      (dtag_perror1),
        .rst  (error_rst_thrd[1]), .en     (error_en[1]),
        .rst  (error_rst_thrd[1]), .en     (error_en[1]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Thread 2
// Thread 2
dffre  #(1) error_t2 (
dffre_s  #(1) error_t2 (
        .din    (lsu_dcache_tag_perror_g),
        .din    (lsu_dcache_tag_perror_g),
        .q      (dtag_perror2),
        .q      (dtag_perror2),
        .rst  (error_rst_thrd[2]), .en     (error_en[2]),
        .rst  (error_rst_thrd[2]), .en     (error_en[2]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
// Thread 3
// Thread 3
dffre  #(1) error_t3 (
dffre_s  #(1) error_t3 (
        .din    (lsu_dcache_tag_perror_g),
        .din    (lsu_dcache_tag_perror_g),
        .q      (dtag_perror3),
        .q      (dtag_perror3),
        .rst  (error_rst_thrd[3]), .en     (error_en[3]),
        .rst  (error_rst_thrd[3]), .en     (error_en[3]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  lsu_dtag_perror_w2[3] = dtag_perror3 ;
assign  lsu_dtag_perror_w2[3] = dtag_perror3 ;
assign  lsu_dtag_perror_w2[2] = dtag_perror2 ;
assign  lsu_dtag_perror_w2[2] = dtag_perror2 ;
assign  lsu_dtag_perror_w2[1] = dtag_perror1 ;
assign  lsu_dtag_perror_w2[1] = dtag_perror1 ;
Line 5499... Line 4113...
//assign  misc_thrd_pick_status_din[3:0]  =  misc_thrd_pick_din[3:0] & ~{4{misc_thrd_pick_rst}} ;
//assign  misc_thrd_pick_status_din[3:0]  =  misc_thrd_pick_din[3:0] & ~{4{misc_thrd_pick_rst}} ;
 
 
assign  all_thrd_pick_rst  =  ld_thrd_pick_rst & st_thrd_pick_rst & misc_thrd_pick_rst ;
assign  all_thrd_pick_rst  =  ld_thrd_pick_rst & st_thrd_pick_rst & misc_thrd_pick_rst ;
 
 
 
 
dff    #(4) ff_ld_thrd_force(
dff_s    #(4) ff_ld_thrd_force(
        .din    (ld_thrd_pick_status_din[3:0]),
        .din    (ld_thrd_pick_status_din[3:0]),
        .q      (ld_thrd_pick_status[3:0]),
        .q      (ld_thrd_pick_status[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff    #(4) ff_st_thrd_force(
dff_s    #(4) ff_st_thrd_force(
        .din    (st_thrd_pick_status_din[3:0]),
        .din    (st_thrd_pick_status_din[3:0]),
        .q      (st_thrd_pick_status[3:0]),
        .q      (st_thrd_pick_status[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
dff    #(4) ff_misc_thrd_force(
dff_s    #(4) ff_misc_thrd_force(
        .din    (misc_thrd_pick_status_din[3:0]),
        .din    (misc_thrd_pick_status_din[3:0]),
        .q      (misc_thrd_pick_status[3:0]),
        .q      (misc_thrd_pick_status[3:0]),
        .clk    (clk),
        .clk    (clk),
        .se     (1'b0),       .si (),          .so ()
        .se     (1'b0),       `SIMPLY_RISC_SCANIN,          .so ()
        );
        );
 
 
assign  ld_thrd_force_d1[3:0]  =  ~ld_thrd_pick_status[3:0] ;
assign  ld_thrd_force_d1[3:0]  =  ~ld_thrd_pick_status[3:0] ;
assign  st_thrd_force_d1[3:0]  =  ~st_thrd_pick_status[3:0] ;
assign  st_thrd_force_d1[3:0]  =  ~st_thrd_pick_status[3:0] ;
assign  misc_thrd_force_d1[3:0]  =  ~misc_thrd_pick_status[3:0] ;
assign  misc_thrd_force_d1[3:0]  =  ~misc_thrd_pick_status[3:0] ;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.