Aldec UCDB

Aldec UCDB XML code coverage report, as Aldec’s tool acdb2xml exports a coverage database (ACDB) of Riviera-PRO or Active-HDL.

Read by pyEDAA.Reports.CodeCoverage.AldecUCDB.Document - see Aldec UCDB XML.

Aldec publishes no schema. This one was reverse-engineered from reports of Riviera-PRO 2021.10 and 2022.04 and from what pyEDAA.UCIS read: every element and attribute these reports state is required, in their order, and no other is allowed. The kinds of scopes and bins and the source languages are the names the UCIS standard defines in its C API, without the prefix UCIS_ - e.g. DU_MODULE, STMTBIN, VLOG -; a kind of bin without a name is stated by its value in hexadecimal: 1000000 is UCIS_BLOCKBIN. The flags of scopes and bins are eight hexadecimal digits, the root’s version names the tool and its version, e.g. Riviera-PRO 2022.04. An element states an attribute key once.

Download

Aldec-UCDB.xsd (9.3 kiB)

Validate a report

xmllint --schema Aldec-UCDB.xsd --noout ucdb.xml

Source

  1<?xml version="1.0" encoding="UTF-8"?>
  2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ux="www.aldec.com" targetNamespace="www.aldec.com"
  3           elementFormDefault="qualified">
  4	<xs:annotation>
  5		<xs:documentation>
  6			Aldec UCDB XML code coverage report, as Aldec's tool 'acdb2xml' exports a coverage database (ACDB) of Riviera-PRO
  7			or Active-HDL.
  8
  9			Aldec publishes no schema. This one was reverse-engineered from reports of Riviera-PRO 2021.10 and 2022.04: every
 10			element and attribute these reports state is required, in their order, and no other is allowed. The kinds of
 11			scopes and bins and the source languages are the names the UCIS standard defines in its C API, without the
 12			prefix 'UCIS_'; a kind of bin without a name is stated by its value in hexadecimal: '1000000' is
 13			'UCIS_BLOCKBIN'. Flags of scopes and bins are eight hexadecimal digits. An element states an attribute key once.
 14		</xs:documentation>
 15	</xs:annotation>
 16
 17	<xs:simpleType name="NonEmptyString">
 18		<xs:restriction base="xs:string">
 19			<xs:minLength value="1"/>
 20		</xs:restriction>
 21	</xs:simpleType>
 22
 23	<xs:simpleType name="ToolVersion">
 24		<xs:annotation>
 25			<xs:documentation>The tool's name and version, e.g. 'Riviera-PRO 2022.04'.</xs:documentation>
 26		</xs:annotation>
 27		<xs:restriction base="xs:string">
 28			<xs:pattern value="\S+ [0-9]+(\.[0-9]+)+"/>
 29		</xs:restriction>
 30	</xs:simpleType>
 31
 32	<xs:simpleType name="Flags">
 33		<xs:restriction base="xs:string">
 34			<xs:pattern value="[0-9A-Fa-f]{8}"/>
 35		</xs:restriction>
 36	</xs:simpleType>
 37
 38	<xs:simpleType name="AttributeType">
 39		<xs:restriction base="xs:string">
 40			<xs:enumeration value="str"/>
 41			<xs:enumeration value="int"/>
 42			<xs:enumeration value="double"/>
 43		</xs:restriction>
 44	</xs:simpleType>
 45
 46	<xs:simpleType name="HistoryNodeKind">
 47		<xs:annotation>
 48			<xs:documentation>1: a test, 2: a merge of coverage databases.</xs:documentation>
 49		</xs:annotation>
 50		<xs:restriction base="xs:int">
 51			<xs:enumeration value="1"/>
 52			<xs:enumeration value="2"/>
 53		</xs:restriction>
 54	</xs:simpleType>
 55
 56	<xs:simpleType name="ScopeType">
 57		<xs:restriction base="xs:string">
 58			<xs:enumeration value="TOGGLE"/>
 59			<xs:enumeration value="BRANCH"/>
 60			<xs:enumeration value="EXPR"/>
 61			<xs:enumeration value="COND"/>
 62			<xs:enumeration value="INSTANCE"/>
 63			<xs:enumeration value="PROCESS"/>
 64			<xs:enumeration value="BLOCK"/>
 65			<xs:enumeration value="FUNCTION"/>
 66			<xs:enumeration value="FORKJOIN"/>
 67			<xs:enumeration value="GENERATE"/>
 68			<xs:enumeration value="GENERIC"/>
 69			<xs:enumeration value="CLASS"/>
 70			<xs:enumeration value="COVERGROUP"/>
 71			<xs:enumeration value="COVERINSTANCE"/>
 72			<xs:enumeration value="COVERPOINT"/>
 73			<xs:enumeration value="CROSS"/>
 74			<xs:enumeration value="COVER"/>
 75			<xs:enumeration value="ASSERT"/>
 76			<xs:enumeration value="PROGRAM"/>
 77			<xs:enumeration value="PACKAGE"/>
 78			<xs:enumeration value="TASK"/>
 79			<xs:enumeration value="INTERFACE"/>
 80			<xs:enumeration value="FSM"/>
 81			<xs:enumeration value="DU_MODULE"/>
 82			<xs:enumeration value="DU_ARCH"/>
 83			<xs:enumeration value="DU_PACKAGE"/>
 84			<xs:enumeration value="DU_PROGRAM"/>
 85			<xs:enumeration value="DU_INTERFACE"/>
 86			<xs:enumeration value="FSM_STATES"/>
 87			<xs:enumeration value="FSM_TRANS"/>
 88			<xs:enumeration value="COVBLOCK"/>
 89			<xs:enumeration value="CVGBINSCOPE"/>
 90			<xs:enumeration value="ILLEGALBINSCOPE"/>
 91			<xs:enumeration value="IGNOREBINSCOPE"/>
 92		</xs:restriction>
 93	</xs:simpleType>
 94
 95	<xs:simpleType name="CoverType">
 96		<xs:restriction base="xs:string">
 97			<xs:enumeration value="CVGBIN"/>
 98			<xs:enumeration value="COVERBIN"/>
 99			<xs:enumeration value="ASSERTBIN"/>
