Skip to content

Conversation

@KrystalDelusion
Copy link
Member

What are the reasons/motivation for this change?

#5526 said it "can't be tested," and I went "challenge accepted."

Explain how this is achieved.

Add write_aiger logic to test_cell; if the -aigmap option is provided while writing output files, call aigmap and write the resulting design to a .aag instead.

Previously, -aigmap didn't affect anything if -w was also provided, but it stands to reason that if we have specifically requested aigmapping we probably want aig files for the gate designs to output instead of the rtlil for the gold designs. But I haven't added anything to the help text since I'm not 100% sure this is the correct approach.

Make sure your change comes with tests. If not possible, share how a reviewer might evaluate it.

As-is, this will cause gcc builds to fail testing. I used the changes from 26f2c11 and clang to generate the gold reference files, but it seems like even without those changes the output from a clang build is still the same. However even with the changes from 26f2c11, this still fails on $_OAI4_ for gcc.

Skips (with warning) on cells that didn't convert to avoid `write_aiger` from raising an error.
Any files that differ (e.g. due to compiler order of operations changing) will trigger an error.
Generated with changes from 26f2c11
@widlarizer
Copy link
Collaborator

widlarizer commented Dec 2, 2025

Nice! But why did the CI not fail?

EDIT: oh right we only run tests with clang, only building with gcc is tested in CI

@KrystalDelusion
Copy link
Member Author

Oh yeah... well, that's less helpful for CI then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants