/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:complexType name="pcilib_bank_t">
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="register" type="pcilib_register_t" minOccurs="0" maxOccurs="unbounded" />
      </xsd:choice>
      <xsd:attribute name="protocol" type="xsd:string" default="default" />
      <xsd:attribute name="bar" type="pcilib_bar_t" />
      <xsd:attribute name="address" type="uintptr_t" />
      <xsd:attribute name="read_address" type="uintptr_t" />
      <xsd:attribute name="write_address" type="uintptr_t" />
      <xsd:attribute name="size" type="size_t" default="4096" />
      <xsd:attribute name="word_size" type="uint8_t" default="32" />
      <xsd:attribute name="endianess" type="pcilib_endianess_t" default="host" />
      <xsd:attribute name="format" type="xsd:string" default="0x%lx" />
      <xsd:attribute name="name" type="xsd:ID" use="required" />
      <xsd:attribute name="description" type="xsd:string" />
  </xsd:complexType>

  <xsd:complexType name="pcilib_register_t">
      <xsd:sequence>
        <xsd:element name="view" type="pcilib_view_reference_t" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element name="field" type="pcilib_register_field_t" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
      <xsd:attribute name="address" type="uint64_t" use="required" />
      <xsd:attribute name="offset" type="uint8_t" default="0" />
      <xsd:attribute name="size" type="uint8_t" default="32" />
      <xsd:attribute name="default" type="pcilib_register_value_t" default="0" />
      <xsd:attribute name="min" type="pcilib_register_value_t" />
      <xsd:attribute name="max" type="pcilib_register_value_t"/>
      <xsd:attribute name="rwmask" type="pcilib_rwmask_t" default="all" />
      <xsd:attribute name="mode" type="pcilib_register_mode_t" default="R" />
      <xsd:attribute name="name" type="xsd:ID" use="required"/>
      <xsd:attribute name="description" type="xsd:string" />
  </xsd:complexType>

  <xsd:complexType name="pcilib_register_field_t">
      <xsd:sequence>
        <xsd:element name="view" type="pcilib_view_reference_t" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
      <xsd:attribute name="offset" type="uint8_t"/>
      <xsd:attribute name="size" type="uint8_t"/>
      <xsd:attribute name="default" type="pcilib_register_value_t" default="0" />
      <xsd:attribute name="min" type="pcilib_register_value_t" />
      <xsd:attribute name="max" type="pcilib_register_value_t"/>
      <xsd:attribute name="mode" type="pcilib_register_mode_t"/>
      <xsd:attribute name="name" type="xsd:ID" use="required" />
      <xsd:attribute name="description" type="xsd:string" />
 </xsd:complexType>

  <xsd:complexType name="pcilib_view_reference_t">
    <xsd:attribute name="view" type="xsd:string" use="required" />
    <xsd:attribute name="name" type="xsd:string" />
  </xsd:complexType>

  <xsd:complexType name="pcilib_view_t">
    <xsd:attribute name="name" type="xsd:ID" />
    <xsd:attribute name="unit" type="xsd:string" />
    <xsd:attribute name="type" type="pcilib_data_type_t" />
    <xsd:attribute name="mode" type="pcilib_access_mode_t" />
    <xsd:attribute name="write_verification" type="bool_t" default="1"/>
    <xsd:attribute name="visible" type="bool_t" default="0" />
    <xsd:attribute name="description" type="xsd:string" />
  </xsd:complexType>

  <xsd:complexType name="pcilib_transform_view_t">
    <xsd:complexContent>
        <xsd:extension base="pcilib_view_t">
          <xsd:attribute name="path" type="xsd:string" />
          <xsd:attribute name="register" type="xsd:string" />
          <xsd:attribute name="read_from_register" type="xsd:string" />
          <xsd:attribute name="write_to_register" type="xsd:string" />
          <xsd:attribute name="script" type="xsd:string" />
          <!-- xsd 1.1 <xsd:assert test="(@path and not(@name)) or (not(@path) and @name)"/> -->
        </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="pcilib_enum_view_t">
    <xsd:complexContent>
        <xsd:extension base="pcilib_view_t">
            <xsd:choice minOccurs="1" maxOccurs="unbounded">
                <xsd:element name="name" type="pcilib_value_name_t" minOccurs="1" maxOccurs="unbounded" />
            </xsd:choice>
        </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="pcilib_value_name_t">
    <xsd:attribute name="value" type="pcilib_register_value_t" use="required" />
    <xsd:attribute name="min" type="pcilib_register_value_t" />
    <xsd:attribute name="max" type="pcilib_register_value_t" />
    <xsd:attribute name="name" type="xsd:string" use="required" />
    <xsd:attribute name="description" type="xsd:string" />
  </xsd:complexType>

  <xsd:complexType name="pcilib_unit_t">
    <xsd:sequence>
        <xsd:element name="transform" type="pcilib_unit_transform_t" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="xsd:ID" use="required"/>
    <xsd:attribute name="title" type="xsd:string"/>
  </xsd:complexType>

  <xsd:complexType name="pcilib_unit_transform_t">
    <xsd:attribute name="transform" type="xsd:string" use="required" />
    <xsd:attribute name="unit" type="xsd:string" use="required"/>
  </xsd:complexType>

  <xsd:simpleType name="bool_t">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="1"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="dec8_t">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="255"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="hex8_t">
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="0x([a-fA-F0-9]){1,2}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="uint8_t">
    <xsd:union memberTypes="dec8_t hex8_t"/>
  </xsd:simpleType>
  <xsd:simpleType name="dec32_t">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="4294967295"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="hex32_t">
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="0x([a-fA-F0-9]){1,8}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="uint32_t">
    <xsd:union memberTypes="dec32_t hex32_t"/>
  </xsd:simpleType>
  <xsd:simpleType name="dec64_t">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="18446744073709551615"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="hex64_t">
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="0x([a-fA-F0-9]){1,16}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="uint64_t">
    <xsd:union memberTypes="dec64_t hex64_t"/>
  </xsd:simpleType>
  <xsd:simpleType name="size_t">
    <xsd:restriction base="uint64_t"/>
  </xsd:simpleType>
  <xsd:simpleType name="uintptr_t">
    <xsd:restriction base="hex64_t"/>
  </xsd:simpleType>

  <xsd:simpleType name="pcilib_register_value_t">
    <xsd:restriction base="uint32_t"/>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_bar_t">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="5"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_bank_address_t">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="0"/>
      <xsd:enumeration value="1"/>
      <xsd:enumeration value="2"/>
      <xsd:enumeration value="3"/>
      <xsd:enumeration value="dma0"/>
      <xsd:enumeration value="dma1"/>
      <xsd:enumeration value="dma2"/>
      <xsd:enumeration value="dma3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_access_mode_t">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="-"/>
      <xsd:enumeration value="R"/>
      <xsd:enumeration value="W"/>
      <xsd:enumeration value="RW"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_register_mode_t">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="-"/>
      <xsd:enumeration value="R"/>
      <xsd:enumeration value="W"/>
      <xsd:enumeration value="RW"/>
      <xsd:enumeration value="W1C"/>
      <xsd:enumeration value="RW1C"/>
      <xsd:enumeration value="W1I"/>
      <xsd:enumeration value="RW1I"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_data_type_t">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="string"/>
      <xsd:enumeration value="float"/>
      <xsd:enumeration value="int"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_endianess_t">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="little"/>
      <xsd:enumeration value="big"/>
      <xsd:enumeration value="host"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_rwmask_keywords_t">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="all"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="pcilib_rwmask_t">
    <xsd:union memberTypes="pcilib_rwmask_keywords_t pcilib_register_value_t"/>
  </xsd:simpleType>
</xsd:schema>