Skip to content
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

Git SHA gen and common info block #240

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Git SHA gen and common info block #240

merged 1 commit into from
Nov 21, 2024

Conversation

nathanaelhuffman
Copy link
Collaborator

@nathanaelhuffman nathanaelhuffman commented Nov 20, 2024

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.

@nathanaelhuffman nathanaelhuffman merged commit 7ccd402 into main Nov 21, 2024
8 checks passed
@nathanaelhuffman nathanaelhuffman deleted the git-sha-info branch November 21, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants