Add gatesi_mode to init gates under gates_mode in BLIF format #4928
+18
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the reasons/motivation for this change?
Hello,
This is a proposal in order to give BLIF some extra information to initialize gates (specifically DFFs and Latches).
There's probably another way to get these values but since it was easier for me to parse the BLIF file this way in order to run my own simulation tool, I thought I might give a try to contribute to it.
Explain how this is achieved.
I added
-gatesi
in order to indicate the initial values for the specific gates (mainly for DFFs and Latches outputs) in a non BLIF standard way.If applicable, please suggest to reviewers how they can test the change.
With
write_blif
enabling both-gates -gatesi
should be enough normally you should see something like this which indicates how to initialize the Q variable output:instead of simply:
Of course, I might be able to understand why it wouldn't be appreciated to be accepted, but I would be grateful if possible since it would get into my package manager and not sitting in another fork, in the worst cases it doesn't modify the default behavior of yosys at all if not both are enabled.
Thank you.