peakrdl-busdecoder 0.6.6__tar.gz → 0.6.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/PKG-INFO +1 -1
  2. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/pyproject.toml +1 -1
  3. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb3/apb3_tmpl.sv +1 -1
  4. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb4/apb4_tmpl.sv +1 -1
  5. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif.py +14 -2
  6. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_tmpl.sv +19 -5
  7. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/base_cpuif.py +4 -0
  8. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/fanin_gen.py +2 -2
  9. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/fanin_intermediate_gen.py +3 -0
  10. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder.egg-info/PKG-INFO +1 -1
  11. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/uv.lock +1 -1
  12. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.devcontainer/Dockerfile +0 -0
  13. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.devcontainer/devcontainer.json +0 -0
  14. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  15. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  16. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/ISSUE_TEMPLATE/question.md +0 -0
  17. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/pull_request_template.md +0 -0
  18. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/build.yml +0 -0
  19. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/docs.yml +0 -0
  20. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/format.yml +0 -0
  21. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/lint.yml +0 -0
  22. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/release.yml +0 -0
  23. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/test.yml +0 -0
  24. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.github/workflows/typecheck.yml +0 -0
  25. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.gitignore +0 -0
  26. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/.readthedocs.yaml +0 -0
  27. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/CONTRIBUTING.md +0 -0
  28. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/LICENSE +0 -0
  29. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/MANIFEST.in +0 -0
  30. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/README.md +0 -0
  31. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/Makefile +0 -0
  32. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/api.rst +0 -0
  33. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/architecture.rst +0 -0
  34. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/conf.py +0 -0
  35. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/configuring.rst +0 -0
  36. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/apb.rst +0 -0
  37. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/avalon.rst +0 -0
  38. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/axi4lite.rst +0 -0
  39. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/customizing.rst +0 -0
  40. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/internal_protocol.rst +0 -0
  41. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/introduction.rst +0 -0
  42. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/cpuif/passthrough.rst +0 -0
  43. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/Alpha-Beta Versioning +0 -0
  44. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/Hierarchy-and-Indexing +0 -0
  45. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/Program Flow +0 -0
  46. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/Resets +0 -0
  47. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/Signal Dereferencer +0 -0
  48. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/Validation Needed +0 -0
  49. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/1-port-declaration +0 -0
  50. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/1.1.hardware-interface +0 -0
  51. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/2-CPUIF +0 -0
  52. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/3-address-decode +0 -0
  53. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/4-fields +0 -0
  54. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/5-readback-mux +0 -0
  55. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/dev_notes/template-layers/6-output-port-mapping +0 -0
  56. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/diagrams/arch.png +0 -0
  57. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/diagrams/diagrams.odg +0 -0
  58. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/diagrams/rbuf.png +0 -0
  59. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/diagrams/readback.png +0 -0
  60. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/diagrams/wbuf.png +0 -0
  61. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/faq.rst +0 -0
  62. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/hwif.rst +0 -0
  63. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/img/err.svg +0 -0
  64. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/img/ok.svg +0 -0
  65. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/img/warn.svg +0 -0
  66. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/index.rst +0 -0
  67. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/licensing.rst +0 -0
  68. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/limitations.rst +0 -0
  69. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/props/addrmap.rst +0 -0
  70. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/props/field.rst +0 -0
  71. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/props/reg.rst +0 -0
  72. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/props/rhs_props.rst +0 -0
  73. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/props/signal.rst +0 -0
  74. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/rdl_features/external.rst +0 -0
  75. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/requirements.txt +0 -0
  76. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/docs/udps/intro.rst +0 -0
  77. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/hdl-src/README.md +0 -0
  78. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/hdl-src/apb3_intf.sv +0 -0
  79. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/hdl-src/apb4_intf.sv +0 -0
  80. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/hdl-src/avalon_mm_intf.sv +0 -0
  81. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/hdl-src/axi4lite_intf.sv +0 -0
  82. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/setup.cfg +0 -0
  83. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/__init__.py +0 -0
  84. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/__peakrdl__.py +0 -0
  85. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/body/__init__.py +0 -0
  86. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/body/body.py +0 -0
  87. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/body/combinational_body.py +0 -0
  88. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/body/for_loop_body.py +0 -0
  89. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/body/if_body.py +0 -0
  90. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/body/struct_body.py +0 -0
  91. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/__init__.py +0 -0
  92. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb3/__init__.py +0 -0
  93. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif.py +0 -0
  94. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif_flat.py +0 -0
  95. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb3/apb3_interface.py +0 -0
  96. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb4/__init__.py +0 -0
  97. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif.py +0 -0
  98. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif_flat.py +0 -0
  99. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/apb4/apb4_interface.py +0 -0
  100. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/axi4lite/__init__.py +0 -0
  101. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif_flat.py +0 -0
  102. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_interface.py +0 -0
  103. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/fanout_gen.py +0 -0
  104. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/cpuif/interface.py +0 -0
  105. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/decode_logic_gen.py +0 -0
  106. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/design_scanner.py +0 -0
  107. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/design_state.py +0 -0
  108. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/exporter.py +0 -0
  109. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/identifier_filter.py +0 -0
  110. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/listener.py +0 -0
  111. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/module_tmpl.sv +0 -0
  112. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/package_tmpl.sv +0 -0
  113. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/py.typed +0 -0
  114. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/struct_gen.py +0 -0
  115. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/sv_int.py +0 -0
  116. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/udps/__init__.py +0 -0
  117. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/utils.py +0 -0
  118. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder/validate_design.py +0 -0
  119. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder.egg-info/SOURCES.txt +0 -0
  120. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder.egg-info/dependency_links.txt +0 -0
  121. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder.egg-info/entry_points.txt +0 -0
  122. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder.egg-info/requires.txt +0 -0
  123. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/src/peakrdl_busdecoder.egg-info/top_level.txt +0 -0
  124. {peakrdl_busdecoder-0.6.6 → peakrdl_busdecoder-0.6.7}/tools/shims/xargs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-busdecoder
