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

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [sparc_ifu_ifqctl.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
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/*
/*
//  Module Name: sparc_ifu_ifqctl
//  Module Name: sparc_ifu_ifqctl
//  Description:
//  Description:
//  Contains the control logic for the ifq and mil.
//  Contains the control logic for the ifq and mil.
*/
*/
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Global header file includes
// Global header file includes
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
 
 
/*
`include "iop.h"
/* ========== Copyright Header Begin ==========================================
`include "ifu.h"
*
 
* 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: ifu.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 ============================================
 
*/
 
////////////////////////////////////////////////////////////////////////
 
/*
 
//
 
//  Module Name: ifu.h
 
//  Description:
 
//  All ifu defines
 
*/
 
 
 
//--------------------------------------------
 
// Icache Values in IFU::ICD/ICV/ICT/FDP/IFQDP
 
//--------------------------------------------
 
// Set Values
 
 
 
// IC_IDX_HI = log(icache_size/4ways) - 1
 
 
 
 
 
// !!IMPORTANT!! a change to IC_LINE_SZ will mean a change to the code as
 
//   well.  Unfortunately this has not been properly parametrized.
 
//   Changing the IC_LINE_SZ param alone is *not* enough.
 
 
 
 
 
// !!IMPORTANT!! a change to IC_TAG_HI will mean a change to the code as
 
//   well.  Changing the IC_TAG_HI param alone is *not* enough to
 
//   change the PA range. 
 
// highest bit of PA
 
 
 
 
 
 
 
// Derived Values
 
// 4095
 
 
 
 
 
// number of entries - 1 = 511
 
 
 
 
 
// 12
 
 
 
 
 
// 28
 
 
 
 
 
// 7
 
 
 
 
 
// tags for all 4 ways + parity
 
// 116
 
 
 
 
 
// 115
 
 
 
 
 
 
 
//----------------------------------------------------------------------
 
// For thread scheduler in IFU::DTU::SWL
 
//----------------------------------------------------------------------
 
// thread states:  (thr_state[4:0])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// thread configuration register bit fields
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//----------------------------------------------------------------------
 
// For MIL fsm in IFU::IFQ
 
//----------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//---------------------------------------------------
 
// Interrupt Block
 
//---------------------------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//-------------------------------------
 
// IFQ
 
//-------------------------------------
 
// valid bit plus ifill
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//`ifdef SPARC_L2_64B
 
 
 
 
 
//`else
 
//`define BANK_ID_HI 8
 
//`define BANK_ID_LO 7
 
//`endif
 
 
 
//`define CPX_INV_PA_HI  116
 
//`define CPX_INV_PA_LO  112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
//----------------------------------------
 
// IFU Traps
 
//----------------------------------------
 
// precise
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// disrupting
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
module sparc_ifu_ifqctl(/*AUTOARG*/
module sparc_ifu_ifqctl(/*AUTOARG*/
   // Outputs
   // Outputs
   ifu_lsu_inv_clear, ifu_lsu_ibuf_busy, ifu_lsu_asi_ack,
   ifu_lsu_inv_clear, ifu_lsu_ibuf_busy, ifu_lsu_asi_ack,
Line 1102... Line 90...
   input [1:0]    ifd_ifc_instoffset1; // to select inst to TIR
   input [1:0]    ifd_ifc_instoffset1; // to select inst to TIR
   input [1:0]    ifd_ifc_instoffset2; // to select inst to TIR
   input [1:0]    ifd_ifc_instoffset2; // to select inst to TIR
   input [1:0]    ifd_ifc_instoffset3; // to select inst to TIR
   input [1:0]    ifd_ifc_instoffset3; // to select inst to TIR
 
 
   input         ifd_ifc_cpxvalid_i1;
   input         ifd_ifc_cpxvalid_i1;
   input [(143 - 140 + 1):0] ifd_ifc_cpxreq_i1;
   input [`CPX_RQ_SIZE:0] ifd_ifc_cpxreq_i1;
 
 
   input [3:0]   ifd_ifc_cpxreq_nxt;
   input [3:0]   ifd_ifc_cpxreq_nxt;
   input [1:0]   ifd_ifc_cpxthr_nxt;
   input [1:0]   ifd_ifc_cpxthr_nxt;
   input         ifd_ifc_cpxvld_i2;
   input         ifd_ifc_cpxvld_i2;
 
 
Line 1545... Line 533...
 
 
 
 
   // reset buffer
   // reset buffer
   dffrl_async rstff(.din (grst_l),
   dffrl_async rstff(.din (grst_l),
                     .q   (ifq_reset_l),
                     .q   (ifq_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       ifq_reset = ~ifq_reset_l;
   assign       ifq_reset = ~ifq_reset_l;
 
 
 
 
Line 1741... Line 729...
//-------------------------------------------
//-------------------------------------------
// Fill Return Control (IFU interfac to CPX)
// Fill Return Control (IFU interfac to CPX)
//-------------------------------------------
//-------------------------------------------
 
 
   // use soffm2 for lower setup
   // use soffm2 for lower setup
   dffe #(4) cpxreq_reg(.din (ifd_ifc_cpxreq_nxt),
   dffe_s #(4) cpxreq_reg(.din (ifd_ifc_cpxreq_nxt),
                        .q   (cpxreq_i2),
                        .q   (cpxreq_i2),
                        .en  (ifqadv_i1),
                        .en  (ifqadv_i1),
                        .clk (clk), .se(se), .si(), .so());
                        .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dffe #(2) cpxthr_reg(.din (ifd_ifc_cpxthr_nxt),
   dffe_s #(2) cpxthr_reg(.din (ifd_ifc_cpxthr_nxt),
                        .q   (cpxthr_i2),
                        .q   (cpxthr_i2),
                        .en  (ifqadv_i1),
                        .en  (ifqadv_i1),
                        .clk (clk), .se(se), .si(), .so());
                        .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
 
 
   // Decode CPX request
   // Decode CPX request
   assign imissrtn_i1 = (ifd_ifc_cpxreq_i1 == {1'b1, 4'b0001}) ? 1'b1 : 1'b0;
   assign imissrtn_i1 = (ifd_ifc_cpxreq_i1 == `CPX_IFILLPKT) ? 1'b1 : 1'b0;
   assign imissrtn_i2 = (cpxreq_i2 == 4'b0001) ? ifd_ifc_cpxvld_i2 : 1'b0;
   assign imissrtn_i2 = (cpxreq_i2 == `IFILL_RET) ? ifd_ifc_cpxvld_i2 : 1'b0;
 
 
   assign imissrtn_next_i2 = ifc_inv_ifqadv_i2 ? imissrtn_i2 : imissrtn_f;
   assign imissrtn_next_i2 = ifc_inv_ifqadv_i2 ? imissrtn_i2 : imissrtn_f;
 
 
   dff #(1) imsf_ff(.din (imissrtn_next_i2),
   dff_s #(1) imsf_ff(.din (imissrtn_next_i2),
                    .q   (imissrtn_f),
                    .q   (imissrtn_f),
                    .clk (clk), .se (se), .si(), .so());
                    .clk (clk), .se (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // Determine if this is an IFILL RET to one of the threads
   // Determine if this is an IFILL RET to one of the threads
   assign fill_retn_thr_i2 = dfthr_i2 & {4{imissrtn_i2}};
   assign fill_retn_thr_i2 = dfthr_i2 & {4{imissrtn_i2}};
 
 
   // decode current icache fill thread
   // decode current icache fill thread
Line 1783... Line 771...
   assign mil_nc_vec_nxt = ({4{uncached_s & fcl_ifq_rdreq_s1}} &
   assign mil_nc_vec_nxt = ({4{uncached_s & fcl_ifq_rdreq_s1}} &
                              thr_s1 & ~errthr_d1 |
                              thr_s1 & ~errthr_d1 |
                              mil_nc_vec & (mil_valid_s |
                              mil_nc_vec & (mil_valid_s |
                                            errthr_d1));
                                            errthr_d1));
 
 
   dff #(4) nc_reg(.din (mil_nc_vec_nxt),
   dff_s #(4) nc_reg(.din (mil_nc_vec_nxt),
                   .q   (mil_nc_vec),
                   .q   (mil_nc_vec),
                   .clk (clk), .se(se), .si(), .so());
                   .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign mil_nc_i2 = (dfthr_i2[0] & mil_nc_vec[0] |
   assign mil_nc_i2 = (dfthr_i2[0] & mil_nc_vec[0] |
                       dfthr_i2[1] & mil_nc_vec[1] |
                       dfthr_i2[1] & mil_nc_vec[1] |
                       dfthr_i2[2] & mil_nc_vec[2] |
                       dfthr_i2[2] & mil_nc_vec[2] |
                       dfthr_i2[3] & mil_nc_vec[3]);
                       dfthr_i2[3] & mil_nc_vec[3]);
Line 1797... Line 785...
   assign mil_nc_d = (dpcxthr_d[0] & mil_nc_vec[0] |
   assign mil_nc_d = (dpcxthr_d[0] & mil_nc_vec[0] |
                      dpcxthr_d[1] & mil_nc_vec[1] |
                      dpcxthr_d[1] & mil_nc_vec[1] |
                      dpcxthr_d[2] & mil_nc_vec[2] |
                      dpcxthr_d[2] & mil_nc_vec[2] |
                      dpcxthr_d[3] & mil_nc_vec[3]);
                      dpcxthr_d[3] & mil_nc_vec[3]);
 
 
   dff #(1) nce_ff(.din (mil_nc_d),
   dff_s #(1) nce_ff(.din (mil_nc_d),
                   .q   (mil_nc_e),
                   .q   (mil_nc_e),
                   .clk (clk), .se(se), .si(), .so());
                   .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign ifc_ifd_uncached_e = mil_nc_e;
   assign ifc_ifd_uncached_e = mil_nc_e;
 
 
//   assign uncached_fill_i2 = ifd_ifc_uncached_i2 | ifd_ifc_cpxnc_i2;
//   assign uncached_fill_i2 = ifd_ifc_uncached_i2 | ifd_ifc_cpxnc_i2;
   assign uncached_fill_i2 = mil_nc_i2 | ifd_ifc_cpxnc_i2;
   assign uncached_fill_i2 = mil_nc_i2 | ifd_ifc_cpxnc_i2;
 
 
   // uncached fill -- do not write to icache
   // uncached fill -- do not write to icache
   assign uncached_i2 = ifc_inv_ifqadv_i2 ?
   assign uncached_i2 = ifc_inv_ifqadv_i2 ?
                                  uncached_fill_i2 : uncached_f;
                                  uncached_fill_i2 : uncached_f;
 
 
   dff unc_ff(.din (uncached_i2),
   dff_s unc_ff(.din (uncached_i2),
                    .q   (uncached_f),
                    .q   (uncached_f),
                    .clk (clk),
                    .clk (clk),
                    .se  (se), .si(), .so());
                    .se  (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // Determine if Icache write is done or 
   // Determine if Icache write is done or 
   // if none is necessary (i.e. if this is a child process or NC)
   // if none is necessary (i.e. if this is a child process or NC)
   assign wr_complete_f = dfthr_f & {4{(wrreq_f & ifc_inv_ifqadv_i2 |
   assign wr_complete_f = dfthr_f & {4{(wrreq_f & ifc_inv_ifqadv_i2 |
                                        milchld_vld_f |
                                        milchld_vld_f |
Line 1855... Line 843...
                         milfthr_i2[1] & fill_addr4_i2[1] |
                         milfthr_i2[1] & fill_addr4_i2[1] |
                         milfthr_i2[2] & fill_addr4_i2[2] |
                         milfthr_i2[2] & fill_addr4_i2[2] |
                         milfthr_i2[3] & fill_addr4_i2[3]);
                         milfthr_i2[3] & fill_addr4_i2[3]);
 
 
   assign addrbit4_nxt_i2= ifc_inv_ifqadv_i2 ? addrbit4_i2 : filladdr4_f;
   assign addrbit4_nxt_i2= ifc_inv_ifqadv_i2 ? addrbit4_i2 : filladdr4_f;
   dff #(1) ab4_ff(.din (addrbit4_nxt_i2),
   dff_s #(1) ab4_ff(.din (addrbit4_nxt_i2),
                   .q   (filladdr4_f),
                   .q   (filladdr4_f),
                   .clk (clk),
                   .clk (clk),
                   .se  (se), .si(), .so());
                   .se  (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifc_ifd_filladdr4_i2 = addrbit4_nxt_i2;
   assign ifc_ifd_filladdr4_i2 = addrbit4_nxt_i2;
 
 
   assign next_milchld = ifc_inv_ifqadv_i2 ?
   assign next_milchld = ifc_inv_ifqadv_i2 ?
                                  {(i2out[2] & imissrtn_i2), i2out[1:0]} :
                                  {(i2out[2] & imissrtn_i2), i2out[1:0]} :
                                  milchld_d1;
                                  milchld_d1;
 
 
   // After the packet is processed, the child entry in the MIL,
   // After the packet is processed, the child entry in the MIL,
   // pointed to by the reg below is processed next (if valid)
   // pointed to by the reg below is processed next (if valid)
   dffr #(3)  milchldd_reg(.din  (next_milchld),
   dffr_s #(3)  milchldd_reg(.din  (next_milchld),
                                             .clk  (clk),
                                             .clk  (clk),
                                             .rst  (ifq_reset),
                                             .rst  (ifq_reset),
                                             .q    (milchld_d1),
                                             .q    (milchld_d1),
                                             .se   (se), .si(), .so());
                                             .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign milchld_vld_i2 = milchld_d1[2];
   assign milchld_vld_i2 = milchld_d1[2];
   assign next_milchld_i2 = ifc_inv_ifqadv_i2 ? milchld_d1[2] :
   assign next_milchld_i2 = ifc_inv_ifqadv_i2 ? milchld_d1[2] :
                                                      milchld_vld_f;
                                                      milchld_vld_f;
 
 
   dffr #(1) milchldf_ff(.din  (next_milchld_i2),
   dffr_s #(1) milchldf_ff(.din  (next_milchld_i2),
                       .q    (milchld_vld_f),
                       .q    (milchld_vld_f),
                       .clk  (clk),
                       .clk  (clk),
                       .rst  (ifq_reset),
                       .rst  (ifq_reset),
                       .se   (se), .si(), .so());
                       .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // need this to avoid x's in the simulation
   // need this to avoid x's in the simulation
//   assign cpxthrid_adj_i2 = ifd_ifc_cpxthr_i2 &
//   assign cpxthrid_adj_i2 = ifd_ifc_cpxthr_i2 &
//                                {2{ifd_ifc_cpxreq_i2[`CPX_RQ_SIZE]}};
//                                {2{ifd_ifc_cpxreq_i2[`CPX_RQ_SIZE]}};
 
 
Line 1916... Line 904...
   dp_mux2es  #(2)  thren_mux(.dout (next_filltid_i2),
   dp_mux2es  #(2)  thren_mux(.dout (next_filltid_i2),
                                                .in0  (filltid_f),
                                                .in0  (filltid_f),
                                                .in1  (filltid_i2),
                                                .in1  (filltid_i2),
                                                .sel  (ifc_inv_ifqadv_i2));
                                                .sel  (ifc_inv_ifqadv_i2));
 
 
   dff #(2) wrthr_reg(.din  (next_filltid_i2),
   dff_s #(2) wrthr_reg(.din  (next_filltid_i2),
                                  .clk  (clk),
                                  .clk  (clk),
                                  .q    (filltid_f),
                                  .q    (filltid_f),
                                  .se   (se), .si(), .so());
                                  .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
 
 
   dp_mux2es  #(4)  dthren_mux(.dout (dfthr_next_i2),
   dp_mux2es  #(4)  dthren_mux(.dout (dfthr_next_i2),
                                                 .in0  (dfthr_f),
                                                 .in0  (dfthr_f),
                                                 .in1  (dfthr_i2),
                                                 .in1  (dfthr_i2),
