Skip to content

hardcode defs_div_sqrt_mvp pkg into gen_sources.sh for fpnew synthesis - #420

Closed
JulessD wants to merge 1 commit into
vortexgpgpu:masterfrom
JulessD:gen_sources_fpnew
Closed

JulessD wants to merge 1 commit into
vortexgpgpu:masterfrom
JulessD:gen_sources_fpnew

Conversation

@JulessD

@JulessD JulessD commented Sep 29, 2026

Copy link
Copy Markdown

The package defs_div_sqrt_mvp of the fpnew was not recognized as a package in hw/scripts/gen_sources.sh script because the filename does not contain the substring "_pkg", resulting in it not being put at the top of the generated flist and resulting in a compilation error.
Proposed fix: Hardcode the defs_div_sqrt_mvp package name into gen_sources script.
No functional change.

The problem was found when using the script to generate a filelist for Questasim.

tinebp added a commit that referenced this pull request Sep 29, 2026
gen_sources.sh hoisted only *_pkg.sv to the top of generated filelists, so
a vendored package whose name lacks the suffix (cvfpu's
defs_div_sqrt_mvp.sv) listed after its importers and broke order-sensitive
consumers like Questa and VCS. Classify files as packages by their content
instead of their name, keeping the package/interface/rest tiering intact.

Verified: the repro directory now hoists the package first and lists it
exactly once; the default xrt synthesis flist and the includes/externs
modes are byte-identical to the previous script on existing trees.

Reported by @JulessD in #420.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tinebp

tinebp commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Problem confirmed — reproduced exactly as you described (defs_div_sqrt_mvp.sv listed
after control_mvp.sv, which imports it). We landed a different implementation as
d4205f5, credited to your report: classifying flist entries by content (a leading
'package' declaration) rather than filename. Two reasons we didn't take the hardcode:
it names one third-party file in three places (the next nonconforming vendored package
regresses again), and the catch-all finds were not updated to exclude it, so the file
was emitted twice in every mode. The content-based version hoists it first and exactly
once, and produces byte-identical filelists to the old script on all existing flows.
Thanks for exercising the Questa path — both of your reports were real.

@tinebp tinebp closed this Sep 29, 2026
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