Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / lib / cpu / bin / SS_StatePrf.py
CommitLineData
920dae64
AT
1# ========== Copyright Header Begin ==========================================
2#
3# OpenSPARC T2 Processor File: SS_StatePrf.py
4# Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
5# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6#
7# The above named program is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public
9# License version 2 as published by the Free Software Foundation.
10#
11# The above named program is distributed in the hope that it will be
12# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14# General Public License for more details.
15#
16# You should have received a copy of the GNU General Public
17# License along with this work; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19#
20# ========== Copyright Header End ============================================
21
22import sys
23
24from SS_State import *
25from SS_Setup import *
26
27setup = setups[sys.argv[1]]
28
29ctr_regs = [
30 SS_CtrReg('SS','tpc' , 'prf', 0,RWRW__,64,
31 [
32 ('' , 2,63, RW, X)
33 ])
34, SS_CtrReg('SS','tnpc' , 'prf', 1,RWRW__,64,
35 [
36 ('' , 2,63, RW, X)
37 ])
38, SS_CtrReg('SS','tstate' , 'prf', 2,RWRW__,64,
39 [
40 ('cwp' , 0, 2, RW, 0),
41 ('pstate', 8,20, RO, 0),
42 ('' , 9, 9, RW, X), # ie
43 ('' ,10,10, RW, X), # priv
44 ('' ,11,11, RW, X), # am
45 ('' ,12,12, RW, X), # pef
46 ('' ,16,16, RW, X), # tle
47 ('' ,17,17, RW, X), # cle
48 ('' ,20,20, RW, X), # tct
49 ('asi' ,24,31, RW, 0),
50 ('ccr' ,32,39, RW, 0),
51 ('gl' ,40,42, RW, 0)
52 ])
53, SS_CtrReg('SS','tt' , 'prf', 3,RWRW__,16,
54 [
55 ('' , 0, 8, RW, X)
56 ])
57, SS_CtrReg('SS','tick' , 'prf', 4,RWRO__, 0,
58 [
59 ])
60, SS_CtrReg('SS','tba' , 'prf', 5,RWRW__,64,
61 [
62 ('' ,15,63, RW, X)
63 ])
64, SS_CtrReg('SS','pstate' , 'prf', 6,RWRW__,16,
65 [
66 ('ie' , 1, 1, RW, 0),
67 ('priv' , 2, 2, RW, 0),
68 ('am' , 3, 3, RW, 0),
69 ('pef' , 4, 4, RW, 0),
70 ('mm' , 6, 7, RO, 0),
71 ('tle' , 8, 8, RW, 0),
72 ('cle' , 9, 9, RW, 0),
73 ('tct' ,12,12, RW, 0)
74 ])
75, SS_CtrReg('SS','tl' , 'prf', 7,RWRW__, 8,
76 [
77 ('' , 0, 2, RW, 0)
78 ])
79, SS_CtrReg('SS','pil' , 'prf', 8,RWRW__, 8,
80 [
81 ('' , 0, 3, RW, X)
82 ])
83, SS_CtrReg('SS','cwp' , 'prf', 9,RWRW__, 8,
84 [
85 ])
86, SS_CtrReg('SS','cansave' , 'prf',10,RWRW__, 8,
87 [
88 ])
89, SS_CtrReg('SS','canrestore', 'prf',11,RWRW__, 8,
90 [
91 ])
92, SS_CtrReg('SS','cleanwin' , 'prf',12,RWRW__, 8,
93 [
94 ])
95, SS_CtrReg('SS','otherwin' , 'prf',13,RWRW__, 8,
96 [
97 ])
98, SS_CtrReg('SS','wstate' , 'prf',14,RWRW__, 8,
99 [
100 ('normal', 0, 2, RW, X),
101 ('other' , 3, 5, RW, X)
102 ])
103, SS_CtrReg('SS','gl' , 'prf',16,RWRW__, 8,
104 [
105 ('', 0, 2, RW, 0)
106 ])
107]
108
109
110ctr_table = SS_CtrTable(ctr_regs)
111
112