summaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-09-24 04:28:45 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-09-24 04:28:45 +0200
commit08a01723af9cd52c078d5ca6c38c34d375b39fa0 (patch)
tree6eadea9c67f4bb56a9e4ee09f4982efaf61deece /xml
parent924adedb2928f5657c6668f606dbb3294b3c45da (diff)
parentae7f83a7948d8c3760f8019899a45e6ec90c2c6a (diff)
downloadpcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.tar.gz
pcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.tar.bz2
pcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.tar.xz
pcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.zip
Finalyze XML support and provide initial support for views (only descriptions so far)
Diffstat (limited to 'xml')
-rw-r--r--xml/model.xsd248
-rw-r--r--xml/references.xsd50
-rw-r--r--xml/test/camera.xml647
-rw-r--r--xml/types.xsd208
4 files changed, 424 insertions, 729 deletions
diff --git a/xml/model.xsd b/xml/model.xsd
index 5febd1a..1440032 100644
--- a/xml/model.xsd
+++ b/xml/model.xsd
@@ -1,241 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:element name="model">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="banks" type="banks_type"/>
- <xsd:element name="views" type="views_type" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:key name="Registerkey">
- <xsd:selector xpath="views/view/name"/>
- <xsd:field xpath="."/>
- </xsd:key>
- <xsd:keyref refer="Registerkey" name="RegisterkeyRef">
- <xsd:selector xpath="banks/bank/registers/register/views/view"/>
- <xsd:field xpath="."/>
- </xsd:keyref>
- <xsd:key name="Registerbitskey">
- <xsd:selector xpath="views/view/name"/>
- <xsd:field xpath="."/>
- </xsd:key>
- <xsd:keyref refer="Registerbitskey" name="RegisterbitskeyRef">
- <xsd:selector xpath="banks/bank/registers/register/registers_bits/register_bits/views/view"/>
- <xsd:field xpath="."/>
- </xsd:keyref>
- </xsd:element>
-
-
- <xsd:complexType name="views_type">
- <xsd:sequence>
- <xsd:element name="view" type="view_type" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="banks_type">
- <xsd:sequence>
- <xsd:element name="bank" type="banktype" minOccurs="1" maxOccurs="12"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="banktype">
- <xsd:sequence>
- <xsd:element name="bank_description" type="bank_description_t"/>
- <xsd:element name="registers" type="registerstype" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="bank_description_t">
- <xsd:sequence>
- <xsd:element name="bar" type="bar_type"/>
- <xsd:element name="size" type="hexa_and_integer64_t"/>
- <xsd:element name="protocol" type="xsd:string"/>
- <xsd:element name="read_address" type="hex64_t"/>
- <xsd:element name="write_address" type="hex64_t"/>
- <xsd:element name="word_size" type="uint8_t"/>
- <xsd:element name="endianess" type="endianess_type"/>
- <xsd:element name="format" type="xsd:string"/>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="registerstype">
- <xsd:sequence>
- <xsd:element name="register" type="register_type" minOccurs="0" maxOccurs="256"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="register_type">
- <xsd:sequence>
- <xsd:element name="address" type="hexa_and_integer32_t"/>
- <xsd:element name="offset" type="uint8_t"/>
- <xsd:element name="size" type="uint8_t"/>
- <xsd:element name="default" type="hexa_and_integer32_t"/>
- <xsd:element name="rwmask" type="rwmask_type"/>
- <xsd:element name="mode" type="pcilib_register_mode_t"/>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="views" type="reg_to_views_type" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="registers_bits" type="registers_bits_type" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="value_min" type="hexa_and_integer32_t" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="value_max" type="hexa_and_integer32_t" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="registers_bits_type">
- <xsd:sequence>
- <xsd:element name="register_bits" type="register_bits_type" minOccurs="1" maxOccurs="32"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="reg_to_views_type">
- <xsd:sequence>
- <xsd:element name="view" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="register_bits_type">
- <xsd:sequence>
- <xsd:element name="offset" type="uint8_t"/>
- <xsd:element name="size" type="uint8_t"/>
- <xsd:element name="mode" type="pcilib_register_mode_t"/>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="views" type="reg_to_views_type" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
-
- </xsd:complexType>
-
- <xsd:simpleType name="uint8_t">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="0"/>
- <xsd:maxInclusive value="255"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="size_t">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="0"/>
- <xsd:maxInclusive value="18446744073709551615"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="uintptr_t">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="0"/>
- <xsd:maxInclusive value="18446744073709551615"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="uint32_t">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="0"/>
- <xsd:maxInclusive value="4294967295"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="pcilib_register_mode_t">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="R"/>
- <xsd:enumeration value="W"/>
- <xsd:enumeration value="RW"/>
- <xsd:enumeration value="W1C"/>
- <xsd:enumeration value="RW1C"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="bank_adress_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="bank 0"/>
- <xsd:enumeration value="bank 1"/>
- <xsd:enumeration value="bank 2"/>
- <xsd:enumeration value="bank 3"/>
- <xsd:enumeration value="DMA bank"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="endianess_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="little"/>
- <xsd:enumeration value="big"/>
- <xsd:enumeration value="host"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="bar_type">
- <xsd:restriction base="xsd:integer">
- <xsd:enumeration value="0"/>
- <xsd:enumeration value="1"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="space_adress_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="write adress"/>
- <xsd:enumeration value="read adress"/>
- <xsd:enumeration value="space adress"/>
- <xsd:enumeration value="0"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="rwmask_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="all"/>
- <xsd:enumeration value="0"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="hexa_and_integer32_t">
- <xsd:union memberTypes="uint32_t hex32_t"/>
- </xsd:simpleType>
-
- <xsd:simpleType name="hex32_t">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="0x([a-fA-F0-9]){0,8}"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="hexa_and_integer64_t">
- <xsd:union memberTypes="size_t hex64_t"/>
- </xsd:simpleType>
-
- <xsd:simpleType name="hex64_t">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="0x([a-fA-F0-9]){0,16}"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="view_type">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:ID"/>
- <xsd:element name="unit" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="read_from_register" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="write_to_register" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="enum" type="enum_t" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="description" type="xsd:string"/>
- </xsd:sequence>
- <xsd:attribute name="type" type="viewtype_type" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="enum_t">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="value" type="hexa_and_integer64_t" use="required"/>
- <xsd:attribute name="min" type="hexa_and_integer64_t"/>
- <xsd:attribute name="max" type="hexa_and_integer64_t"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
+ <xsd:include schemaLocation="types.xsd"/>
- <xsd:simpleType name="viewtype_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="enum"/>
- <xsd:enumeration value="formula"/>
- </xsd:restriction>
- </xsd:simpleType>
-
+ <xsd:element name="model">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bank" type="pcilib_bank_t" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="transform" type="pcilib_transform_view_t" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="enum" type="pcilib_enum_view_t" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="unit" type="pcilib_unit_t" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
</xsd:schema>
diff --git a/xml/references.xsd b/xml/references.xsd
new file mode 100644
index 0000000..810913c
--- /dev/null
+++ b/xml/references.xsd
@@ -0,0 +1,50 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:include schemaLocation="types.xsd"/>
+
+ <xsd:element name="model">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bank" type="pcilib_bank_t" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="transform" type="pcilib_transform_view_t" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="enum" type="pcilib_enum_view_t" minOccurs="0" maxOccurs="unbounded">
+ <xsd:key name="pcilib_value_name_key">
+ <xsd:selector xpath="name" />
+ <xsd:field xpath="@value" />
+ </xsd:key>
+ </xsd:element>
+ <xsd:element name="unit" type="pcilib_unit_t" minOccurs="0" maxOccurs="unbounded">
+ <xsd:key name="pcilib_unit_transform_key">
+ <xsd:selector xpath="transform" />
+ <xsd:field xpath="@unit" />
+ </xsd:key>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:key name="pcilib_bank_key">
+ <xsd:selector xpath="bank" />
+ <xsd:field xpath="@name" />
+ </xsd:key>
+ <xsd:key name="pcilib_register_key">
+ <xsd:selector xpath="bank/register|bank/register/field" />
+ <xsd:field xpath="@name" />
+ </xsd:key>
+ <xsd:key name="pcilib_view_key">
+ <xsd:selector xpath="transform|enum" />
+ <xsd:field xpath="@name" />
+ </xsd:key>
+ <xsd:key name="pcilib_unit_key">
+ <xsd:selector xpath="unit" />
+ <xsd:field xpath="@name" />
+ </xsd:key>
+
+ <xsd:keyref name="pcilib_register_view_ref" refer="pcilib_view_key">
+ <xsd:selector xpath="bank/register/view|bank/register/field/view" />
+ <xsd:field xpath="@view" />
+ </xsd:keyref>
+ <xsd:keyref name="pcilib_unit_ref" refer="pcilib_unit_key">
+ <xsd:selector xpath="transform|enum" />
+ <xsd:field xpath="@unit" />
+ </xsd:keyref>
+ </xsd:element>
+</xsd:schema>
diff --git a/xml/test/camera.xml b/xml/test/camera.xml
index 5b486ee..2169bd2 100644
--- a/xml/test/camera.xml
+++ b/xml/test/camera.xml
@@ -1,494 +1,157 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0"?>
<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <banks>
- <bank>
- <bank_description>
- <bar>0</bar>
- <size>0x0200</size>
- <protocol>software_registers</protocol>
- <read_address>0x9000</read_address>
- <write_address>0x9000</write_address>
- <word_size>32</word_size>
- <endianess>little</endianess>
- <format>0x%lx</format>
- <name>software</name>
- <description>IPECamera Registers</description>
- </bank_description>
- <registers>
- <register>
- <address>0x00</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>spi_conf_input</name>
- </register>
- <register>
- <address>0x10</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>spi_conf_output</name>
- </register>
- <register>
- <address>0x20</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>spi_clk_speed</name>
- </register>
- <register>
- <address>0x30</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>firmware_info</name>
- <registers_bits>
- <register_bits>
- <offset>0</offset>
- <size>8</size>
- <mode>R</mode>
- <name>firmware_version</name>
- </register_bits>
- <register_bits>
- <offset>8</offset>
- <size>1</size>
- <mode>R</mode>
- <name>firmware_bitmode</name>
- </register_bits>
- <register_bits>
- <offset>12</offset>
- <size>2</size>
- <mode>R</mode>
- <name>adc_resolution</name>
- </register_bits>
- <register_bits>
- <offset>16</offset>
- <size>2</size>
- <mode>R</mode>
- <name>output_mode</name>
- </register_bits>
- </registers_bits>
- </register>
- <register>
- <address>0x40</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>control</name>
- <registers_bits>
- <register_bits>
- <offset>31</offset>
- <size>1</size>
- <mode>R</mode>
- <name>freq</name>
- </register_bits>
- </registers_bits>
- </register>
- <register>
- <address>0x50</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>status</name>
- </register>
- <register>
- <address>0x54</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>status2</name>
- </register>
- <register>
- <address>0x58</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>status3</name>
- </register>
- <register>
- <address>0x5c</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>fr_status</name>
- </register>
- <register>
- <address>0x70</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>start_address</name>
- </register>
- <register>
- <address>0x74</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>end_address</name>
- </register>
- <register>
- <address>0x78</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>rd_address</name>
- </register>
- <register>
- <address>0xa0</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>fr_param1</name>
- <registers_bits>
- <register_bits>
- <offset>0</offset>
- <size>10</size>
- <mode>RW</mode>
- <name>fr_skip_lines</name>
- </register_bits>
- <register_bits>
- <offset>10</offset>
- <size>11</size>
- <mode>RW</mode>
- <name>fr_num_lines</name>
- </register_bits>
- <register_bits>
- <offset>21</offset>
- <size>11</size>
- <mode>RW</mode>
- <name>fr_start_address</name>
- </register_bits>
- </registers_bits>
- </register>
- <register>
- <address>0xb0</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>all</rwmask>
- <mode>RW</mode>
- <name>fr_param2</name>
- <registers_bits>
- <register_bits>
- <offset>0</offset>
- <size>11</size>
- <mode>RW</mode>
- <name>fr_threshold_start_line</name>
- </register_bits>
- <register_bits>
- <offset>16</offset>
- <size>10</size>
- <mode>RW</mode>
- <name>fr_area_lines</name>
- </register_bits>
- </registers_bits>
- </register>
- <register>
- <address>0xc0</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>skiped_lines</name>
- </register>
- <register>
- <address>0xd0</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>all</rwmask>
- <mode>RW</mode>
- <name>fr_thresholds</name>
- </register>
- <register>
- <address>0xd0</address>
- <offset>0</offset>
- <size>10</size>
- <default>0</default>
- <rwmask>all</rwmask>
- <mode>RW</mode>
- <name>fr_pixel_thr</name>
- </register>
- <register>
- <address>0xd0</address>
- <offset>10</offset>
- <size>11</size>
- <default>0</default>
- <rwmask>all</rwmask>
- <mode>RW</mode>
- <name>fr_num_pixel_thr</name>
- </register>
- <register>
- <address>0xd0</address>
- <offset>21</offset>
- <size>11</size>
- <default>0</default>
- <rwmask>all</rwmask>
- <mode>RW</mode>
- <name>fr_num_lines_thr</name>
- </register>
- <register>
- <address>0x100</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>rawdata_pkt_addr</name>
- </register>
- <register>
- <address>0x110</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>temperature_info</name>
- <registers_bits>
- <register_bits>
- <offset>0</offset>
- <size>16</size>
- <mode>R</mode>
- <name>sensor_temperature</name>
- <views>
- <view>formuu1</view>
- <view>formuu2</view>
- <view>enumm2</view>
- </views>
- </register_bits>
- <register_bits>
- <offset>16</offset>
- <size>3</size>
- <mode>R</mode>
- <name>sensor_temperature_alarms</name>
- </register_bits>
- <register_bits>
- <offset>19</offset>
- <size>10</size>
- <mode>RW</mode>
- <name>fpga_temperature</name>
- <views>
- <view>formuu1</view>
- <view>enumm1</view>
- </views>
- </register_bits>
- <register_bits>
- <offset>29</offset>
- <size>3</size>
- <mode>R</mode>
- <name>fpga_temperature_alarms</name>
- </register_bits>
- </registers_bits>
- </register>
- <register>
- <address>0x120</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>num_lines</name>
- </register>
- <register>
- <address>0x130</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>start_line</name>
- </register>
- <register>
- <address>0x140</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>exp_time</name>
- </register>
- <register>
- <address>0x150</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>motor</name>
- <registers_bits>
- <register_bits>
- <offset>0</offset>
- <size>5</size>
- <mode>RW</mode>
- <name>motor_phi</name>
- </register_bits>
- <register_bits>
- <offset>5</offset>
- <size>5</size>
- <mode>RW</mode>
- <name>motor_z</name>
- </register_bits>
- <register_bits>
- <offset>10</offset>
- <size>5</size>
- <mode>RW</mode>
- <name>motor_y</name>
- </register_bits>
- <register_bits>
- <offset>15</offset>
- <size>5</size>
- <mode>RW</mode>
- <name>motor_x</name>
- </register_bits>
- <register_bits>
- <offset>20</offset>
- <size>8</size>
- <mode>R</mode>
- <name>adc_gain</name>
- </register_bits>
- </registers_bits>
- </register>
- <register>
- <address>0x160</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>write_status</name>
- </register>
- <register>
- <address>0x170</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>num_triggers</name>
- </register>
- <register>
- <address>0x180</address>
- <offset>0</offset>
- <size>32</size>
- <default>0x280</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>trigger_period</name>
- <views>
- <view>enumm2</view>
- </views>
- </register>
- <register>
- <address>0x190</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>temperature_sample_period</name>
- </register>
- <register>
- <address>0x1a0</address>
- <offset>0</offset>
- <size>32</size>
- <default>0x64</default>
- <rwmask>0</rwmask>
- <mode>RW</mode>
- <name>ddr_max_frames</name>
- </register>
- <register>
- <address>0x1b0</address>
- <offset>0</offset>
- <size>32</size>
- <default>0</default>
- <rwmask>0</rwmask>
- <mode>R</mode>
- <name>ddr_num_frames</name>
- </register>
- </registers>
- </bank>
- <bank>
- <bank_description>
- <bar>0</bar>
- <size>0x0200</size>
- <protocol>default</protocol>
- <read_address>0x0</read_address>
- <write_address>0x0</write_address>
- <word_size>32</word_size>
- <endianess>little</endianess>
- <format>0x%lx</format>
- <name>dma</name>
- <description>DMA Registers</description>
- </bank_description>
- </bank>
- </banks>
- <views>
- <view type="formula">
- <name>formuu1</name>
- <unit>C</unit>
- <read_from_register>(503975./1024000)*@reg - 27315./100</read_from_register>
- <write_to_register>(@value + 27315./100)*(102400./503975)</write_to_register>
-<description>formula to get real fpga temperature from the fpga_temperature register in decimal</description>
- </view>
- <view type="enum">
- <name>enumm1</name>
- <enum value="0x100" min="0x2" max="0x300">high</enum>
- <enum value="0x010">low</enum>
- <description>enum towards temperatures register</description>
- </view>
- <view type="formula">
- <name>formuu2</name>
- <unit>C</unit>
- <read_from_register>((1./4)*(@reg - 1200)) if @freq==0 else ((3./10)*(@reg - 1000))</read_from_register>
- <write_to_register>4*@value + 1200 if @freq==0 else (10./3)*@value + 1000</write_to_register>
- <description>formula to get real sensor temperature from the sensor_temperature register in decimal</description>
- </view>
- <view type="enum">
- <name>enumm2</name>
- <enum value="0x120">high</enum>
- <enum value="0x010" min="0x00" max="0x020">low</enum>
- <description>enum towards sensor_temperature register</description>
- </view>
- <view type="formula">
- <name>formuu3</name>
- <unit>us</unit>
- <read_from_register>(@reg+(43./100))*129./(40*1000000)if @freq==0 else (@reg+(43./100))*129./(48*1000000)</read_from_register>
- <write_to_register>@value/129.*(40*1000000) - 43./100 if @freq==0 else @value/129.*(48*1000000) - 43./100</write_to_register>
- <description>formula to get real exposure time from the cmosis_exp_time register in decimal</description>
- </view>
- <view type="enum">
- <name>enumm3</name>
- <enum value="0x000">short</enum>
- <enum value="0x010">mid</enum>
- <enum value="0x100" min="0x0F0">long</enum>
- <description>enum towards cmosis_exp_register register</description>
- </view>
- </views>
+ <bank bar="0" size="128" protocol="software_registers" read_address="0x9010" write_address="0x9000" word_size="8" endianess="little" format="%lu" name="cmosis" description="CMOSIS CMV2000 Registers">
+ <register address="1" offset="0" size="16" default="1088" rwmask="0" mode="RW" name="cmosis_number_lines" description="test"/>
+ <register address="3" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start1"/>
+ <register address="5" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start2"/>
+ <register address="7" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start3"/>
+ <register address="9" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start4"/>
+ <register address="11" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start5"/>
+ <register address="13" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start6"/>
+ <register address="15" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start7"/>
+ <register address="17" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_start8"/>
+ <register address="19" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines1"/>
+ <register address="21" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines2"/>
+ <register address="23" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines3"/>
+ <register address="25" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines4"/>
+ <register address="27" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines5"/>
+ <register address="29" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines6"/>
+ <register address="31" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines7"/>
+ <register address="33" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_number_lines8"/>
+ <register address="35" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_sub_s"/>
+ <register address="37" offset="0" size="16" default="0" rwmask="0" mode="RW" name="cmosis_sub_a"/>
+ <register address="39" offset="0" size="1" default="1" rwmask="0" mode="RW" name="cmosis_color"/>
+ <register address="40" offset="0" size="2" default="0" rwmask="0" mode="RW" name="cmosis_image_flipping"/>
+ <register address="41" offset="0" size="2" default="0" rwmask="0" mode="RW" name="cmosis_exp_flags"/>
+ <register address="42" offset="0" size="24" default="1088" rwmask="0" mode="RW" name="cmosis_exp_time"><view view="formuu3"/><view view="enumm3"/></register>
+ <register address="45" offset="0" size="24" default="1088" rwmask="0" mode="RW" name="cmosis_exp_step"/>
+ <register address="48" offset="0" size="24" default="1" rwmask="0" mode="RW" name="cmosis_exp_kp1"/>
+ <register address="51" offset="0" size="24" default="1" rwmask="0" mode="RW" name="cmosis_exp_kp2"/>
+ <register address="54" offset="0" size="2" default="1" rwmask="0" mode="RW" name="cmosis_nr_slopes"/>
+ <register address="55" offset="0" size="8" default="1" rwmask="0" mode="RW" name="cmosis_exp_seq"/>
+ <register address="56" offset="0" size="24" default="1088" rwmask="0" mode="RW" name="cmosis_exp_time2"/>
+ <register address="59" offset="0" size="24" default="1088" rwmask="0" mode="RW" name="cmosis_exp_step2"/>
+ <register address="68" offset="0" size="2" default="1" rwmask="0" mode="RW" name="cmosis_nr_slopes2"/>
+ <register address="69" offset="0" size="8" default="1" rwmask="0" mode="RW" name="cmosis_exp_seq2"/>
+ <register address="70" offset="0" size="16" default="1" rwmask="0" mode="RW" name="cmosis_number_frames"/>
+ <register address="72" offset="0" size="2" default="0" rwmask="0" mode="RW" name="cmosis_output_mode"/>
+ <register address="78" offset="0" size="12" default="85" rwmask="0" mode="RW" name="cmosis_training_pattern"/>
+ <register address="80" offset="0" size="18" default="0x3FFFF" rwmask="0" mode="RW" name="cmosis_channel_en"/>
+ <register address="82" offset="0" size="3" default="7" rwmask="0" mode="RW" name="cmosis_special_82"/>
+ <register address="89" offset="0" size="8" default="96" rwmask="0" mode="RW" name="cmosis_vlow2"/>
+ <register address="90" offset="0" size="8" default="96" rwmask="0" mode="RW" name="cmosis_vlow3"/>
+ <register address="100" offset="0" size="14" default="16260" rwmask="0" mode="RW" name="cmosis_offset"/>
+ <register address="102" offset="0" size="2" default="0" rwmask="0" mode="RW" name="cmosis_pga"/>
+ <register address="103" offset="0" size="8" default="32" rwmask="0" mode="RW" name="cmosis_adc_gain"/>
+ <register address="111" offset="0" size="1" default="1" rwmask="0" mode="RW" name="cmosis_bit_mode"/>
+ <register address="112" offset="0" size="2" default="0" rwmask="0" mode="RW" name="cmosis_adc_resolution"/>
+ <register address="115" offset="0" size="1" default="1" rwmask="0" mode="RW" name="cmosis_special_115"/>
+ </bank>
+ <bank bar="0" size="0x0200" protocol="software_registers" read_address="0x9000" write_address="0x9000" word_size="32" endianess="little" format="0x%lx" name="fpga" description="IPECamera Registers">
+ <register address="0x00" offset="0" size="32" default="0" rwmask="0" mode="RW" name="spi_conf_input"/>
+ <register address="0x10" offset="0" size="32" default="0" rwmask="0" mode="R" name="spi_conf_output"/>
+ <register address="0x20" offset="0" size="32" default="0" rwmask="0" mode="RW" name="spi_clk_speed"/>
+ <register address="0x30" offset="0" size="32" default="0" rwmask="0" mode="R" name="firmware_info">
+ <field offset="0" size="8" mode="R" name="firmware_version"/>
+ <field offset="8" size="1" mode="R" name="firmware_bitmode"/>
+ <field offset="12" size="2" mode="R" name="adc_resolution"/>
+ <field offset="16" size="2" mode="R" name="output_mode"/>
+ </register>
+ <register address="0x40" offset="0" size="32" default="0" rwmask="0" mode="RW" name="control">
+ <field offset="31" size="1" mode="R" name="freq"/>
+ </register>
+ <register address="0x50" offset="0" size="32" default="0" rwmask="0" mode="R" name="status"/>
+ <register address="0x54" offset="0" size="32" default="0" rwmask="0" mode="R" name="status2"/>
+ <register address="0x58" offset="0" size="32" default="0" rwmask="0" mode="R" name="status3"/>
+ <register address="0x5c" offset="0" size="32" default="0" rwmask="0" mode="R" name="fr_status"/>
+ <register address="0x70" offset="0" size="32" default="0" rwmask="0" mode="R" name="start_address"/>
+ <register address="0x74" offset="0" size="32" default="0" rwmask="0" mode="R" name="end_address"/>
+ <register address="0x78" offset="0" size="32" default="0" rwmask="0" mode="R" name="rd_address"/>
+ <register address="0xa0" offset="0" size="32" default="0" rwmask="0" mode="R" name="fr_param1">
+ <field offset="0" size="10" mode="RW" name="fr_skip_lines"/>
+ <field offset="10" size="11" mode="RW" name="fr_num_lines"/>
+ <field offset="21" size="11" mode="RW" name="fr_start_address"/>
+ </register>
+ <register address="0xb0" offset="0" size="32" default="0" rwmask="all" mode="RW" name="fr_param2">
+ <field offset="0" size="11" mode="RW" name="fr_threshold_start_line"/>
+ <field offset="16" size="10" mode="RW" name="fr_area_lines"/>
+ </register>
+ <register address="0xc0" offset="0" size="32" default="0" rwmask="0" mode="R" name="skiped_lines"/>
+ <register address="0xd0" offset="0" size="32" default="0" rwmask="all" mode="RW" name="fr_thresholds"/>
+ <register address="0xd0" offset="0" size="10" default="0" rwmask="all" mode="RW" name="fr_pixel_thr"/>
+ <register address="0xd0" offset="10" size="11" default="0" rwmask="all" mode="RW" name="fr_num_pixel_thr"/>
+ <register address="0xd0" offset="21" size="11" default="0" rwmask="all" mode="RW" name="fr_num_lines_thr"/>
+ <register address="0x100" offset="0" size="32" default="0" rwmask="0" mode="RW" name="rawdata_pkt_addr"/>
+ <register address="0x110" offset="0" size="32" default="0" rwmask="0" mode="R" name="temperature_info">
+ <field offset="0" size="16" mode="R" name="sensor_temperature"><view view="formuu1"/><view view="formuu2"/><view view="enumm2"/></field>
+ <field offset="16" size="3" mode="R" name="sensor_temperature_alarms"/>
+ <field offset="19" size="10" mode="RW" name="fpga_temperature"><view view="formuu1"/><view view="enumm1"/></field>
+ <field offset="29" size="3" mode="R" name="fpga_temperature_alarms"/>
+ </register>
+ <register address="0x120" offset="0" size="32" default="0" rwmask="0" mode="R" name="num_lines"/>
+ <register address="0x130" offset="0" size="32" default="0" rwmask="0" mode="R" name="start_line"/>
+ <register address="0x140" offset="0" size="32" default="0" rwmask="0" mode="R" name="exp_time"/>
+ <register address="0x150" offset="0" size="32" default="0" rwmask="0" mode="RW" name="motor">
+ <field offset="0" size="5" mode="RW" name="motor_phi"/>
+ <field offset="5" size="5" mode="RW" name="motor_z"/>
+ <field offset="10" size="5" mode="RW" name="motor_y"/>
+ <field offset="15" size="5" mode="RW" name="motor_x"/>
+ <field offset="20" size="8" mode="R" name="adc_gain"/>
+ </register>
+ <register address="0x160" offset="0" size="32" default="0" rwmask="0" mode="R" name="write_status"/>
+ <register address="0x170" offset="0" size="32" default="0" rwmask="0" mode="RW" name="num_triggers"/>
+ <register address="0x180" offset="0" size="32" default="0x280" rwmask="0" mode="RW" name="trigger_period"><view view="enumm2"/></register>
+ <register address="0x190" offset="0" size="32" default="0" rwmask="0" mode="R" name="temperature_sample_period"/>
+ <register address="0x1a0" offset="0" size="32" default="0x64" rwmask="0" mode="RW" name="ddr_max_frames"/>
+ <register address="0x1b0" offset="0" size="32" default="0" rwmask="0" mode="R" name="ddr_num_frames"/>
+ </bank>
+ <bank bar="0" size="0x0200" protocol="software_registers" read_address="0x0" write_address="0x0" word_size="32" endianess="little" format="0x%lx" name="dma" description="DMA Registers"/>
+ <transform name="formuu1" unit="C" read_from_register="(503975./1024000)*$value - 27315./100" write_to_register="($value + 27315./100)*(102400./503975)" description="formula to get real fpga temperature from the fpga_temperature register in decimal"/>
+ <transform name="formuu2" unit="C" read_from_register="((1./4)*($value - 1200)) if $freq==0 else ((3./10)*($value - 1000))" write_to_register="4*$value + 1200 if $freq==0 else (10./3)*$value + 1000" description="formula to get real sensor temperature from the sensor_temperature register in decimal"/>
+ <transform name="formuu3" unit="us" read_from_register="($value+(43./100))*129./(40*1000000)if $freq==0 else ($value+(43./100))*129./(48*1000000)" write_to_register="$value/129.*(40*1000000) - 43./100 if $freq==0 else $value/129.*(48*1000000) - 43./100" description="formula to get real exposure time from the cmosis_exp_time register in decimal"/>
+ <enum name="enumm1" description="enum towards temperatures register">
+ <name name="high" value="0x100" min="0x2" max="0x300"/>
+ <name name="low" value="0x010"/>
+ </enum>
+ <enum name="enumm2" description="enum towards sensor_temperature register">
+ <name name="high" value="0x120"/>
+ <name name="low" value="0x010" min="0x00" max="0x020"/>
+ </enum>
+ <enum name="enumm3" description="enum towards cmosis_exp_register register">
+ <name name="short" value="0x000"/>
+ <name name="mid" value="0x010"/>
+ <name name="long" value="0x100" min="0x0F0"/>
+ </enum>
+ <unit name="C">
+ <transform unit="K" transform="$value+273.15"/>
+ <transform unit="F" transform="$value*(9./5)+32"/>
+ </unit>
+ <unit name="K">
+ <transform unit="C" transform="$value-273.15"/>
+ <transform unit="F" transform="($value-273.15)*(9./5)+32"/>
+ </unit>
+ <unit name="F">
+ <transform unit="C" transform="($value-32)*5./9"/>
+ <transform unit="K" transform="($value+273.15-32)*5./9"/>
+ </unit>
+ <unit name="s">
+ <transform unit="ms" transform="$value*1000"/>
+ <transform unit="us" transform="$value*1000000"/>
+ <transform unit="ns" transform="$value*1000000000"/>
+ </unit>
+ <unit name="ms">
+ <transform unit="s" transform="$value/1000"/>
+ <transform unit="us" transform="$value*1000"/>
+ <transform unit="ns" transform="$value*1000000"/>
+ </unit>
+ <unit name="us">
+ <transform unit="s" transform="$value/1000000"/>
+ <transform unit="ms" transform="$value/1000"/>
+ <transform unit="ns" transform="$value*1000"/>
+ </unit>
+ <unit name="ns">
+ <transform unit="s" transform="$value/1000000000"/>
+ <transform unit="ms" transform="$value/1000000"/>
+ <transform unit="us" transform="$value/1000"/>
+ </unit>
</model>
diff --git a/xml/types.xsd b/xml/types.xsd
new file mode 100644
index 0000000..6edb35e
--- /dev/null
+++ b/xml/types.xsd
@@ -0,0 +1,208 @@
+<?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="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" use="required" />
+ <xsd:attribute name="unit" type="xsd:string" />
+ <xsd:attribute name="type" type="pcilib_data_type_t" />
+ <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="read_from_register" type="xsd:string" />
+ <xsd:attribute name="write_to_register" type="xsd:string" />
+ </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: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_register_mode_t">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="R"/>
+ <xsd:enumeration value="W"/>
+ <xsd:enumeration value="RW"/>
+ <xsd:enumeration value="W1C"/>
+ <xsd:enumeration value="RW1C"/>
+ </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>