3
- Version: 0.6.6
3
+ Version: 0.6.7
4
4
  Summary: Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces
5
5
  Author: Arnav Sacheti
6
6
  License: LGPLv3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "peakrdl-busdecoder"
7
- version = "0.6.6"
7
+ version = "0.6.7"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
10
  "jinja2~=3.1",
@@ -37,4 +37,4 @@ assign {{cpuif.signal("PSLVERR")}} = cpuif_rd_err | cpuif_wr_err;
37
37
  //--------------------------------------------------------------------------
38
38
  // Fanin CPU Bus interface signals
39
39
  //--------------------------------------------------------------------------
40
- {{fanin|walk(cpuif=cpuif)}}
40
+ {{fanin|walk(cpuif=cpuif)}}
@@ -38,4 +38,4 @@ assign {{cpuif.signal("PSLVERR")}} = cpuif_rd_err | cpuif_wr_err;
38
38
  //--------------------------------------------------------------------------
39
39
  // Fanin CPU Bus interface signals
40
40
  //--------------------------------------------------------------------------
41
- {{fanin|walk(cpuif=cpuif)}}
41
+ {{fanin|walk(cpuif=cpuif)}}
@@ -77,8 +77,8 @@ class AXI4LiteCpuif(BaseCpuif):
77
77
  if self.is_interface and node.is_array and node.array_dimensions:
78
78
  # Generate array index string [i0][i1]... for the intermediate signal
79
79
  array_idx = "".join(f"[i{i}]" for i in range(len(node.array_dimensions)))
80
- fanin["cpuif_wr_ack"] = f"{node.inst_name}_fanin_ready{array_idx}"
81
- fanin["cpuif_wr_err"] = f"{node.inst_name}_fanin_err{array_idx}"
80
+ fanin["cpuif_wr_ack"] = f"{node.inst_name}_fanin_wr_valid{array_idx}"
81
+ fanin["cpuif_wr_err"] = f"{node.inst_name}_fanin_wr_err{array_idx}"
82
82
  else:
