hlsBs: engine bug fixes, new system_vitis_unified_hlsBs.mk make backend, vitispy flake8 cleanup, and doc fixes - #404
Open
ruck314 wants to merge 8 commits into
Open
hlsBs: engine bug fixes, new system_vitis_unified_hlsBs.mk make backend, vitispy flake8 cleanup, and doc fixes#404ruck314 wants to merge 8 commits into
ruck314 wants to merge 8 commits into
Conversation
- fix multi-stage run and latent command bugs in the run/targets engine - emit rel_path #defines bare so cosim can #include them - repair IP family augmentation and propagate the run exit status - emit the clock_uncertainty cfg key instead of the ignored 'uncertainity' - return status from hlsWs --status so it can be used as a probe - remove the stale IP zip before rezip to avoid a corrupt archive on rebuild - realpath both operands in make_relative so symlinked repo paths resolve
…e-target builds Provide a `make` front-end over the reusable hlsBs engine (vitis/hlsBs), steered by a single per-target project descriptor (firmware/targets/<Name>/project/<Name>.py). This mirrors the Vitis-Unified-CLI flow (system_vitis_unified_hls.mk) so a target can be built with plain `make` instead of the hlsWs/hlsCfg/hlsRun command sequence. clean removes build/ (Vitis workspace + generated cfg) and the target .Xil scratch dir while preserving the packaged IP in ip/.
…v var name - fix grammar and typos across README.md and the man1/ pages - correct the FPGA family list typos and the HLSBS_INI env var name - correct the documented logical symbol fpga_uncertainity -> fpga_uncertainty to match the name the engine actually generates (maps.py Fpgas table)
Mechanical flake8 cleanup (whitespace, spacing, unused imports) of the vitis/hlsBs/vitispy engine under the surf flake8 config. Also fixes several undefined-name bugs surfaced by the linter.
Run compileall + flake8 over vitis/hlsBs/vitispy in addition to scripts/.
… typos and dead branch - run the sys.path bootstrap before the vitispy imports in the CLI entry points so the package resolves regardless of invocation cwd - correct engine typos and a dead-branch call surfaced during cleanup
…aveats heading - fix man-page roff markup and README code-block typos - use .SS for the Caveats heading in the hlsBs.1 man page
ruck314
marked this pull request as ready for review
July 12, 2026 02:00
…osim agree File-path defines (abs_file/rel_path) put the macro value on the command line as a quoted or bare -D, which cannot satisfy both simulators: csim passes the cflags through a shell (one round of quote removal) while cosim re-tokenizes the same string verbatim (no quote removal), so no single quoted or bare form survives both. Route abs_file/rel_path defines through a generated header instead: write '#define NAME "path"' into hlsBs_defs/<cfg>_<label><idx>_defs.h and append '-include <basename> -I hlsBs_defs' to that source's cflags. Those tokens are quote-free and reach both compilers identically, so the testbench keeps a plain '#include MACRO' with no stringizing. The header is referenced by base name and located through -I because Vitis compiles each source from a per-component sub-directory and rewrites -I paths to absolute. string and flag defines are unchanged (plain -D). The header is keyed on the configuration name so seed/define sweeps that share one testbench each get their own header. Also document the mechanism and the standing no-whitespace-in-paths constraint in the hlsBs README and the hlsBs.1 man page.
|
The issue with compile-time includes is an issue, but that looks like there is a viable solution on the horizon There is verbiage in hlsBs about the #include and #defines which I don't think belongs in there
As a step to a real release, I think this is fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Cleans up and extends the
hlsBs(Vitis-unified HLS) subsystem undervitis/hlsBs/, targetingjj-dev. Scope is confined to that subsystem plus a 4-line CI tweak — no repo-rootscripts/, root.flake8, or.vhdchanges. Squashed into 7 thematic commits for review.Commits (review in this order)
fix(hlsBs): correct engine run, cosim, config, and IP bugs— behavioral fixes in the vitispy engine: multi-stage run/latent command bugs; emitrel_path#defines bare so cosim can#includethem; repair IP family augmentation + propagate the run exit status; emit theclock_uncertaintycfg key (was the ignoreduncertainity);hlsWs --statusreturns a usable exit status; remove the stale IP zip before rezip;realpathboth operands inmake_relativeso symlinked repo paths resolve.feat(hlsBs): add system_vitis_unified_hlsBs.mk make wrapper— amakefront-end over the reusable hlsBs engine, steered by a single per-target project descriptor (firmware/targets/<Name>/project/<Name>.py). Mirrors thesystem_vitis_unified_hls.mkCLI flow so a target builds with plainmakeinstead of thehlsWs/hlsCfg/hlsRunsequence.cleanremovesbuild/+ the target.Xilscratch dir, preservingip/.docs(hlsBs): fix README/man typos, FPGA family list, and HLSBS_INI env var name— grammar/typos acrossREADME.mdandman1/*; FPGA family list;HLSBS_INIenv var name; corrects the documented logical symbolfpga_uncertainity→fpga_uncertaintyto match the name the engine actually generates (maps.pyFpgas table).style(hlsBs): flake8-clean the vitispy engine under surf config— mechanical only. Whitespace/spacing/unused-import cleanup ofvitis/hlsBs/vitispyunder the surf flake8 config, plus a few undefined-name fixes surfaced by the linter. Large diff but no behavior change — safe to skim.ci(ruckus): lint the hlsBs vitispy engine— addvitis/hlsBs/vitispyto the CIcompileall+flake8step (alongside the existingscripts/). 4-line change to.github/workflows/ruckus_ci.yml.fix(hlsBs): sys.path bootstrap before vitispy imports; engine typos and dead branch— run thesys.pathbootstrap before vitispy imports in the CLI entry points; correct engine typos and a dead-branch call.docs(hlsBs): fix man-page roff markup, README code-block typos, and Caveats heading— roff markup fixes, README code-block typos,.SSfor the Caveats heading inhlsBs.1.Scope notes
vitis/hlsBs/scripts/setup_hls.sh,README.md+man1/*, the newsystem_vitis_unified_hlsBs.mk, and one CI-step edit.scripts/and the root.flake8are intentionally not modified (they match the base branch).Documentation
vitis/hlsBs/README.md+man1/*pages — updated here (commits 3 and 7)..rstchanges are required: thedocs/tree does not referencehlsBs/vitispy/thehls*commands, and nothing this PR renamed or changed is referenced by any.rstfile. Thesystem_vitis_unified_hls.mkmentioned indocs/how-to/vitis_hls.rstis a separate, untouched backend.system_vitis_unified_hlsBs.mkbackend is not covered in the Sphinxdocs/how-to / makefile reference — consistent with the whole hlsBs subsystem being absent from the Sphinx tree today. Can be added as follow-up if desired.Test plan
CI (
.github/workflows/ruckus_ci.yml) runs and passes locally on the branch:flake8 --count scripts/ vitis/hlsBs/vitispy/— cleanpython -m compileall -f scripts/ vitis/hlsBs/vitispy/— clean{tcl,py,sh}— clean