Fix decoder generation for external nested addressable components and add max-decode-depth parameter (#12)
* Initial plan * Fix bus decoder to skip external nested components Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Optimize external children check using generator expressions Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> * Add max-decode-depth CLI argument Added --max-decode-depth argument that: - Is added to CLI arguments in __peakrdl__.py - Piped into design state via ExporterKwargs and DesignStateKwargs - Used to control max depth in listener.py - All 66 tests pass including new test for the parameter Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>
This commit is contained in:
@@ -111,6 +111,15 @@ class Exporter(ExporterSubcommandPlugin):
|
||||
""",
|
||||
)
|
||||
|
||||
arg_group.add_argument(
|
||||
"--max-decode-depth",
|
||||
type=int,
|
||||
default=1,
|
||||
help="""Maximum depth for address decoder to descend into nested
|
||||
addressable components. Default is 1.
|
||||
""",
|
||||
)
|
||||
|
||||
def do_export(self, top_node: "AddrmapNode", options: "argparse.Namespace") -> None:
|
||||
cpuifs = self.get_cpuifs()
|
||||
|
||||
@@ -123,4 +132,5 @@ class Exporter(ExporterSubcommandPlugin):
|
||||
package_name=options.package_name,
|
||||
address_width=options.addr_width,
|
||||
cpuif_unroll=options.unroll,
|
||||
max_decode_depth=options.max_decode_depth,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user