Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / lib / cpu / bin / SS_StatePrf.py
# ========== Copyright Header Begin ==========================================
#
# OpenSPARC T2 Processor File: SS_StatePrf.py
# 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 ============================================
import sys
from SS_State import *
from SS_Setup import *
setup = setups[sys.argv[1]]
ctr_regs = [
SS_CtrReg('SS','tpc' , 'prf', 0,RWRW__,64,
[
('' , 2,63, RW, X)
])
, SS_CtrReg('SS','tnpc' , 'prf', 1,RWRW__,64,
[
('' , 2,63, RW, X)
])
, SS_CtrReg('SS','tstate' , 'prf', 2,RWRW__,64,
[
('cwp' , 0, 2, RW, 0),
('pstate', 8,20, RO, 0),
('' , 9, 9, RW, X), # ie
('' ,10,10, RW, X), # priv
('' ,11,11, RW, X), # am
('' ,12,12, RW, X), # pef
('' ,16,16, RW, X), # tle
('' ,17,17, RW, X), # cle
('' ,20,20, RW, X), # tct
('asi' ,24,31, RW, 0),
('ccr' ,32,39, RW, 0),
('gl' ,40,42, RW, 0)
])
, SS_CtrReg('SS','tt' , 'prf', 3,RWRW__,16,
[
('' , 0, 8, RW, X)
])
, SS_CtrReg('SS','tick' , 'prf', 4,RWRO__, 0,
[
])
, SS_CtrReg('SS','tba' , 'prf', 5,RWRW__,64,
[
('' ,15,63, RW, X)
])
, SS_CtrReg('SS','pstate' , 'prf', 6,RWRW__,16,
[
('ie' , 1, 1, RW, 0),
('priv' , 2, 2, RW, 0),
('am' , 3, 3, RW, 0),
('pef' , 4, 4, RW, 0),
('mm' , 6, 7, RO, 0),
('tle' , 8, 8, RW, 0),
('cle' , 9, 9, RW, 0),
('tct' ,12,12, RW, 0)
])
, SS_CtrReg('SS','tl' , 'prf', 7,RWRW__, 8,
[
('' , 0, 2, RW, 0)
])
, SS_CtrReg('SS','pil' , 'prf', 8,RWRW__, 8,
[
('' , 0, 3, RW, X)
])
, SS_CtrReg('SS','cwp' , 'prf', 9,RWRW__, 8,
[
])
, SS_CtrReg('SS','cansave' , 'prf',10,RWRW__, 8,
[
])
, SS_CtrReg('SS','canrestore', 'prf',11,RWRW__, 8,
[
])
, SS_CtrReg('SS','cleanwin' , 'prf',12,RWRW__, 8,
[
])
, SS_CtrReg('SS','otherwin' , 'prf',13,RWRW__, 8,
[
])
, SS_CtrReg('SS','wstate' , 'prf',14,RWRW__, 8,
[
('normal', 0, 2, RW, X),
('other' , 3, 5, RW, X)
])
, SS_CtrReg('SS','gl' , 'prf',16,RWRW__, 8,
[
('', 0, 2, RW, 0)
])
]
ctr_table = SS_CtrTable(ctr_regs)