Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | # ========== Copyright Header Begin ========================================== |
2 | # | |
3 | # OpenSPARC T2 Processor File: SS_StateHrf.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 | ||
22 | import sys | |
23 | ||
24 | from SS_State import * | |
25 | from SS_Setup import * | |
26 | ||
27 | setup = setups[sys.argv[1]] | |
28 | ||
29 | ctr_regs = [ | |
30 | SS_CtrReg('SS','hpstate' , 'hrf', 0,RW____,16, | |
31 | [ | |
32 | ('tlz' , 0, 0, RW, 0), | |
33 | ('hpriv' , 2, 2, RW, 1), | |
34 | ('red' , 5, 5, RW, 1), | |
35 | ('ibe' ,10,10, RW, 0) | |
36 | ]) | |
37 | , SS_CtrReg('SS','htstate' , 'hrf', 1,RW____,16, | |
38 | [ | |
39 | ('hpstate',0,11, RO, 0), | |
40 | ('' , 0, 0, RW, X), | |
41 | ('' , 2, 2, RW, X), | |
42 | ('' , 5, 5, RW, X), | |
43 | ('' ,10,10, RW, X) | |
44 | ]) | |
45 | , SS_CtrReg('SS','hintp' , 'hrf', 3,RW____, 8, | |
46 | [ | |
47 | ('hsp' , 0, 0, RW, 0) | |
48 | ]) | |
49 | , SS_CtrReg('SS','htba' , 'hrf', 5,RW____,64, | |
50 | [ | |
51 | ('' ,14,63, RW, X) | |
52 | ]) | |
53 | , SS_CtrReg('SS','hver' , 'hrf', 6,RO____,64, | |
54 | [ | |
55 | # HVER is read-only (RO____). This means a wrhrf_hver instruction | |
56 | # is not generated. It is thus safe to make all the fields RW, and | |
57 | # allow for cosim environments to accurately set the HVER to their | |
58 | # required value through say valsync (SS_Strand::set_state followme). | |
59 | ||
60 | ('maxwin', 0, 4, RW, X), | |
61 | ('maxtl' , 8,15, RW, X), | |
62 | ('maxgl' ,16,18, RW, X), | |
63 | ('mask' ,24,31, RW, X), | |
64 | ('impl' ,32,47, RW, X), | |
65 | ('manuf' ,48,63, RW, X) | |
66 | ]) | |
67 | , SS_CtrReg('SS','halt' , 'hrf',30,RW____,64, | |
68 | [ | |
69 | ('' , 0,63, RO, X) | |
70 | ]) | |
71 | , SS_CtrReg('SS','hstick_cmpr','hrf',31,RW____,64, | |
72 | [ | |
73 | ('cmpr' , 0,62, RW, 0), | |
74 | ('int_dis' ,63,63, RW, 1) | |
75 | ]) | |
76 | ] | |
77 | ||
78 | ctr_table = SS_CtrTable(ctr_regs) | |
79 | ||
80 | if not setup.product in ['N2']: | |
81 | ctr_table.reg_at(30).access = OOOOOO # rd/wr halt is only implemented on product n2 |