Commit f83ae67
Fix XML writer: write userAttr on correct per-element scopes
Previously write_user_attrs() was called on coverage container elements
(toggleCoverage, blockCoverage, branchCoverage, conditionCoverage,
fsmCoverage, assertionCoverage) with the parent INSTANCE scope, which:
1. Duplicated INSTANCE attrs into every coverage container
2. Lost all per-element attrs (TOGGLE/BLOCK/BRANCH/COND/etc. scopes)
Deep audit of merged_ncdb.cdb showed 201,883 user attributes in the
NCDB model but only 422 in the generated XML — a 99.8% loss.
Fix: remove container-level write_user_attrs(container, INSTANCE_scope)
calls and instead call write_user_attrs on each individual coverage
element using its own scope:
- toggleObject ← TOGGLE scope attrs (174,516)
- statement in blockCoverage ← BLOCK scope attrs (21,441)
- statement in branchCoverage ← BRANCH scope attrs (3,219)
- expr in conditionCoverage ← COND scope attrs (2,415)
- coverpoint ← COVERPOINT scope attrs (59)
- fsm ← FSM scope attrs (16)
- assertion ← ASSERT scope attrs (27)
- cgInstance ← COVERINSTANCE scope attrs (22)
- covergroupCoverage ← COVERGROUP scope attrs (11)
After fix: 201,819 userAttr in XML (64 from FSM_STATES/FSM_TRANS
container scopes are intentionally unwritten — they have no
corresponding element in the UCIS XML schema).
XML still validates against ucis.xsd with zero errors.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 46304c0 commit f83ae67
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
420 | 421 | | |
421 | 422 | | |
422 | 423 | | |
| |||
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
| 450 | + | |
449 | 451 | | |
450 | 452 | | |
451 | 453 | | |
| |||
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
| 471 | + | |
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
| |||
0 commit comments