Line 2014... Line 1002...
   // write request
   // write request
   // assign ifq_fcl_wrreq_bf = ifc_inv_ifqadv_i2 ? next_wrreq_i2 : wrreq_f;
   // assign ifq_fcl_wrreq_bf = ifc_inv_ifqadv_i2 ? next_wrreq_i2 : wrreq_f;
   // assign ifq_fcl_wrreq_bf = ~ifc_inv_ifqadv_i2 | next_wrreq_i2;
   // assign ifq_fcl_wrreq_bf = ~ifc_inv_ifqadv_i2 | next_wrreq_i2;
   assign ifq_fcl_wrreq_bf = wrreq_f & ~ifc_inv_ifqadv_i2 | next_wrreq_i2;
   assign ifq_fcl_wrreq_bf = wrreq_f & ~ifc_inv_ifqadv_i2 | next_wrreq_i2;
 
 
   dffr #(1) wrreq_ff(.din (ifq_fcl_wrreq_bf),
   dffr_s #(1) wrreq_ff(.din (ifq_fcl_wrreq_bf),
                                  .clk (clk),
                                  .clk (clk),
                                  .q   (wrreq_f),
                                  .q   (wrreq_f),
                                  .rst (ifq_reset),
                                  .rst (ifq_reset),
                                  .se  (se), .si(), .so());
                                  .se  (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // starvation check
   // starvation check
   // if a write is not granted for 24 cycles, sound the alarm
   // if a write is not granted for 24 cycles, sound the alarm
   sparc_ifu_ctr5 starv_ctr(
   sparc_ifu_ctr5 starv_ctr(
                                              // Outputs
                                              // Outputs
Line 2040... Line 1028...
   //  ifqadv_nxt = ~ifq_fcl_wrreq_bf | fcl_icd_index_sel_ifq_bf
   //  ifqadv_nxt = ~ifq_fcl_wrreq_bf | fcl_icd_index_sel_ifq_bf
   assign access_grant_l = ~fcl_ifq_grant_bf;
   assign access_grant_l = ~fcl_ifq_grant_bf;
   bw_u1_nand2_2x UZsize_acc_n2(.z (ifqadvi2_nxt),
   bw_u1_nand2_2x UZsize_acc_n2(.z (ifqadvi2_nxt),
                                .a (ifq_fcl_wrreq_bf),
                                .a (ifq_fcl_wrreq_bf),
                                .b (access_grant_l));
                                .b (access_grant_l));
   dff #(1) qadv_ff(.din (ifqadvi2_nxt),
   dff_s #(1) qadv_ff(.din (ifqadvi2_nxt),
                    .q   (ifqadv_i2_ff),
                    .q   (ifqadv_i2_ff),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign ifc_inv_ifqadv_i2 = ifqadv_i2_ff;
   assign ifc_inv_ifqadv_i2 = ifqadv_i2_ff;
 
 
 
 
 
 
   // advance in i1 when a write ack is received AND there are no
   // advance in i1 when a write ack is received AND there are no
Line 2056... Line 1044...
 
 
//-----------------------------------
//-----------------------------------
// Errors and Error Packet
// Errors and Error Packet
//-----------------------------------   
//-----------------------------------   
 
 
   assign errpkt_i1 = (ifd_ifc_cpxreq_i1 == {1'b1, 4'b1100}) ? 1'b1 : 1'b0;
   assign errpkt_i1 = (ifd_ifc_cpxreq_i1 == `CPX_ERRPKT) ? 1'b1 : 1'b0;
   assign errpkt_i2 = (cpxreq_i2 == 4'b1100) ? ifd_ifc_cpxvld_i2 : 1'b0;
   assign errpkt_i2 = (cpxreq_i2 == `ERR_RET) ? ifd_ifc_cpxvld_i2 : 1'b0;
 
 
   // Reported Errors are not logged in ERB
   // Reported Errors are not logged in ERB
   assign ce_rep_i2 = ifd_ifc_cpxce_i2 & ~ifd_ifc_cpxue_i2 & errpkt_i2 &
   assign ce_rep_i2 = ifd_ifc_cpxce_i2 & ~ifd_ifc_cpxue_i2 & errpkt_i2 &
                            ifc_inv_ifqadv_i2;
                            ifc_inv_ifqadv_i2;
   assign ue_rep_i2 = ifd_ifc_cpxue_i2 & errpkt_i2 & ifc_inv_ifqadv_i2;
   assign ue_rep_i2 = ifd_ifc_cpxue_i2 & errpkt_i2 & ifc_inv_ifqadv_i2;
 
 
   dff #(1) cerep_ff(.din (ce_rep_i2),
   dff_s #(1) cerep_ff(.din (ce_rep_i2),
                                 .q   (ifq_erb_ce_rep),
                                 .q   (ifq_erb_ce_rep),
                                 .clk (clk), .se(se), .si(), .so());
                                 .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) uerep_ff(.din (ue_rep_i2),
   dff_s #(1) uerep_ff(.din (ue_rep_i2),
                                 .q   (ifq_erb_ue_rep),
                                 .q   (ifq_erb_ue_rep),
                                 .clk (clk), .se(se), .si(), .so());
                                 .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
//   dff #(2) ertid_reg(.din (filltid_i2),
//   dff #(2) ertid_reg(.din (filltid_i2),
//                                .q   (ifq_erb_l2err_tid),
//                                .q   (ifq_erb_l2err_tid),
//                                .clk (clk), .se(se), .si(), .so());
//                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   // send thread id one cycle earlier to help crit path
   // send thread id one cycle earlier to help crit path
   assign ifq_erb_l2err_tid = filltid_i2;
   assign ifq_erb_l2err_tid = filltid_i2;
 
 
   // Ifetch Errors are logged in ERB
   // Ifetch Errors are logged in ERB
   assign l2_ce_i2 = ifd_ifc_cpxce_i2 & ~ifd_ifc_cpxue_i2 & imissrtn_i2 &
   assign l2_ce_i2 = ifd_ifc_cpxce_i2 & ~ifd_ifc_cpxue_i2 & imissrtn_i2 &
Line 2085... Line 1073...
   assign l2_ue_i2 = ifd_ifc_cpxue_i2 & imissrtn_i2 & ~ifd_ifc_iobpkt_i2 &
   assign l2_ue_i2 = ifd_ifc_cpxue_i2 & imissrtn_i2 & ~ifd_ifc_iobpkt_i2 &
                           ifc_inv_ifqadv_i2 & mil_uncan_i2;
                           ifc_inv_ifqadv_i2 & mil_uncan_i2;
   assign io_ue_i2 = ifd_ifc_cpxue_i2 & imissrtn_i2 & ifd_ifc_iobpkt_i2 &
   assign io_ue_i2 = ifd_ifc_cpxue_i2 & imissrtn_i2 & ifd_ifc_iobpkt_i2 &
                           ifc_inv_ifqadv_i2 & mil_uncan_i2;
                           ifc_inv_ifqadv_i2 & mil_uncan_i2;
 
 
   dff #(1) l2ce_ff(.din (l2_ce_i2),
   dff_s #(1) l2ce_ff(.din (l2_ce_i2),
                                .q   (ifq_erb_ifet_ce),
                                .q   (ifq_erb_ifet_ce),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) l2ue_ff(.din (l2_ue_i2),
   dff_s #(1) l2ue_ff(.din (l2_ue_i2),
                                .q   (ifq_erb_l2_ue),
                                .q   (ifq_erb_l2_ue),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) ioue_ff(.din (io_ue_i2),
   dff_s #(1) ioue_ff(.din (io_ue_i2),
                                .q   (ifq_erb_io_ue),
                                .q   (ifq_erb_io_ue),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign l2_miss_i2 = ifd_ifc_cpxms_i2 & imissrtn_i2 & ifc_inv_ifqadv_i2;
   assign l2_miss_i2 = ifd_ifc_cpxms_i2 & imissrtn_i2 & ifc_inv_ifqadv_i2;
   dff #(1) l2ms_ff(.din (l2_miss_i2),
   dff_s #(1) l2ms_ff(.din (l2_miss_i2),
                                .q   (l2_miss_f),
                                .q   (l2_miss_f),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifu_tlu_l2imiss = dfthr_f & {4{l2_miss_f}};
   assign ifu_tlu_l2imiss = dfthr_f & {4{l2_miss_f}};
 
 
//--------------------------------------------
//--------------------------------------------
// Miss Request Control (IFU interface to PCX)
// Miss Request Control (IFU interface to PCX)
Line 2119... Line 1107...
                               ~icmiss_thr_d;
                               ~icmiss_thr_d;
 
 
//   dff #(4) icmsreg(.din  (icmiss_thr_s),
//   dff #(4) icmsreg(.din  (icmiss_thr_s),
//                              .clk  (clk),
//                              .clk  (clk),
//                              .q    (icmiss_thr_d),
//                              .q    (icmiss_thr_d),
//                              .se   (se), .si(), .so());
//                              .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) icmsd_ff(.din  (fcl_ifq_icmiss_s1),
   dff_s #(1) icmsd_ff(.din  (fcl_ifq_icmiss_s1),
                                 .clk  (clk),
                                 .clk  (clk),
                                 .q    (icmiss_d1),
                                 .q    (icmiss_d1),
                                 .se   (se), .si(), .so());
                                 .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign icmiss_qual_d1 = icmiss_d1 & ~(thr_match_d1e1 & ifeterr_e1);
   assign icmiss_qual_d1 = icmiss_d1 & ~(thr_match_d1e1 & ifeterr_e1);
 
 
   // bug 5926
   // bug 5926
   assign n763 = ~ifd_ifc_newdestid_s[2];
   assign n763 = ~ifd_ifc_newdestid_s[2];
   dff #(1) iosp_ff(.din (n763),
   dff_s #(1) iosp_ff(.din (n763),
                                .q   (iosp_d1_l),
                                .q   (iosp_d1_l),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign icmiss_thr_d = {4{icmiss_d1 | erb_ifq_ifeterr_d1 & iosp_d1_l}} & thr_d1 |
   assign icmiss_thr_d = {4{icmiss_d1 | erb_ifq_ifeterr_d1 & iosp_d1_l}} & thr_d1 |
                         {4{ifeterr_e1}} & thr_e1;
                         {4{ifeterr_e1}} & thr_e1;
 
 
   dff #(4) thrdreg(.din  (thr_s1),
   dff_s #(4) thrdreg(.din  (thr_s1),
                                .clk  (clk),
                                .clk  (clk),
                                .q    (thr_d1),
                                .q    (thr_d1),
                                .se   (se), .si(), .so());
                                .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(4) threreg(.din  (thr_d1),
   dff_s #(4) threreg(.din  (thr_d1),
                                .clk  (clk),
                                .clk  (clk),
                                .q    (thr_e1),
                                .q    (thr_e1),
                                .se   (se), .si(), .so());
                                .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) erre_ff(.din (ifeterr_qual_d1),
   dff_s #(1) erre_ff(.din (ifeterr_qual_d1),
                    .q   (ifeterr_e1),
                    .q   (ifeterr_e1),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign thr_match_d1e1 =  (thr_d1[0] & thr_e1[0] |
   assign thr_match_d1e1 =  (thr_d1[0] & thr_e1[0] |
                             thr_d1[1] & thr_e1[1] |
                             thr_d1[1] & thr_e1[1] |
                             thr_d1[2] & thr_e1[2] |
                             thr_d1[2] & thr_e1[2] |
                             thr_d1[3] & thr_e1[3]);
                             thr_d1[3] & thr_e1[3]);
 
 
Line 2233... Line 1221...
   assign block_fetch_s1 = any_milhit_s & ~ifd_ifc_newdestid_s[2] &
   assign block_fetch_s1 = any_milhit_s & ~ifd_ifc_newdestid_s[2] &
                           ~any_qualhit_or_io_s |
                           ~any_qualhit_or_io_s |
                           dtu_ifq_kill_latest_d |
                           dtu_ifq_kill_latest_d |
                           erb_ifq_itlberr_s1;
                           erb_ifq_itlberr_s1;
 
 
   dff #(1) bfd_ff(.din (block_fetch_s1),
   dff_s #(1) bfd_ff(.din (block_fetch_s1),
                   .q   (block_fetch_d1),
                   .q   (block_fetch_d1),
                   .clk (clk), .se(se), .si(), .so());
                   .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) tlbe_ff(.din (erb_ifq_itlberr_s1),
   dff_s #(1) tlbe_ff(.din (erb_ifq_itlberr_s1),
                    .q   (itlberr_d1),
                    .q   (itlberr_d1),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
//   assign retry_rdy_s1 = block_fetch_s1 & fcl_ifq_icmiss_s1;
//   assign retry_rdy_s1 = block_fetch_s1 & fcl_ifq_icmiss_s1;
//   dff #(1) retrd_ff(.din (retry_rdy_s1),
//   dff #(1) retrd_ff(.din (retry_rdy_s1),
//                     .q   (retry_rdy_d1),
//                     .q   (retry_rdy_d1),
//                     .clk (clk), .se(se), .si(), .so());
//                     .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign retry_rdy_final_d1 = block_fetch_d1 & (icmiss_qual_d1 |
   assign retry_rdy_final_d1 = block_fetch_d1 & (icmiss_qual_d1 |
                                                 ifeterr_qual_d1);
                                                 ifeterr_qual_d1);
   dff #(1) retre_ff(.din (retry_rdy_final_d1),
   dff_s #(1) retre_ff(.din (retry_rdy_final_d1),
                     .q   (retry_rdy_e1),
                     .q   (retry_rdy_e1),
                     .clk (clk), .se(se), .si(), .so());
                     .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign all_retry_rdy_e1 = {4{retry_rdy_e1}} & thr_e1;
   assign all_retry_rdy_e1 = {4{retry_rdy_e1}} & thr_e1;
   dff #(4) retrm_reg(.din (all_retry_rdy_e1),
   dff_s #(4) retrm_reg(.din (all_retry_rdy_e1),
                      .q   (all_retry_rdy_m1),
                      .q   (all_retry_rdy_m1),
                     .clk (clk), .se(se), .si(), .so());
                     .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifq_dtu_thrrdy = mil_thr_ready | all_retry_rdy_m1;
   assign ifq_dtu_thrrdy = mil_thr_ready | all_retry_rdy_m1;
 
 
