// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: pcie_common_dcs_osm.v
// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
// This 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 program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// For the avoidance of doubt, and except that if any non-GPL license
// choice is available it will apply instead, Sun elects to use only
// the General Public License version 2 (GPLv2) at this time for any
// software where a choice of GPL license versions is made
// available with the language indicating that GPLv2 or any later version
// may be used, or where a choice of which version of the GPL is applied is
// otherwise unspecified.
// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
// CA 95054 USA or visit www.sun.com if you need additional information or
// ========== Copyright Header End ============================================
module pcie_common_dcs_osm
csr_pkt_ack, // csr packet acknowledge
ism2osm_vld, // ism valid
csr_pkt_req, // csr request
osm2ism_deq, // ism dequeue
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
parameter IDLE = 2'b00, // state machine states
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
reg [1:0] state, nxt_state;
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// 0in known_driven -var req -active rst_l
// 0in known_driven -var state -active rst_l
// 0in state_transition -var state -val IDLE -next LDMS RQST
// 0in state_transition -var state -val LDMS -next LDLS
// 0in state_transition -var state -val LDLS -next RQST
// 0in state_transition -var state -val RQST -next IDLE
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
pcie_common_sync_flop #(1'b1) sff
// N2+ AT 03/04/05: repalce pcie_common_sync_flop w/ sync cells from N2 lib.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
assign csr_pkt_req = req;
always @ (state or ism2osm_vld or req or ack) begin
case (state) // synopsys parallel_case
if (ism2osm_vld) nxt_state = LDMS;
if (req ^ ack) nxt_state = RQST;
always @ (state or nxt_state or req) begin
case (state) // synopsys parallel_case
case (nxt_state) // synopsys parallel_case
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
always @ (posedge clk) begin
endmodule // pcie_common_dcs_osm