* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: SS_CsrReadWrite.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 ============================================
#ifndef @-ARCH-@_CSR_READ_WRITE_H
#define @-ARCH-@_CSR_READ_WRITE_H
/************************************************************************
** Copyright (C) 2006, Sun Microsystems, Inc.
** Sun considers its source code as an unpublished, proprietary
** trade secret and it is available only under strict license provisions.
** This copyright notice is placed here only to protect Sun in the event
** the source is deemed a published work. Disassembly, decompilation,
** or other means of reducing the object code to human readable form
** is prohibited by the license agreement under which this code is
** provided to the user or company in possession of this copy.
*************************************************************************/
// @-ARCH-@_CsrReadWrite.h is automatically generated from
// ss/api/pli/bin/Bl_CsrReadWrite.h, do not modify @-ARCH-@_CsrReadWrite.h
// make necessary changes in ss/api/pli/bin/Bl_CsrReadWrite.h instead.
#include "@-ARCH-@_Csr.h"
// this class is to support (RTL) testbench's csr_read/csr_write pli-socket
// commands. It is similar to @-ARCH-@_AsiReadWrite class.
//TODO the current implementation is not thread-safe, not even at core level.
// Extra lock(s) must be put in places to provide a thread-safe setting
// for SAM (blaze-riesling) mp-on-mp execution mode. ---> then again,
// this file (as part of pli-socket layer) is never used in SAM bundle,
// it is only used in RTL cosim execution mode, which is always
// single-threaded, so no need to make this file thread-safe.
class @
-ARCH
-@_CsrReadWrite
@
-ARCH
-@
_CsrReadWrite() { }
~@
-ARCH
-@
_CsrReadWrite() { }
void pliWriteCsrReg(@
-ARCH
-@_Csr
* csr
, uint64_t pa
, uint64_t value
, bool littleEndian
=false, int sid
=-1);
void pliReadCsrReg(@
-ARCH
-@_Csr
* csr
, uint64_t pa
, uint64_t value
, bool littleEndian
=false, int sid
=-1);
#endif // @-ARCH-@_ASI_READ_WRITE_H