Skip to content

Conversation

@hcallahan-lowrisc
Copy link
Contributor

@hcallahan-lowrisc hcallahan-lowrisc commented Jun 23, 2025

As of the completed migration to ipgen, we no longer make use of the
'--flag=fileset_X' selectors to switch out filesets between ip-level and
top-level. (e.g. fileset_top)
Hence, this code is now dead, and can be removed.

Note. that there are still example uses of 'fileset_partner' as a suggestion for how
integrators can use this mechanism to swap out filesets. There is nothing
stopping downstream users from continuing to swap-out core filesets using this
mechanism and passing flags via the 'sv_flist_gen_flags' hjson variable.
However, the documentation should be updated to suggest the use of fusesoc
virtual cores as a preferred solution to this problem.

#23555 (comment) I'd suggest that we remove the 'fileset_partner' examples once the documentation for how integrators can make use of virtual cores has been written, and notice / opportunity has been given for partners and integrators to migrate.

Related #25747 #27477
Related #23555

@hcallahan-lowrisc hcallahan-lowrisc requested a review from a team as a code owner June 23, 2025 13:53
@hcallahan-lowrisc hcallahan-lowrisc requested review from marnovandermaas and removed request for a team June 23, 2025 13:53
@hcallahan-lowrisc hcallahan-lowrisc force-pushed the remove_design_level_dead_code branch from 9be074c to f8fb696 Compare June 23, 2025 13:56
As of the completed migration to ipgen, we no longer make use of the
'--flag=fileset_X' selectors to switch out filesets between ip-level and
top-level. (e.g. `fileset_top`)
Hence, this code is now dead, and can be removed.

Note. that there are example uses of 'fileset_partner' as a suggestion for how
integrators can use this mechanism to swap out filesets. There is nothing
stopping downstream users from continuing to swap-out core filesets using this
mechanism and passing flags via the 'sv_flist_gen_flags' hjson variable.
However, the documentation should be updated to suggest the use of fusesoc
virtual cores as a preferred solution to this problem.

Signed-off-by: Harry Callahan <[email protected]>
@hcallahan-lowrisc hcallahan-lowrisc force-pushed the remove_design_level_dead_code branch from f8fb696 to f53e6f8 Compare June 23, 2025 15:04

sv_flist_gen_flags: ["--flag=fileset_{design_level}",
"--mapping=lowrisc:prim_generic:all:0.1"]
sv_flist_gen_flags: ["--mapping=lowrisc:prim_generic:all:0.1"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably ought to move this to a less-generic property name, so people can override mappings more explicitly. Fine for now, though! (especially since there are only mappings here right now)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe something like a fusesoc_mapping_cores list could be used, with the eval_cmd trick...

  sv_flist_gen_opts:  ["{fusesoc_cores_root_dirs}",
                       "run",
                       "{sv_flist_gen_flags}",
                       "--target=sim",
                       "--build-root={build_dir}",
                       "--setup,
                       # Something like this...
                       "{eval_cmd} echo \"{fusesoc_mapping_cores}\" | sed -E 's_(\\S+)_\"--mapping=\\1\"_g",
                       {fusesoc_core}"]

fusesoc_cores_root_dirs: ["--cores-root {proj_root}/hw"]
sv_flist_gen_dir: "{build_dir}/fusesoc-work"
sv_flist: "{sv_flist_gen_dir}/{fusesoc_core_}.scr"
sv_flist_gen_flags: ["--flag=fileset_{design_level}"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A curiosity: How should we document that this property exists, that it is an array of strings, and that it should be used to pass arguments to fusesoc run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm personally leaning towards leading by example here. Some pages documenting how this can be done, with example .hjson and accompanying comments. Maybe in the future a proper schema for dvsim .hjson would be a useful addition as well, but it is probably a bit too complex to decipher without a worked example or reference pointing to existing code.

@hcallahan-lowrisc hcallahan-lowrisc merged commit f22b86d into lowRISC:master Jun 27, 2025
45 checks passed
@hcallahan-lowrisc hcallahan-lowrisc deleted the remove_design_level_dead_code branch June 27, 2025 12:48
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.

3 participants