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.
One minor spelling fix and I noticed a bug in the bsv change detector that was running on buck2-based changes.
But the real feature: git-sha generated into a register block.
This is possibly a bit of a janky implementation but I think it meets our needs for now:
We're using a "genrule" defined in the BUCK file to run a minor bit of shell to generate a simple VHDL package with the short-sha in there. We then use this as a dependency and build out a simple register block that covers the identity, git-sha, scratchpad and checksum registers I expect will be common on most of our designs.
I implemented the business portion of this in the info_2k8.vhd folder which doesn't use VHDL interfaces (a 2k19 feature) and then built a 2k19-compatible wrapper around that so we can use in both the Xilinx flow and the ghdl/yosys flows by selecting the appropriate dependency.
The remainder of the PR is buck2 stuff to support the genrule, and some additional things to make sure that the generated vhdl files by the genrule are materialized (like the rdl stuff) locally and by the bxl that updates the lsp-toml. This ensures that the generated files show up and can be navigated to via lsp functions in your editor.
I didn't write a testbench for this since it's just a register block with an axi interface, but did build it successfully on grapefruit.