Commit b7d09cd
committed
write_xaiger2: emit "y" identity + map2 src for std-cell origin tracking
Enables `\src` source-location provenance through the abc9/std-cell mapping
path. write_xaiger2 now emits:
- a "y" identity extension in the xaig (each AIG object maps to itself) so ABC
seeds per-object origin tracking;
- "src <obj_id> <src_value>" lines in the map2 file so read_xaiger2 -sc_mapping
can translate propagated origin object-ids back to \src strings.
Mechanism mirrors backends/aiger/xaiger.cc: an RAII SrcGuard threads the current
RTL cell's \src through impl_op's recursive decomposition, emit_gate tags each
new AIG object, and the "y"/src sections are written in XAigerWriter::write.
Validated end-to-end on a combinational design (sky130_fd_sc_hd):
write_xaiger2 -> abc_new (ABC &nf with &origins) -> read_xaiger2 yields \src on
100% of mapped std cells, including multi-source merging (e.g.
"comb.v:3.26-3.31|comb.v:3.16-3.21"). Depends on the ABC-side origin tracking
(berkeley-abc/abc#487) and the AIGER "M"-skip reader fix.
Scoped to combinational designs; see TODO(boxes) notes for the sequential/box
object-numbering follow-up.
Co-developed-by: Claude Code v2.1.195 (claude-opus-4-8)1 parent bd21c18 commit b7d09cd
1 file changed
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| |||
258 | 265 | | |
259 | 266 | | |
260 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
261 | 277 | | |
262 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
263 | 286 | | |
264 | 287 | | |
265 | 288 | | |
| |||
715 | 738 | | |
716 | 739 | | |
717 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
718 | 746 | | |
719 | 747 | | |
720 | 748 | | |
| |||
1258 | 1286 | | |
1259 | 1287 | | |
1260 | 1288 | | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1261 | 1298 | | |
1262 | 1299 | | |
1263 | 1300 | | |
| |||
1309 | 1346 | | |
1310 | 1347 | | |
1311 | 1348 | | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1312 | 1367 | | |
1313 | 1368 | | |
1314 | 1369 | | |
| |||
0 commit comments