summaryrefslogtreecommitdiffstats
path: root/utils/regtools/desc/regs-example.xml
blob: 6fb8f759fe556670769f808e177f8c37ca5eb3e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0"?>
<soc version="2">
    <name>vsoc</name>
    <title>Virtual SOC</title>
    <desc>Virtual SoC is a nice and powerful chip.</desc>
    <author>Amaury Pouly</author>
    <isa>ARM</isa>
    <version>0.5</version>
    <node>
        <name>int</name>
        <title>Interrupt Collector</title>
        <desc>The interrupt collector controls the routing of interrupt to the processor</desc>
        <instance>
            <name>ICOLL</name>
            <title>Interrupt collector</title>
            <address>0x80000000</address>
        </instance>
        <node>
            <name>status</name>
            <access>read-only</access>
            <title>Interrupt status register</title>
            <instance>
                <name>STATUS</name>
                <address>0x4</address>
            </instance>
            <register>
                <width>8</width>
                <field>
                    <name>VDDIO_BO</name>
                    <desc>VDDIO brownout interrupt status</desc>
                    <position>0</position>
                </field>
            </register>
        </node>
        <node>
            <name>enable</name>
            <title>Interrupt enable register</title>
            <instance>
                <name>ENABLE</name>
                <address>0x8</address>
            </instance>
            <register>
                <width>16</width>
                <field>
                    <name>VDDIO_BO</name>
                    <desc>VDDIO brownout interrupt enable</desc>
                    <position>0</position>
                    <width>2</width>
                    <enum>
                        <name>DISABLED</name>
                        <desc>Interrupt is disabled</desc>
                        <value>0</value>
                    </enum>
                    <enum>
                        <name>ENABLED</name>
                        <desc>Interrupt is enabled</desc>
                        <value>1</value>
                    </enum>
                    <enum>
                        <name>NMI</name>
                        <desc>Interrupt is non-maskable</desc>
                        <value>2</value>
                    </enum>
                </field>
            </register>
            <variant>
                <type>set</type>
                <offset>4</offset>
            </variant>
            <variant>
                <type>clr</type>
                <offset>8</offset>
            </variant>
        </node>
    </node>
    <node>
        <name>gpio</name>
        <title>GPIO controller</title>
        <desc>A GPIO controller manages several ports</desc>
        <instance>
            <name>CPU_GPIO</name>
            <title>CPU GPIO controller 1 through 3</title>
            <range>
                <first>1</first>
                <count>3</count>
                <formula variable="n">0x80001000+(n-1)*0x1000</formula>
            </range>
        </instance>
        <instance>
            <name>COP_GPIO</name>
            <title>Companion processor GPIO controller</title>
            <desc>Although the companion processor GPIO controller is accessible from the CPU, it incurs an extra penalty on the bus</desc>
            <address>0x90000000</address>
        </instance>
        <node>
            <name>port</name>
            <title>GPIO port</title>
            <instance>
                <name>PORT</name>
                <range>
                    <first>0</first>
                    <count>4</count>
                    <base>0</base>
                    <stride>0x100</stride>
                </range>
            </instance>
            <node>
                <name>input</name>
                <title>Input register</title>
                <instance>
                    <name>IN</name>
                    <address>0</address>
                </instance>
                <register>
                    <width>8</width>
                    <field>
                        <name>VALUE</name>
                        <position>0</position>
                        <width>8</width>
                    </field>
                </register>
            </node>
            <node>
                <name>output_enable</name>
                <title>Output enable register</title>
                <instance>
                    <name>OE</name>
                    <address>0x10</address>
                </instance>
                <register>
                    <width>8</width>
                    <field>
                        <name>ENABLE</name>
                        <position>0</position>
                        <width>8</width>
                    </field>
                </register>
                <variant>
                    <type>set</type>
                    <address>4</address>
                </variant>
                <variant>
                    <type>clr</type>
                    <address>8</address>
                </variant>
                <variant>
                    <type>mask</type>
                    <address>12</address>
                </variant>
            </node>
        </node>
    </node>
</soc>