SBY assumes that it is used together with a compatible yosys version, but does not offer any easy way to tell what that compatible yosys version is. Users of the OSS Cad Suite or Tabby CAD automatically have matching versions, and we create tags corresponding to the yosys version in this repository, but users that manually installed SBY in the past have no way to check which version they installed. This adds a --version option that prints the git describe output identifying the installed version.
Explain how this is achieved.
I added a new ##yosys-release-version## placeholder following release_version = 'unknown SBY version' to the source code and updated the makefile to substitute the placeholder with a statement overwriting the release_version variable.
I also added a .gittag file and .gitattribtues file so git will remember the tagged version when creating source archives.
The makefile first checks the .gittag file and uses that when it includes a version string, falling back to running git describe --dirty otherwise.
If applicable, please suggest to reviewers how they can test the change.
It would be good to check that this works correctly in the context of the OSS Cad Suite builds.
What are the reasons/motivation for this change?
SBY assumes that it is used together with a compatible yosys version, but does not offer any easy way to tell what that compatible yosys version is. Users of the OSS Cad Suite or Tabby CAD automatically have matching versions, and we create tags corresponding to the yosys version in this repository, but users that manually installed SBY in the past have no way to check which version they installed. This adds a
--version
option that prints thegit describe
output identifying the installed version.Explain how this is achieved.
I added a new
##yosys-release-version##
placeholder followingrelease_version = 'unknown SBY version'
to the source code and updated the makefile to substitute the placeholder with a statement overwriting therelease_version
variable.I also added a
.gittag
file and.gitattribtues
file so git will remember the tagged version when creating source archives.The makefile first checks the .gittag file and uses that when it includes a version string, falling back to running
git describe --dirty
otherwise.If applicable, please suggest to reviewers how they can test the change.
It would be good to check that this works correctly in the context of the OSS Cad Suite builds.