//   assign retry_fetch_s1 = block_fetch_s1 & fcl_ifq_icmiss_s1 & 
//   assign retry_fetch_s1 = block_fetch_s1 & fcl_ifq_icmiss_s1 & 
//                           ~canthr_s1;
//                           ~canthr_s1;
   dff #(1) cans_ff(.din (canthr_s1),
   dff_s #(1) cans_ff(.din (canthr_s1),
                    .q   (canthr_s1_del1),
                    .q   (canthr_s1_del1),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifq_fcl_flush_sonly_e = (block_fetch_d1 &
   assign ifq_fcl_flush_sonly_e = (block_fetch_d1 &
                                   (icmiss_qual_d1 & ~canthr_s1_del1 |
                                   (icmiss_qual_d1 & ~canthr_s1_del1 |
                                    ifeterr_qual_d1) &
                                    ifeterr_qual_d1) &
                                   ~canthr_d1 & ~itlberr_d1);
                                   ~canthr_d1 & ~itlberr_d1);
Line 2337... Line 1325...
   // if req queue is empty forward the new request to pcx
   // if req queue is empty forward the new request to pcx
   // if not store it in the MIL
   // if not store it in the MIL
   assign dpcxthr_s  = req_pending_d ? dpcxthr_d :
   assign dpcxthr_s  = req_pending_d ? dpcxthr_d :
                             ~oldreq_valid ? thr_s1    :
                             ~oldreq_valid ? thr_s1    :
                                             rr_gnt;
                                             rr_gnt;
   dff #(4) pcxthr_ff(.din (dpcxthr_s),
   dff_s #(4) pcxthr_ff(.din (dpcxthr_s),
                                  .clk (clk),
                                  .clk (clk),
                                  .q   (dpcxthr_d),
                                  .q   (dpcxthr_d),
                                  .se  (se), .si(), .so());
                                  .se  (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign thrid_d[0] = dpcxthr_d[3] | dpcxthr_d[1];
   assign thrid_d[0] = dpcxthr_d[3] | dpcxthr_d[1];
   assign thrid_d[1] = dpcxthr_d[3] | dpcxthr_d[2];
   assign thrid_d[1] = dpcxthr_d[3] | dpcxthr_d[2];
   dff #(2) tide_reg(.din (thrid_d),
   dff_s #(2) tide_reg(.din (thrid_d),
                     .q   (thrid_e),
                     .q   (thrid_e),
                     .clk (clk), .se(se), .si(), .so());
                     .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign ifc_ifd_thrid_e = thrid_e;
   assign ifc_ifd_thrid_e = thrid_e;
 
 
   // Determine the destination to which the request is made:
   // Determine the destination to which the request is made:
   mux4ds #(3) dest_mux(.dout (old_destid_s),
   mux4ds #(3) dest_mux(.dout (old_destid_s),
                                    .in0  (ifd_ifc_destid0[2:0]),
                                    .in0  (ifd_ifc_destid0[2:0]),
