Commit 46304c0
Fix XML writer: element ordering and missing coverpoint bins
Two bugs found by converting merged_ncdb.cdb to UCIS XML and validating
against the UCIS XSD schema (ucis.xsd):
1. Wrong element order in instanceCoverages: covergroupCoverage was
emitted first and conditionCoverage came after branchCoverage, both
violating the schema sequence (toggle→block→condition→branch→fsm→
assertion→covergroup→userAttr). Reorder write_instance_coverages()
to match the XSD.
2. Missing coverpointBin children: write_coverpoint() queried bins only
as direct coverItems on the coverpoint scope, but the NCDB (and any
DB produced by ncdb_writer) stores bins in child CVGBINSCOPE /
IGNOREBINSCOPE / ILLEGALBINSCOPE scopes. Fix by falling back to
collecting bins from those child scopes when no direct bins exist.
After these fixes 'python -m ucis convert --input-format ncdb ...'
produces XML that passes lxml XMLSchema validation against ucis.xsd.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 11f172d commit 46304c0
1 file changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
| 210 | + | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | | - | |
| 214 | + | |
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
| |||
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
453 | | - | |
454 | | - | |
455 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
456 | 469 | | |
457 | 470 | | |
458 | 471 | | |
| |||
0 commit comments