-
Notifications
You must be signed in to change notification settings - Fork 986
write_rtlil: don't sort #5315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
write_rtlil: don't sort #5315
Conversation
I have used |
One of the CI failures is a functional backend test failing: |
The failing functional test is due to #5207 |
be3dc6d
to
4a742b7
Compare
…ibutes with -relativeshare
4a742b7
to
9de931b
Compare
Is |
@whitequark I added |
I expect some users may dislike this change, since it will introduce frustrating disorder in even how cell ports are ordered. However, that is just a realistic view of what Yosys sees, so it's necessary for |
@whitequark Are you okay with the removal of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making a pass over the diff, this lgtm
Fixes #3576. We need to fix it becuse the obvious, most default attempt at roundtripping through textual representation of the core IR shouldn't fail. But it does, which makes building reproducers and custom workflows insufferable.
I think that the purpose of the sort is to hide reproducibility bugs and cross-platform equivalence bugs in Yosys. I don't know of recent cases of the former and they're bugs, we shouldn't be proactively hiding them. For the latter, see #5205. These are real categories of bugs that probably happen, but hiding them in one place in a way that breaks roundtripping solves nothing as these will still occur inside of flows. See 4395109 for how the sort was added, replacing pre-existing sorting of the output rather than the design.
From #3576:
I think this was actually referring to roundtripping through Verilog. Reloading RTLIL doesn't change autoidx. Dependence on pointer values would be a bug and I don't expect we have a lot of these, I would even expect a sanitizer to report them as an error (pointer arithmetic etc) though I haven't checked. Until recently, we haven't been using
std::unordered_map
and friends, instead opting for custom replacements in hashlib that have well-defined iteration order. Since we have started using thestd
types, we've been careful not to rely on their iteration order.For allowing RTLIL designs to be easily
diff
ed, see #5003Related: #5150