Line 2375... Line 1363...
                                            ifd_ifc_newdestid_s;
                                            ifd_ifc_newdestid_s;
 
 
   // remove this
   // remove this
   assign destid_iob_s  = req_pending_d ? destid_iob_d :
   assign destid_iob_s  = req_pending_d ? destid_iob_d :
                                          ifu_lsu_destid_s[2];
                                          ifu_lsu_destid_s[2];
   dff #(1) destd_reg(.din (destid_iob_s),
   dff_s #(1) destd_reg(.din (destid_iob_s),
                                  .q   (destid_iob_d),
                                  .q   (destid_iob_d),
                                  .clk (clk), .se(se), .si(), .so());
                                  .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // If this is going to any L2 bank, zero out the line address 
   // If this is going to any L2 bank, zero out the line address 
   // for Rams 
   // for Rams 
   assign ifc_ifd_pcxline_adj_d[4:2] = ifd_ifc_pcxline_d[4:2] &
   assign ifc_ifd_pcxline_adj_d[4:2] = ifd_ifc_pcxline_d[4:2] &
                                       {3{destid_iob_d}};
                                       {3{destid_iob_d}};
 
 
   // advace req 
   // advace req 
   dffr #(1) pcxreqvd_ff(.din  (nextreq_valid_s),
   dffr_s #(1) pcxreqvd_ff(.din  (nextreq_valid_s),
                                     .clk  (clk),
                                     .clk  (clk),
                                     .rst  (ifq_reset),
                                     .rst  (ifq_reset),
                                     .q    (req_valid_d),
                                     .q    (req_valid_d),
                                     .se   (se), .si(), .so());
                                     .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifu_lsu_pcxreq_d = req_valid_d;
   assign ifu_lsu_pcxreq_d = req_valid_d;
 
 
//   assign req_pending_d = req_valid_d & ~can_pcx_d & ~lsu_ifu_pcxpkt_ack_d;
//   assign req_pending_d = req_valid_d & ~can_pcx_d & ~lsu_ifu_pcxpkt_ack_d;
   assign req_pending_d = req_valid_d & ~(lsu_ifu_pcxpkt_ack_d & ~errinv_d1);
   assign req_pending_d = req_valid_d & ~(lsu_ifu_pcxpkt_ack_d & ~errinv_d1);
Line 2408... Line 1396...
 
 
   // check if there was an error to this thread
   // check if there was an error to this thread
   assign err_vec_d1 = dpcxthr_d & (errthr_d1 | err_req);
   assign err_vec_d1 = dpcxthr_d & (errthr_d1 | err_req);
   assign errinv_d1 = (|err_vec_d1[3:0]);
   assign errinv_d1 = (|err_vec_d1[3:0]);
 
 
   dff #(1) errinv_ff(.din (errinv_d1),
   dff_s #(1) errinv_ff(.din (errinv_d1),
                                  .q   (ifc_ifd_errinv_e),
                                  .q   (ifc_ifd_errinv_e),
                                  .clk (clk), .se(se), .si(), .so());
                                  .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign pcxreq_vbit_d = req_valid_d;
   assign pcxreq_vbit_d = req_valid_d;
   dff #(1) pcxreqve_ff(.din  (pcxreq_vbit_d),  // same as ifu_lsu_pcxreq_d
   dff_s #(1) pcxreqve_ff(.din  (pcxreq_vbit_d),  // same as ifu_lsu_pcxreq_d
                                    .clk  (clk),
                                    .clk  (clk),
                                    .q    (ifc_ifd_reqvalid_e),
                                    .q    (ifc_ifd_reqvalid_e),
                                    .se   (se), .si(), .so());
                                    .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
//   dff #(1) pcxreqpe_ff(.din  (req_pending_d),
//   dff #(1) pcxreqpe_ff(.din  (req_pending_d),
//                                  .clk  (clk),
//                                  .clk  (clk),
//                                  .q    (req_pending_e),
//                                  .q    (req_pending_e),
//                                  .se   (se), .si(), .so());
//                                  .se   (se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // advance pcx request if there is no prev request pending
   // advance pcx request if there is no prev request pending
   // the data is deliberately held valid for one extra cycle.  this
   // the data is deliberately held valid for one extra cycle.  this
   // is legacy stuff.  LSU guarantees that the data is picked up
   // is legacy stuff.  LSU guarantees that the data is picked up
   // minimum 1 cycle after request is made. 
   // minimum 1 cycle after request is made. 