100			<xs:enumeration value="STMTBIN"/>
101			<xs:enumeration value="BRANCHBIN"/>
102			<xs:enumeration value="EXPRBIN"/>
103			<xs:enumeration value="CONDBIN"/>
104			<xs:enumeration value="TOGGLEBIN"/>
105			<xs:enumeration value="PASSBIN"/>
106			<xs:enumeration value="FSMBIN"/>
107			<xs:enumeration value="USERBIN"/>
108			<xs:enumeration value="COUNT"/>
109			<xs:enumeration value="FAILBIN"/>
110			<xs:enumeration value="VACUOUSBIN"/>
111			<xs:enumeration value="DISABLEDBIN"/>
112			<xs:enumeration value="ATTEMPTBIN"/>
113			<xs:enumeration value="ACTIVEBIN"/>
114			<xs:enumeration value="IGNOREBIN"/>
115			<xs:enumeration value="ILLEGALBIN"/>
116			<xs:enumeration value="DEFAULTBIN"/>
117			<xs:enumeration value="PEAKACTIVEBIN"/>
118			<xs:enumeration value="1000000"/>
119		</xs:restriction>
120	</xs:simpleType>
121
122	<xs:simpleType name="Language">
123		<xs:restriction base="xs:string">
124			<xs:enumeration value="VHDL"/>
125			<xs:enumeration value="VLOG"/>
126			<xs:enumeration value="SV"/>
127			<xs:enumeration value="SYSTEMC"/>
128			<xs:enumeration value="PSL_VHDL"/>
129			<xs:enumeration value="PSL_VLOG"/>
130			<xs:enumeration value="PSL_SV"/>
131			<xs:enumeration value="PSL_SYSTEMC"/>
132			<xs:enumeration value="E"/>
133			<xs:enumeration value="VERA"/>
134			<xs:enumeration value="NONE"/>
135			<xs:enumeration value="OTHER"/>
136		</xs:restriction>
137	</xs:simpleType>
138
139	<xs:complexType name="Attribute">
140		<xs:simpleContent>
141			<xs:extension base="xs:string">
142				<xs:attribute name="key"  type="ux:NonEmptyString" use="required"/>
143				<xs:attribute name="type" type="ux:AttributeType"  use="required"/>
144			</xs:extension>
145		</xs:simpleContent>
146	</xs:complexType>
147
148	<xs:complexType name="SourceLocation">
149		<xs:attribute name="file"    type="ux:NonEmptyString"     use="required"/>
150		<xs:attribute name="workdir" type="xs:string"             use="required"/>
151		<xs:attribute name="line"    type="xs:nonNegativeInteger" use="required"/>
152		<xs:attribute name="token"   type="xs:nonNegativeInteger" use="required"/>
153	</xs:complexType>
154
155	<xs:complexType name="Count">
156		<xs:simpleContent>
157			<xs:extension base="xs:nonNegativeInteger">
158				<xs:attribute name="type" use="required">
159					<xs:simpleType>
160						<xs:restriction base="xs:string">
161							<xs:enumeration value="int"/>
162						</xs:restriction>
163					</xs:simpleType>
164				</xs:attribute>
165			</xs:extension>
166		</xs:simpleContent>
167	</xs:complexType>
168
169	<xs:complexType name="HistoryNode">
170		<xs:sequence>
171			<xs:element name="attr"  type="ux:Attribute"   minOccurs="0" maxOccurs="unbounded"/>
172			<xs:element name="hnode" type="ux:HistoryNode" minOccurs="0" maxOccurs="unbounded">
173				<xs:unique name="HistoryNodeAttributeKey">
174					<xs:selector xpath="ux:attr"/>
175					<xs:field xpath="@key"/>
176				</xs:unique>
177			</xs:element>
178		</xs:sequence>
179		<xs:attribute name="logical_name"  type="ux:NonEmptyString"  use="required"/>
180		<xs:attribute name="physical_name" type="xs:string"          use="required"/>
181		<xs:attribute name="type"          type="ux:HistoryNodeKind" use="required"/>
182	</xs:complexType>
183
184	<xs:complexType name="Bin">
185		<xs:sequence>
186			<xs:element name="attr"  type="ux:Attribute"      minOccurs="0" maxOccurs="unbounded"/>
187			<xs:element name="count" type="ux:Count"/>
188			<xs:element name="src"   type="ux:SourceLocation"/>
189		</xs:sequence>
190		<xs:attribute name="name"  type="xs:string"    use="required"/>
191		<xs:attribute name="type"  type="ux:CoverType" use="required"/>
192		<xs:attribute name="flags" type="ux:Flags"     use="required"/>
193	</xs:complexType>
194
195	<xs:complexType name="Scope">
196		<xs:sequence>
197			<xs:element name="src"   type="ux:SourceLocation"/>
198			<xs:element name="attr"  type="ux:Attribute" minOccurs="0" maxOccurs="unbounded"/>
199			<xs:element name="bin"   type="ux:Bin"       minOccurs="0" maxOccurs="unbounded">
200				<xs:unique name="BinAttributeKey">
201					<xs:selector xpath="ux:attr"/>
202					<xs:field xpath="@key"/>
203				</xs:unique>
204			</xs:element>
205			<xs:element name="scope" type="ux:Scope"     minOccurs="0" maxOccurs="unbounded">
206				<xs:unique name="ScopeAttributeKey">
207					<xs:selector xpath="ux:attr"/>
208					<xs:field xpath="@key"/>
209				</xs:unique>
210			</xs:element>
211		</xs:sequence>
212		<xs:attribute name="name"   type="ux:NonEmptyString"     use="required"/>
213		<xs:attribute name="type"   type="ux:ScopeType"          use="required"/>
214		<xs:attribute name="weight" type="xs:nonNegativeInteger" use="required"/>
215		<xs:attribute name="lang"   type="ux:Language"           use="required"/>
216		<xs:attribute name="flags"  type="ux:Flags"              use="required"/>
217		<xs:attribute name="du"     type="ux:NonEmptyString"     use="optional"/>
218	</xs:complexType>
219
220	<xs:complexType name="Command">
221		<xs:attribute name="type"  type="xs:int"                use="required"/>
222		<xs:attribute name="flags" type="xs:nonNegativeInteger" use="required"/>
223		<xs:attribute name="data"  type="xs:string"             use="required"/>
224		<xs:attribute name="index" type="xs:nonNegativeInteger" use="required"/>
225	</xs:complexType>
226
227	<xs:element name="ucdb">
228		<xs:complexType>
229			<xs:sequence>
230				<xs:element name="attr"    type="ux:Attribute"   minOccurs="0" maxOccurs="unbounded"/>
231				<xs:element name="hnode"   type="ux:HistoryNode" minOccurs="0" maxOccurs="unbounded">
232					<xs:unique name="TopHistoryNodeAttributeKey">
233						<xs:selector xpath="ux:attr"/>
234						<xs:field xpath="@key"/>
235					</xs:unique>
236				</xs:element>
237				<xs:element name="scope"   type="ux:Scope"       minOccurs="0" maxOccurs="unbounded">
238					<xs:unique name="TopScopeAttributeKey">
239						<xs:selector xpath="ux:attr"/>
240						<xs:field xpath="@key"/>
241					</xs:unique>
242				</xs:element>
243				<xs:element name="command" type="ux:Command"     minOccurs="0" maxOccurs="unbounded"/>
244			</xs:sequence>
245			<xs:attribute name="version" type="ux:ToolVersion" use="required"/>
246		</xs:complexType>
247		<xs:unique name="ReportAttributeKey">
248			<xs:selector xpath="ux:attr"/>
249			<xs:field xpath="@key"/>
250		</xs:unique>
251	</xs:element>
252</xs:schema>