Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: SS_CsrReadWrite.h | |
5 | * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. | |
7 | * | |
8 | * The above named program is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public | |
10 | * License version 2 as published by the Free Software Foundation. | |
11 | * | |
12 | * The above named program is distributed in the hope that it will be | |
13 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public | |
18 | * License along with this work; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | |
20 | * | |
21 | * ========== Copyright Header End ============================================ | |
22 | */ | |
23 | #ifndef @-ARCH-@_CSR_READ_WRITE_H | |
24 | #define @-ARCH-@_CSR_READ_WRITE_H | |
25 | /************************************************************************ | |
26 | ** | |
27 | ** Copyright (C) 2006, Sun Microsystems, Inc. | |
28 | ** | |
29 | ** Sun considers its source code as an unpublished, proprietary | |
30 | ** trade secret and it is available only under strict license provisions. | |
31 | ** This copyright notice is placed here only to protect Sun in the event | |
32 | ** the source is deemed a published work. Disassembly, decompilation, | |
33 | ** or other means of reducing the object code to human readable form | |
34 | ** is prohibited by the license agreement under which this code is | |
35 | ** provided to the user or company in possession of this copy. | |
36 | ** | |
37 | *************************************************************************/ | |
38 | // | |
39 | // @-ARCH-@_CsrReadWrite.h is automatically generated from | |
40 | // ss/api/pli/bin/Bl_CsrReadWrite.h, do not modify @-ARCH-@_CsrReadWrite.h | |
41 | // make necessary changes in ss/api/pli/bin/Bl_CsrReadWrite.h instead. | |
42 | // | |
43 | #include "@-ARCH-@_Csr.h" | |
44 | ||
45 | // this class is to support (RTL) testbench's csr_read/csr_write pli-socket | |
46 | // commands. It is similar to @-ARCH-@_AsiReadWrite class. | |
47 | ||
48 | //TODO the current implementation is not thread-safe, not even at core level. | |
49 | // Extra lock(s) must be put in places to provide a thread-safe setting | |
50 | // for SAM (blaze-riesling) mp-on-mp execution mode. ---> then again, | |
51 | // this file (as part of pli-socket layer) is never used in SAM bundle, | |
52 | // it is only used in RTL cosim execution mode, which is always | |
53 | // single-threaded, so no need to make this file thread-safe. | |
54 | ||
55 | class @-ARCH-@_CsrReadWrite | |
56 | { | |
57 | public: | |
58 | @-ARCH-@_CsrReadWrite() { } | |
59 | ~@-ARCH-@_CsrReadWrite() { } | |
60 | ||
61 | void pliWriteCsrReg(@-ARCH-@_Csr* csr, uint64_t pa, uint64_t value, bool littleEndian=false, int sid=-1); | |
62 | void pliReadCsrReg(@-ARCH-@_Csr* csr, uint64_t pa, uint64_t value, bool littleEndian=false, int sid=-1); | |
63 | }; | |
64 | ||
65 | #endif // @-ARCH-@_ASI_READ_WRITE_H |