Line 2440... Line 1428...
 
 
 
 
//-----------------------------
//-----------------------------
// Invalidate Controls
// Invalidate Controls
//----------------------------
//----------------------------
   assign stpkt_i1 = (ifd_ifc_cpxreq_i1 == {1'b1, 4'b0100}) ? 1'b1 : 1'b0;
   assign stpkt_i1 = (ifd_ifc_cpxreq_i1 == `CPX_STRPKT) ? 1'b1 : 1'b0;
   assign strmack_i1 = (ifd_ifc_cpxreq_i1 == {1'b1, 4'b0110}) ? 1'b1 : 1'b0;
   assign strmack_i1 = (ifd_ifc_cpxreq_i1 == `CPX_STRMACK) ? 1'b1 : 1'b0;
   assign evpkt_i1 = (ifd_ifc_cpxreq_i1 == {1'b1, 4'b0011}) ? 1'b1 : 1'b0;
   assign evpkt_i1 = (ifd_ifc_cpxreq_i1 == `CPX_EVPKT) ? 1'b1 : 1'b0;
   assign ldpkt_i1 = (ifd_ifc_cpxreq_i1 == {1'b1, 4'b0000}) ? 1'b1 : 1'b0;
   assign ldpkt_i1 = (ifd_ifc_cpxreq_i1 == `CPX_LDPKT) ? 1'b1 : 1'b0;
 
 
   assign invalidate_i1 = (stpkt_i1 | strmack_i1 | evpkt_i1 | ldpkt_i1);
   assign invalidate_i1 = (stpkt_i1 | strmack_i1 | evpkt_i1 | ldpkt_i1);
   assign ifu_lsu_inv_clear = ~(invalidate_i1 | inv_ifc_inv_pending);
   assign ifu_lsu_inv_clear = ~(invalidate_i1 | inv_ifc_inv_pending);