83
83
  # Read side: ack comes from RVALID; err if RRESP[1] is set (SLVERR/DECERR)
84
84
  fanin["cpuif_wr_ack"] = self.signal("BVALID", node, "i")
@@ -119,4 +119,16 @@ class AXI4LiteCpuif(BaseCpuif):
119
119
  f"assign {inst_name}_fanin_ready{array_idx} = {master_prefix}{indexed_path}.RVALID;",
120
120
  f"assign {inst_name}_fanin_err{array_idx} = {master_prefix}{indexed_path}.RRESP[1];",
121
121
  f"assign {inst_name}_fanin_data{array_idx} = {master_prefix}{indexed_path}.RDATA;",
122
+ f"assign {inst_name}_fanin_wr_valid{array_idx} = {master_prefix}{indexed_path}.BVALID;",
123
+ f"assign {inst_name}_fanin_wr_err{array_idx} = {master_prefix}{indexed_path}.BRESP[1];",
124
+ ]
125
+
126
+ def fanin_intermediate_declarations(self, node: AddressableNode) -> list[str]:
127
+ if not node.array_dimensions:
128
+ return []
129
+
130
+ array_str = "".join(f"[{dim}]" for dim in node.array_dimensions)
131
+ return [
132
+ f"logic {node.inst_name}_fanin_wr_valid{array_str};",
133
+ f"logic {node.inst_name}_fanin_wr_err{array_str};",
122
134
  ]
