-
Notifications
You must be signed in to change notification settings - Fork 423
Throw if BLIF model doesn't exist in the arch xml #3214
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
Conversation
…ction to avoid static_cast
@AlexandreSinger Pending issue: the throw includes the lineno_ to remain consistent with other throws in the file, but the value of lineno_ seems to generally be the length of the file (not the specific line of the file). Shall I file this as an issue? |
@gigeresk I believe that lineno_ being the length of the file is expected behavior in this case. The function that calls this verifier that you are updating is called after all the lines in the file has been parsed. At this time, the lineno should be set to the end of the file. This does demonstrate that we are not verifying the models as they are read in; which may or may not be an issue. Since models are treated as blackboxes, its a design decision whether an error should be thrown during the parse or after (when we cross-reference with the architecture file). In my opinion it is fine to keep the current behavior, but I agree that this is not very intuitive. |
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.
These changes LGTM! Very welcome change, this segmentation fault has hit me a couple of times. I appreciate that you fixed it!
Please see my other comment on the lineno. Its up to you if you want to raise an issue to make this more clear, but I think its OK.
P.S. Regarding the failing SV testcase. It looks like its nothing. I think the test just needs to be rerun. Sometimes the GH servers have some issues. |
@AlexandreSinger Thanks Alex-- I'll file an issue and re-trigger the tests |
Spin-off issue #3215 |
Adds: Throw an exception if a BLIF model doesn't exist in the architecture file. Previous behaviour was a segfault.
Also modifies a function that uses
static_cast
ing for invalid state to rather use std::optional.