-
Notifications
You must be signed in to change notification settings - Fork 939
check: promote some problems to errors by default, add -permissive #5058
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?
Conversation
I think having the option of making more problems as errors, without making all problems as errors, is good. I don't know if doing it by default is the best way (not that I think it shouldn't be the default, I'm just not sure how much breakage there would be vs benefit of avoiding later problems) |
One pattern I'm seeing twice in the failing tests already is a latch with a comb path from Q to D, that isn't ever activated all the way through: |
Some problems
check
discovers are too severe to keep as warnings by default.Yosys is expected to continue to cover dodgy scenarios, such as combinational loops in flip flop models[1]. multiple drivers for a signal[2], and undriven signals. When you mix a couple of these you can end up with nasty results[3]. For greater user experience, we should treat multiple drivers and possibly combinational loops as an error at any point we may encounter it, unless the user specifies otherwise. This is different from
check -assert
which makes everycheck
warning an error, effectively.The user should be able to ask for the old behavior by either
check -permissive
synth -check-permissive
for any script pass runningcheck
(that'sproc
andsynth*
)yosys --check-permissive
Alternatively, to avoid strongly customized scripts, we can keep old
check
behavior and add a flag likecheck -smart
and use that in script passes. This way we still get the friendlier UX ofsynth*
with less breakage.A change to
check
like this could also be a step towards design-level invariant flags ("design has no loops", "design only includes fine-grained cells" etc) that have been brought up a couple of times by now[1]
tests/asicworld/code_hdl_models_d_ff_gates.v
, this should make the CI red on this draft[2] opt_clean.cc
[3] #4979 (comment)