@@ -26,9 +26,21 @@
26
26
  `endif
27
27
  {% endif -%}
28
28
 
29
+ logic axi_wr_valid;
30
+ logic axi_wr_invalid;
31
+ logic cpuif_wr_ack_int;
32
+ logic cpuif_rd_ack_int;
33
+
34
+ assign axi_wr_valid = {{cpuif.signal("AWVALID")}} & {{cpuif.signal("WVALID")}};
35
+ assign axi_wr_invalid = {{cpuif.signal("AWVALID")}} ^ {{cpuif.signal("WVALID")}};
36
+
37
+ // Ready/acceptance follows the simplified single-beat requirement
38
+ assign {{cpuif.signal("AWREADY")}} = axi_wr_valid;
39
+ assign {{cpuif.signal("WREADY")}} = axi_wr_valid;
40
+ assign {{cpuif.signal("ARREADY")}} = {{cpuif.signal("ARVALID")}};
29
41
 
30
42
  assign cpuif_req = {{cpuif.signal("AWVALID")}} | {{cpuif.signal("ARVALID")}};
31
- assign cpuif_wr_en = {{cpuif.signal("AWVALID")}} & {{cpuif.signal("WVALID")}};
43
+ assign cpuif_wr_en = axi_wr_valid;
32
44
  assign cpuif_rd_en = {{cpuif.signal("ARVALID")}};
33
45
 
34
46
  assign cpuif_wr_addr = {{cpuif.signal("AWADDR")}};
@@ -42,12 +54,14 @@ assign cpuif_wr_byte_en = {{cpuif.signal("WSTRB")}};
42
54
  // Read: ack=RVALID, err=RRESP[1] (SLVERR/DECERR), data=RDATA
43
55
  //
44
56
  assign {{cpuif.signal("RDATA")}} = cpuif_rd_data;
45
- assign {{cpuif.signal("RVALID")}} = cpuif_rd_ack;
57
+ assign cpuif_rd_ack_int = cpuif_rd_ack | cpuif_rd_sel.cpuif_err;
58
+ assign {{cpuif.signal("RVALID")}} = cpuif_rd_ack_int;
46
59
  assign {{cpuif.signal("RRESP")}} = (cpuif_rd_err | cpuif_rd_sel.cpuif_err | cpuif_wr_sel.cpuif_err) ? 2'b10 : 2'b00;
47
60
 
48
61
  // Write: ack=BVALID, err=BRESP[1]
49
- assign {{cpuif.signal("BVALID")}} = cpuif_wr_ack;
50
- assign {{cpuif.signal("BRESP")}} = (cpuif_wr_err | cpuif_wr_sel.cpuif_err | cpuif_rd_sel.cpuif_err) ? 2'b10 : 2'b00;
62
+ assign cpuif_wr_ack_int = cpuif_wr_ack | cpuif_wr_sel.cpuif_err | axi_wr_invalid;
63
+ assign {{cpuif.signal("BVALID")}} = cpuif_wr_ack_int;
64
+ assign {{cpuif.signal("BRESP")}} = (cpuif_wr_err | cpuif_wr_sel.cpuif_err | cpuif_rd_sel.cpuif_err | axi_wr_invalid) ? 2'b10 : 2'b00;
51
65
 
52
66
  //--------------------------------------------------------------------------
53
67
  // Fanout CPU Bus interface signals
@@ -64,4 +78,4 @@ assign {{cpuif.signal("BRESP")}} = (cpuif_wr_err | cpuif_wr_sel.cpuif_err | cpu
64
78
  //--------------------------------------------------------------------------
65
79
  // Fanin CPU Bus interface signals
66
80
  //--------------------------------------------------------------------------
67
- {{fanin|walk(cpuif=cpuif)}}
81
+ {{fanin|walk(cpuif=cpuif)}}
@@ -136,3 +136,7 @@ class BaseCpuif:
136
136
  List of assignment strings
137
137
  """
138
138
  return [] # Default: no intermediate assignments needed
139
+
140
+ def fanin_intermediate_declarations(self, node: AddressableNode) -> list[str]:
141
+ """Optional extra intermediate signal declarations for interface arrays."""
142
+ return []
@@ -72,12 +72,12 @@ class FaninGenerator(BusDecoderListener):
72
72
  def __str__(self) -> str:
73
73
  wr_ifb = IfBody()
74
74
  with wr_ifb.cm("cpuif_wr_sel.cpuif_err") as b:
75
- self._cpuif.fanin_wr(error=True)
75
+ b += self._cpuif.fanin_wr(error=True)
76
76
  self._stack[-1] += wr_ifb
77
77
 
78
78
  rd_ifb = IfBody()
79
79
  with rd_ifb.cm("cpuif_rd_sel.cpuif_err") as b:
80
- self._cpuif.fanin_rd(error=True)
80
+ b += self._cpuif.fanin_rd(error=True)
81
81
  self._stack[-1] += rd_ifb
82
82
 
83
83
  return "\n".join(map(str, self._stack))
@@ -94,6 +94,9 @@ class FaninIntermediateGenerator(BusDecoderListener):
94
94
  f"logic [{self._cpuif.data_width - 1}:0] {inst_name}_fanin_data{array_str};"
95
95
  )
96
96
 
97
+ # Allow CPU interface to add extra intermediate declarations (e.g., write responses)
98
+ self._declarations.extend(self._cpuif.fanin_intermediate_declarations(node))
99
+
97
100
  def _generate_intermediate_assignments(self, node: AddressableNode) -> str:
98
101
  """Generate assignments from interface array to intermediate signals."""
99
102
  inst_name = node.inst_name
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-busdecoder
3
- Version: 0.6.6
3
+ Version: 0.6.7
4
4
  Summary: Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces
5
5
  Author: Arnav Sacheti
6
6
  License: LGPLv3
@@ -658,7 +658,7 @@ wheels = [
658
658
 
659
659
  [[package]]
660
660
  name = "peakrdl-busdecoder"
661
- version = "0.6.6"
661
+ version = "0.6.7"
662
662
  source = { editable = "." }
663
663
  dependencies = [
664
664
  { name = "jinja2" },