//       assign ifc_inv_wrreq_i2 = (imissrtn_i2 |
//       assign ifc_inv_wrreq_i2 = (imissrtn_i2 |
//                              asireq_i2 & asi_ic_tag_i2 & ~asi_load_i2 |
//                              asireq_i2 & asi_ic_tag_i2 & ~asi_load_i2 |
Line 2478... Line 1466...
//                                   .in0  (icv_wrdata_f),
//                                   .in0  (icv_wrdata_f),
//                                   .in1  (icv_wbit_i2),
//                                   .in1  (icv_wbit_i2),
//                                   .sel0 (~ifc_inv_ifqadv_i2),
//                                   .sel0 (~ifc_inv_ifqadv_i2),
//                                   .sel1 (ifc_inv_ifqadv_i2));
//                                   .sel1 (ifc_inv_ifqadv_i2));
 
 
   dff #(1) icv_daff(.din  (icv_wrdata_i2),
   dff_s #(1) icv_daff(.din  (icv_wrdata_i2),
                                 .q    (icv_wrdata_f),
                                 .q    (icv_wrdata_f),
                                 .clk  (clk),
                                 .clk  (clk),
                                 .se   (se), .si(), .so());
                                 .se   (se), `SIMPLY_RISC_SCANIN, .so());
   assign ifq_icv_wrdata_bf = icv_wrdata_i2;
   assign ifq_icv_wrdata_bf = icv_wrdata_i2;
 
 
 
 
// Begin ECO7010
// Begin ECO7010
   dp_mux2es #(1) wayvld_mux (.dout (inq_wayvld_i1_nxt),        //done
   dp_mux2es #(1) wayvld_mux (.dout (inq_wayvld_i1_nxt),        //done
                              .in0 (lsu_ifu_cpxpkt_wayvld_i1),
                              .in0 (lsu_ifu_cpxpkt_wayvld_i1),
                              .in1 (inq_wayvld_i1),
                              .in1 (inq_wayvld_i1),
                              .sel(inq_vld));
                              .sel(inq_vld));
 
 
   dff #(1) wayvld_ff (.din (inq_wayvld_i1_nxt),             //done
   dff_s #(1) wayvld_ff (.din (inq_wayvld_i1_nxt),             //done
                       .q   (inq_wayvld_i1),
                       .q   (inq_wayvld_i1),
                       .clk (clk), .se(se), .si(), .so());
                       .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ldinv_i1 = ldpkt_i1 & inq_wayvld_i1;  //done
   assign ldinv_i1 = ldpkt_i1 & inq_wayvld_i1;  //done
 
 
   dp_mux2es #(1) ldinv_i2_mux (.dout (ldinv_i2_nxt),  //done
   dp_mux2es #(1) ldinv_i2_mux (.dout (ldinv_i2_nxt),  //done
                              .in0 (ldinv_i1),
                              .in0 (ldinv_i1),
                              .in1 (ldinv_i2),
                              .in1 (ldinv_i2),
                              .sel(ifc_ifd_ifqbyp_en_l));
                              .sel(ifc_ifd_ifqbyp_en_l));
 
 
   dff #(1) ldinv_i2_ff (.din (ldinv_i2_nxt),   //done
   dff_s #(1) ldinv_i2_ff (.din (ldinv_i2_nxt),   //done
                         .q   (ldinv_i2),
                         .q   (ldinv_i2),
                         .clk (clk), .se(se), .si(), .so());
                         .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
//End ECO7010
//End ECO7010
 
 
//------------------------------------------------
//------------------------------------------------
// Fwd Request to read/write Icache
// Fwd Request to read/write Icache
//------------------------------------------------
//------------------------------------------------
   // is this a fwd req to the L1I?
   // is this a fwd req to the L1I?
   assign fwdreq_i2 = (cpxreq_i2 == 4'b1010) ?
   assign fwdreq_i2 = (cpxreq_i2 == `FWD_RQ_RET) ?
                        (ifd_ifc_fwd2ic_i2 & ifd_ifc_4bpkt_i2 &
                        (ifd_ifc_fwd2ic_i2 & ifd_ifc_4bpkt_i2 &
                         ifd_ifc_cpxvld_i2) : 1'b0;
                         ifd_ifc_cpxvld_i2) : 1'b0;
 
 
   // detect first cycle of fwdpkt and stall
   // detect first cycle of fwdpkt and stall
   assign fwd_stall = fwdreq_i2 & ~fwdreq_i3;
   assign fwd_stall = fwdreq_i2 & ~fwdreq_i3;
 
 
   dff #(1) freq_ff(.din (fwd_stall),
   dff_s #(1) freq_ff(.din (fwd_stall),
                    .q   (fwdreq_i3),
                    .q   (fwdreq_i3),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) cpx3_ff(.din (ifd_ifc_cpxnc_i2),
   dff_s #(1) cpx3_ff(.din (ifd_ifc_cpxnc_i2),
                    .q   (cpxnc_i3),
                    .q   (cpxnc_i3),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // NC bit is also R/W_bar bit
   // NC bit is also R/W_bar bit
   assign fwdrd_i3 = fwdreq_i3 & cpxnc_i3;
   assign fwdrd_i3 = fwdreq_i3 & cpxnc_i3;
   assign fwdwr_i3 = fwdreq_i3 & ~cpxnc_i3;
   assign fwdwr_i3 = fwdreq_i3 & ~cpxnc_i3;
 
 
Line 2556... Line 1544...
 
 
   // cut this down to 1 aoi gate
   // cut this down to 1 aoi gate
   assign inq_vld_nxt = (ifd_ifc_cpxvalid_i1 |
   assign inq_vld_nxt = (ifd_ifc_cpxvalid_i1 |
                         inq_vld & ic_pkt_i1) & (~ifqadv_i1 | ifu_asireq_i1);
                         inq_vld & ic_pkt_i1) & (~ifqadv_i1 | ifu_asireq_i1);
 
 
   dffr #(1) inqv_ff(.din (inq_vld_nxt),
   dffr_s #(1) inqv_ff(.din (inq_vld_nxt),
                                 .q   (inq_vld),
                                 .q   (inq_vld),
                                 .rst (ifq_reset),
                                 .rst (ifq_reset),
                                 .clk (clk), .se(se), .si(), .so());
                                 .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifc_ifd_ifqbyp_en_l = ~(ifqadv_i1 | fwd_stall);
   assign ifc_ifd_ifqbyp_en_l = ~(ifqadv_i1 | fwd_stall);
 
 
   assign ifc_ifd_ifqbyp_sel_fwd_l = ~(fwd_stall & ~ifq_reset);
   assign ifc_ifd_ifqbyp_sel_fwd_l = ~(fwd_stall & ~ifq_reset);
   assign ifc_ifd_ifqbyp_sel_asi_l = ~(~fwd_stall & ~ifq_reset &
   assign ifc_ifd_ifqbyp_sel_asi_l = ~(~fwd_stall & ~ifq_reset &
Line 2591... Line 1579...
   // - it is held valid until an ack is signalled .
   // - it is held valid until an ack is signalled .
   // - the ack is not signalled for atleast 2 cycles
   // - the ack is not signalled for atleast 2 cycles
   assign asi_vld_next = lsu_ifu_asi_vld & byp_sel_asi_l &
   assign asi_vld_next = lsu_ifu_asi_vld & byp_sel_asi_l &
                               ~asireq_i2 & ~illva_i2;  // not when ack is sent
                               ~asireq_i2 & ~illva_i2;  // not when ack is sent
 
 
   dff #(1) asiv0_ff(.din (asi_vld_next),
   dff_s #(1) asiv0_ff(.din (asi_vld_next),
                                .q   (asi_vld_i0),
                                .q   (asi_vld_i0),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign asi_vld_qual_i0 = asi_vld_i0 & ~asireq_i2 & ~illva_i2 &
   assign asi_vld_qual_i0 = asi_vld_i0 & ~asireq_i2 & ~illva_i2 &
                            byp_sel_asi_l & ~illva_i1 &
                            byp_sel_asi_l & ~illva_i1 &
                            lsu_ifu_asi_vld;
                            lsu_ifu_asi_vld;
 
 
   dff #(8) asi_reg(.din (lsu_ifu_asi_state[7:0]),
   dff_s #(8) asi_reg(.din (lsu_ifu_asi_state[7:0]),
                                .q   (asi_state_i1),
                                .q   (asi_state_i1),
                                .clk (clk), .se(se), .si(), .so());
                                .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(2) asi_tid_reg(.din (lsu_ifu_asi_thrid[1:0]),
   dff_s #(2) asi_tid_reg(.din (lsu_ifu_asi_thrid[1:0]),
                                    .q   (ifq_fcl_asi_tid_bf[1:0]),
                                    .q   (ifq_fcl_asi_tid_bf[1:0]),
                                    .clk (clk), .se(se), .si(), .so());
                                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
//   assign ifu_lsu_asi_ack = ~byp_sel_asi_l;
//   assign ifu_lsu_asi_ack = ~byp_sel_asi_l;
   // Decided to wait one more cycle before sending the ack.
   // Decided to wait one more cycle before sending the ack.
   assign ifu_lsu_asi_ack = asireq_i2 | illva_i2;
   assign ifu_lsu_asi_ack = asireq_i2 | illva_i2;
 
 
Line 2707... Line 1695...
                       asi_errinj_unchk_i1 |
                       asi_errinj_unchk_i1 |
                       asi_erraddr_unchk_i1) & (ifd_ifc_asi_vachklo_i2 |
                       asi_erraddr_unchk_i1) & (ifd_ifc_asi_vachklo_i2 |
                                                ifd_ifc_asiaddr_i2[2])) &
                                                ifd_ifc_asiaddr_i2[2])) &
                       asi_vld_qual_i0;
                       asi_vld_qual_i0;
 
 
   dff #(1) illvai1_ff(.din (illva_i0),
   dff_s #(1) illvai1_ff(.din (illva_i0),
                       .q   (illva_i1),
                       .q   (illva_i1),
                       .clk (clk), .se(se), .si(), .so());
                       .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) illvabf_ff(.din (illva_i1),
   dff_s #(1) illvabf_ff(.din (illva_i1),
                     .q   (illva_i2),
                     .q   (illva_i2),
                     .clk (clk), .se(se), .si(), .so());
                     .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) illvaf_ff(.din (illva_i2),
   dff_s #(1) illvaf_ff(.din (illva_i2),
                     .q   (illva_f),
                     .q   (illva_f),
                     .clk (clk), .se(se), .si(), .so());
                     .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) illvas_ff(.din (illva_f),
   dff_s #(1) illvas_ff(.din (illva_f),
                      .q   (illva_s),
                      .q   (illva_s),
                      .clk (clk), .se(se), .si(), .so());
                      .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) illvaw2_ff(.din (illva_s),
   dff_s #(1) illvaw2_ff(.din (illva_s),
                       .q   (illva_w2),
                       .q   (illva_w2),
                       .clk (clk), .se(se), .si(), .so());
                       .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign ifu_lsu_ldxa_illgl_va_w2 = illva_w2;
   assign ifu_lsu_ldxa_illgl_va_w2 = illva_w2;
 
 
   dff #(1) tagasi_ff(.din (asi_ic_tag_i1),
   dff_s #(1) tagasi_ff(.din (asi_ic_tag_i1),
                                  .q   (asi_ic_tag_i2),
                                  .q   (asi_ic_tag_i2),
                                  .clk (clk), .se(se), .si(), .so());
                                  .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) datasi_ff(.din (asi_ic_data_i1),
   dff_s #(1) datasi_ff(.din (asi_ic_data_i1),
                                  .q   (asi_ic_data_i2),
                                  .q   (asi_ic_data_i2),
                                  .clk (clk), .se(se), .si(), .so());
                                  .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) asieeni2_ff(.din (asi_erren_i1),
   dff_s #(1) asieeni2_ff(.din (asi_erren_i1),
                                    .q   (ifq_erb_asi_erren_i2),
                                    .q   (ifq_erb_asi_erren_i2),
                                    .clk (clk), .se(se), .si(), .so());
                                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) asieini2_ff(.din (asi_errinj_i1),
   dff_s #(1) asieini2_ff(.din (asi_errinj_i1),
                                    .q   (ifq_erb_asi_errinj_i2),
                                    .q   (ifq_erb_asi_errinj_i2),
                                    .clk (clk), .se(se), .si(), .so());
                                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) asiesti2_ff(.din (asi_errstat_i1),
   dff_s #(1) asiesti2_ff(.din (asi_errstat_i1),
                                    .q   (ifq_erb_asi_errstat_i2),
                                    .q   (ifq_erb_asi_errstat_i2),
                                    .clk (clk), .se(se), .si(), .so());
                                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) asieadi2_ff(.din (asi_erraddr_i1),
   dff_s #(1) asieadi2_ff(.din (asi_erraddr_i1),
                                    .q   (ifq_erb_asi_erraddr_i2),
                                    .q   (ifq_erb_asi_erraddr_i2),
                                    .clk (clk), .se(se), .si(), .so());
                                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(1) imaski2_ff(.din (asi_imask_i1),
   dff_s #(1) imaski2_ff(.din (asi_imask_i1),
                                   .q   (ifq_erb_asi_imask_i2),
                                   .q   (ifq_erb_asi_imask_i2),
                                   .clk (clk), .se(se), .si(), .so());
                                   .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // All IFU asi requests
   // All IFU asi requests
   assign ifu_asireq_i0 = (asi_ic_tag_i1 | asi_ic_data_i1 | asi_erren_i1 |
   assign ifu_asireq_i0 = (asi_ic_tag_i1 | asi_ic_data_i1 | asi_erren_i1 |
                                       asi_errinj_i1 | asi_errstat_i1 | asi_erraddr_i1 |
                                       asi_errinj_i1 | asi_errstat_i1 | asi_erraddr_i1 |
                                       asi_imask_i1) & asi_vld_qual_i0;
                                       asi_imask_i1) & asi_vld_qual_i0;
 
 
   dff #(1) asireq1_ff(.din  (ifu_asireq_i0),
   dff_s #(1) asireq1_ff(.din  (ifu_asireq_i0),
                                   .q    (ifu_asireq_i1),
                                   .q    (ifu_asireq_i1),
                                   .clk  (clk), .se(se), .si(), .so());
                                   .clk  (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) asivld_ff(.din  (byp_sel_asi_l),
   dff_s #(1) asivld_ff(.din  (byp_sel_asi_l),
                                  .q    (asireq_i2_l),
                                  .q    (asireq_i2_l),
                                  .clk  (clk), .se(se), .si(), .so());
                                  .clk  (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
   assign asireq_i2 = ~asireq_i2_l;
   assign asireq_i2 = ~asireq_i2_l;
   assign ifc_inv_asireq_i2 = asireq_i2;
   assign ifc_inv_asireq_i2 = asireq_i2;
 
 
   // Stall if we are doing an asi op or fwdreq
   // Stall if we are doing an asi op or fwdreq
  assign stallreq_d0 = (ifu_asireq_i0 |
  assign stallreq_d0 = (ifu_asireq_i0 |
Line 2771... Line 1759...
                          starv_alert |
                          starv_alert |
                          mbist_ifq_run_bist |
                          mbist_ifq_run_bist |
                          ldinv_i1 & ~ifqadv_i1 |        //ECO 7010
                          ldinv_i1 & ~ifqadv_i1 |        //ECO 7010
                          ldinv_i2 & ~ifc_inv_ifqadv_i2; //ECO 7010
                          ldinv_i2 & ~ifc_inv_ifqadv_i2; //ECO 7010
 
 
   dff #(1) stal_ff(.din (stallreq_d0),
   dff_s #(1) stal_ff(.din (stallreq_d0),
                    .q   (stallreq_d1),
                    .q   (stallreq_d1),
                    .clk (clk), .se(se), .si(), .so());
                    .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // split into two to save repeater
   // split into two to save repeater
   assign ifq_fcl_stallreq = stallreq_d1;
   assign ifq_fcl_stallreq = stallreq_d1;
   assign ifq_swl_stallreq = stallreq_d1;
   assign ifq_swl_stallreq = stallreq_d1;
 
 
   dff #(1) asil1_ff(.din (lsu_ifu_asi_load),
   dff_s #(1) asil1_ff(.din (lsu_ifu_asi_load),
                                 .q   (asi_load_i1),
                                 .q   (asi_load_i1),
                                 .clk (clk), .se(se), .si(), .so());
                                 .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   dff #(1) asil2_ff(.din (asi_load_i1),
   dff_s #(1) asil2_ff(.din (asi_load_i1),
                                 .q   (asi_load_i2),
                                 .q   (asi_load_i2),
                                 .clk (clk), .se(se), .si(), .so());
                                 .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   // insert parity error in data and/or tag
   // insert parity error in data and/or tag
   // Don't need to qualify with asireq and imissrtn...
   // Don't need to qualify with asireq and imissrtn...
   //   -- moved this to the DP since the qual is not necessary
   //   -- moved this to the DP since the qual is not necessary
//   assign ifc_ifd_insert_pe = (asireq_i2 | imissrtn_i2) & 
//   assign ifc_ifd_insert_pe = (asireq_i2 | imissrtn_i2) & 
Line 2810... Line 1798...
                                                mbist_icache_write}});
                                                mbist_icache_write}});
// & (mbist_icache_worden | {4{~bist_op}});
// & (mbist_icache_worden | {4{~bist_op}});
 
 
   // choose where the ic address should come from
   // choose where the ic address should come from
//   assign bist_op = (mbist_icache_read | mbist_icache_write);
//   assign bist_op = (mbist_icache_read | mbist_icache_write);
   dff #(1) bist_run_ff(.din (mbist_ifq_run_bist),
   dff_s #(1) bist_run_ff(.din (mbist_ifq_run_bist),
                        .q   (bist_op),
                        .q   (bist_op),
                        .clk (clk), .se(se), .si(), .so());
                        .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifc_ifd_addr_sel_bist_i2_l = ~bist_op | sehold;
   assign ifc_ifd_addr_sel_bist_i2_l = ~bist_op | sehold;
   assign ifc_ifd_addr_sel_old_i2_l = (bist_op | ifc_inv_ifqadv_i2) & ~sehold;
   assign ifc_ifd_addr_sel_old_i2_l = (bist_op | ifc_inv_ifqadv_i2) & ~sehold;
   assign ifc_ifd_addr_sel_asi_i2_l = bist_op | ~ifc_inv_ifqadv_i2 |
   assign ifc_ifd_addr_sel_asi_i2_l = bist_op | ~ifc_inv_ifqadv_i2 |
                                      sehold | ~(asireq_i2 | fwdreq_i3);
                                      sehold | ~(asireq_i2 | fwdreq_i3);
Line 2841... Line 1829...
                                 fwdwr_i3;
                                 fwdwr_i3;
 
 
   assign ifq_fcl_ictv_wrreq_bf = asi_ic_tag_i2 & asireq_i2 & ~asi_load_i2;
   assign ifq_fcl_ictv_wrreq_bf = asi_ic_tag_i2 & asireq_i2 & ~asi_load_i2;
 
 
   assign rd_tag_bf = asi_ic_tag_i2 & asi_load_i2;
   assign rd_tag_bf = asi_ic_tag_i2 & asi_load_i2;
   dff #(1) asi_srcf_ff(.din (rd_tag_bf),
   dff_s #(1) asi_srcf_ff(.din (rd_tag_bf),
                               .q   (ifq_erb_rdtag_f),
                               .q   (ifq_erb_rdtag_f),
                               .clk (clk), .se(se), .si(), .so());
                               .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign rdinst_bf = asi_ic_data_i2 & asi_load_i2;
   assign rdinst_bf = asi_ic_data_i2 & asi_load_i2;
   dff #(1) asi_inst_ff(.din (rdinst_bf),
   dff_s #(1) asi_inst_ff(.din (rdinst_bf),
                               .q   (ifq_erb_rdinst_f),
                               .q   (ifq_erb_rdinst_f),
                               .clk (clk), .se(se), .si(), .so());
                               .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign asird_i1 = asi_load_i1 & (~byp_sel_asi_l | illva_i1);
   assign asird_i1 = asi_load_i1 & (~byp_sel_asi_l | illva_i1);
   dff #(1) asirdq_ff(.din (asird_i1),
   dff_s #(1) asirdq_ff(.din (asird_i1),
                      .q   (ifq_fcl_asird_bf),
                      .q   (ifq_fcl_asird_bf),
                      .clk (clk), .se(se), .si(), .so());
                      .clk (clk), .se(se), `SIMPLY_RISC_SCANIN, .so());
 
 
   assign ifq_erb_asiwr_i2 = ~asi_load_i2 & asireq_i2;
   assign ifq_erb_asiwr_i2 = ~asi_load_i2 & asireq_i2;
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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