peakrdl-busdecoder 0.6.7__tar.gz → 0.6.8__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 (129) hide show
  1. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/PKG-INFO +1 -1
  2. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/api.rst +4 -7
  3. peakrdl_busdecoder-0.6.8/docs/architecture.rst +54 -0
  4. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/conf.py +1 -3
  5. peakrdl_busdecoder-0.6.8/docs/configuring.rst +38 -0
  6. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/cpuif/apb.rst +6 -6
  7. peakrdl_busdecoder-0.6.8/docs/cpuif/axi4lite.rst +33 -0
  8. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/cpuif/customizing.rst +4 -4
  9. peakrdl_busdecoder-0.6.8/docs/cpuif/internal_protocol.rst +71 -0
  10. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/cpuif/introduction.rst +10 -8
  11. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/index.rst +29 -35
  12. peakrdl_busdecoder-0.6.8/docs/limitations.rst +47 -0
  13. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/requirements.txt +0 -1
  14. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/pyproject.toml +1 -2
  15. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/design_scanner.py +11 -0
  16. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder.egg-info/PKG-INFO +1 -1
  17. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder.egg-info/SOURCES.txt +0 -11
  18. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/uv.lock +1 -382
  19. peakrdl_busdecoder-0.6.7/docs/architecture.rst +0 -64
  20. peakrdl_busdecoder-0.6.7/docs/configuring.rst +0 -45
  21. peakrdl_busdecoder-0.6.7/docs/cpuif/avalon.rst +0 -33
  22. peakrdl_busdecoder-0.6.7/docs/cpuif/axi4lite.rst +0 -32
  23. peakrdl_busdecoder-0.6.7/docs/cpuif/internal_protocol.rst +0 -232
  24. peakrdl_busdecoder-0.6.7/docs/cpuif/passthrough.rst +0 -10
  25. peakrdl_busdecoder-0.6.7/docs/faq.rst +0 -131
  26. peakrdl_busdecoder-0.6.7/docs/hwif.rst +0 -61
  27. peakrdl_busdecoder-0.6.7/docs/limitations.rst +0 -53
  28. peakrdl_busdecoder-0.6.7/docs/props/addrmap.rst +0 -28
  29. peakrdl_busdecoder-0.6.7/docs/props/field.rst +0 -491
  30. peakrdl_busdecoder-0.6.7/docs/props/reg.rst +0 -14
  31. peakrdl_busdecoder-0.6.7/docs/props/rhs_props.rst +0 -182
  32. peakrdl_busdecoder-0.6.7/docs/props/signal.rst +0 -28
  33. peakrdl_busdecoder-0.6.7/docs/rdl_features/external.rst +0 -155
  34. peakrdl_busdecoder-0.6.7/docs/udps/intro.rst +0 -79
  35. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.devcontainer/Dockerfile +0 -0
  36. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.devcontainer/devcontainer.json +0 -0
  37. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  38. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  39. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/ISSUE_TEMPLATE/question.md +0 -0
  40. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/pull_request_template.md +0 -0
  41. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/build.yml +0 -0
  42. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/docs.yml +0 -0
  43. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/format.yml +0 -0
  44. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/lint.yml +0 -0
  45. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/release.yml +0 -0
  46. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/test.yml +0 -0
  47. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.github/workflows/typecheck.yml +0 -0
  48. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.gitignore +0 -0
  49. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/.readthedocs.yaml +0 -0
  50. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/CONTRIBUTING.md +0 -0
  51. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/LICENSE +0 -0
  52. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/MANIFEST.in +0 -0
  53. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/README.md +0 -0
  54. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/Makefile +0 -0
  55. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/Alpha-Beta Versioning +0 -0
  56. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/Hierarchy-and-Indexing +0 -0
  57. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/Program Flow +0 -0
  58. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/Resets +0 -0
  59. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/Signal Dereferencer +0 -0
  60. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/Validation Needed +0 -0
  61. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/1-port-declaration +0 -0
  62. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/1.1.hardware-interface +0 -0
  63. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/2-CPUIF +0 -0
  64. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/3-address-decode +0 -0
  65. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/4-fields +0 -0
  66. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/5-readback-mux +0 -0
  67. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/dev_notes/template-layers/6-output-port-mapping +0 -0
  68. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/diagrams/arch.png +0 -0
  69. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/diagrams/diagrams.odg +0 -0
  70. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/diagrams/rbuf.png +0 -0
  71. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/diagrams/readback.png +0 -0
  72. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/diagrams/wbuf.png +0 -0
  73. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/img/err.svg +0 -0
  74. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/img/ok.svg +0 -0
  75. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/img/warn.svg +0 -0
  76. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/docs/licensing.rst +0 -0
  77. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/hdl-src/README.md +0 -0
  78. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/hdl-src/apb3_intf.sv +0 -0
  79. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/hdl-src/apb4_intf.sv +0 -0
  80. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/hdl-src/avalon_mm_intf.sv +0 -0
  81. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/hdl-src/axi4lite_intf.sv +0 -0
  82. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/setup.cfg +0 -0
  83. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/__init__.py +0 -0
  84. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/__peakrdl__.py +0 -0
  85. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/body/__init__.py +0 -0
  86. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/body/body.py +0 -0
  87. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/body/combinational_body.py +0 -0
  88. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/body/for_loop_body.py +0 -0
  89. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/body/if_body.py +0 -0
  90. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/body/struct_body.py +0 -0
  91. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/__init__.py +0 -0
  92. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb3/__init__.py +0 -0
  93. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif.py +0 -0
  94. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif_flat.py +0 -0
  95. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb3/apb3_interface.py +0 -0
  96. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb3/apb3_tmpl.sv +0 -0
  97. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb4/__init__.py +0 -0
  98. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif.py +0 -0
  99. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif_flat.py +0 -0
  100. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb4/apb4_interface.py +0 -0
  101. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/apb4/apb4_tmpl.sv +0 -0
  102. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/axi4lite/__init__.py +0 -0
  103. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif.py +0 -0
  104. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif_flat.py +0 -0
  105. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_interface.py +0 -0
  106. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_tmpl.sv +0 -0
  107. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/base_cpuif.py +0 -0
  108. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/fanin_gen.py +0 -0
  109. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/fanin_intermediate_gen.py +0 -0
  110. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/fanout_gen.py +0 -0
  111. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/cpuif/interface.py +0 -0
  112. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/decode_logic_gen.py +0 -0
  113. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/design_state.py +0 -0
  114. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/exporter.py +0 -0
  115. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/identifier_filter.py +0 -0
  116. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/listener.py +0 -0
  117. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/module_tmpl.sv +0 -0
  118. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/package_tmpl.sv +0 -0
  119. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/py.typed +0 -0
  120. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/struct_gen.py +0 -0
  121. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/sv_int.py +0 -0
  122. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/udps/__init__.py +0 -0
  123. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/utils.py +0 -0
  124. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder/validate_design.py +0 -0
  125. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder.egg-info/dependency_links.txt +0 -0
  126. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder.egg-info/entry_points.txt +0 -0
  127. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder.egg-info/requires.txt +0 -0
  128. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/src/peakrdl_busdecoder.egg-info/top_level.txt +0 -0
  129. {peakrdl_busdecoder-0.6.7 → peakrdl_busdecoder-0.6.8}/tools/shims/xargs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-busdecoder
3
- Version: 0.6.7
3
+ Version: 0.6.8
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
@@ -15,10 +15,11 @@ implementation from SystemRDL source.
15
15
  .. code-block:: python
16
16
  :emphasize-lines: 2-4, 29-33
17
17
 
18
+ import sys
19
+
18
20
  from systemrdl import RDLCompiler, RDLCompileError
19
21
  from peakrdl_busdecoder import BusDecoderExporter
20
- from peakrdl_busdecoder.cpuif.axi4lite import AXI4Lite_Cpuif
21
- from peakrdl_busdecoder.udps import ALL_UDPS
22
+ from peakrdl_busdecoder.cpuif.axi4lite import AXI4LiteCpuif
22
23
 
23
24
  input_files = [
24
25
  "PATH/TO/my_register_block.rdl"
@@ -27,10 +28,6 @@ implementation from SystemRDL source.
27
28
  # Create an instance of the compiler
28
29
  rdlc = RDLCompiler()
29
30
 
30
- # Register all UDPs that 'busdecoder' requires
31
- for udp in ALL_UDPS:
32
- rdlc.register_udp(udp)
33
-
34
31
  try:
35
32
  # Compile your RDL files
36
33
  for input_file in input_files:
@@ -46,5 +43,5 @@ implementation from SystemRDL source.
46
43
  exporter = BusDecoderExporter()
47
44
  exporter.export(
48
45
  root, "path/to/output_dir",
49
- cpuif_cls=AXI4Lite_Cpuif
46
+ cpuif_cls=AXI4LiteCpuif
50
47
  )
@@ -0,0 +1,54 @@
1
+ Bus Decoder Architecture
2
+ ========================
3
+
4
+ The generated RTL is a pure bus-routing layer. It accepts a single CPU interface
5
+ on the slave side and fans transactions out to a set of child interfaces on the
6
+ master side. No register storage or field logic is generated.
7
+
8
+ Although you do not need to know the inner workings to use the exporter, the
9
+ sections below explain the structure of the generated module and how it maps to
10
+ SystemRDL hierarchy.
11
+
12
+
13
+ CPU Interface Adapter
14
+ ---------------------
15
+ Each supported CPU interface protocol (APB3, APB4, AXI4-Lite) provides a small
16
+ adapter that translates the external bus protocol into internal request/response
17
+ signals. These internal signals are then used by the address decoder and fanout
18
+ logic.
19
+
20
+ If you write a custom CPU interface, it must implement the internal signals
21
+ described in :ref:`cpuif_protocol`.
22
+
23
+
24
+ Address Decode
25
+ --------------
26
+ The address decoder computes per-child select signals based on address ranges.
27
+ The decode boundary is controlled by ``max_decode_depth``:
28
+
29
+ * ``0``: Decode all the way down to leaf registers
30
+ * ``1`` (default): Decode only top-level children
31
+ * ``N``: Decode down to depth ``N`` from the top-level
32
+
33
+ This allows you to choose whether the bus decoder routes to large blocks (e.g.,
34
+ child addrmaps) or to smaller sub-blocks.
35
+
36
+
37
+ Fanout to Child Interfaces
38
+ --------------------------
39
+ For each decoded child, the bus decoder drives a master-side CPU interface.
40
+ All address, data, and control signals are forwarded to the selected child.
41
+
42
+ Arrayed children can be kept as arrays or unrolled into discrete interfaces using
43
+ ``--unroll``. This only affects port structure and naming; decode semantics are
44
+ unchanged.
45
+
46
+
47
+ Fanin and Error Handling
48
+ ------------------------
49
+ Read and write responses are muxed back from the selected child to the slave
50
+ interface. If no child is selected for a transaction, the decoder generates an
51
+ error response on the slave interface.
52
+
53
+ The exact error signaling depends on the chosen CPU interface protocol (e.g.,
54
+ ``PSLVERR`` for APB, ``RRESP/BRESP`` for AXI4-Lite).
@@ -32,9 +32,7 @@ author = "Arnav Sacheti"
32
32
  extensions = [
33
33
  "sphinx.ext.autodoc",
34
34
  "sphinx.ext.napoleon",
35
- "sphinxcontrib.wavedrom",
36
35
  ]
37
- render_using_wavedrompy = True
38
36
 
39
37
  # Add any paths that contain templates here, relative to this directory.
40
38
  templates_path = ["_templates"]
@@ -42,7 +40,7 @@ templates_path = ["_templates"]
42
40
  # List of patterns, relative to source directory, that match files and
43
41
  # directories to ignore when looking for source files.
44
42
  # This pattern also affects html_static_path and html_extra_path.
45
- exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
43
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "dev_notes", "dev_notes/**"]
46
44
 
47
45
 
48
46
  # -- Options for HTML output -------------------------------------------------
@@ -0,0 +1,38 @@
1
+ .. _peakrdl_cfg:
2
+
3
+ Configuring PeakRDL-BusDecoder
4
+ ==============================
5
+
6
+ If using the `PeakRDL command line tool <https://peakrdl.readthedocs.io/>`_,
7
+ some aspects of the ``busdecoder`` command can be configured via the PeakRDL
8
+ TOML file.
9
+
10
+ All busdecoder-specific options are defined under the ``[busdecoder]`` heading.
11
+
12
+ .. data:: cpuifs
13
+
14
+ Mapping of additional CPU Interface implementation classes to load.
15
+ The mapping's key indicates the cpuif's name.
16
+ The value is a string that describes the import path and cpuif class to
17
+ load.
18
+
19
+ For example:
20
+
21
+ .. code-block:: toml
22
+
23
+ [busdecoder]
24
+ cpuifs.my-cpuif-name = "my_cpuif_module:MyCPUInterfaceClass"
25
+
26
+
27
+ Command-Line Options
28
+ --------------------
29
+
30
+ The following options are available on the ``peakrdl busdecoder`` command:
31
+
32
+ * ``--cpuif``: Select the CPU interface (``apb3``, ``apb3-flat``, ``apb4``,
33
+ ``apb4-flat``, ``axi4-lite``, ``axi4-lite-flat``)
34
+ * ``--module-name``: Override the generated module name
35
+ * ``--package-name``: Override the generated package name
36
+ * ``--addr-width``: Override the slave address width
37
+ * ``--unroll``: Unroll arrayed children into discrete interfaces
38
+ * ``--max-decode-depth``: Control how far the decoder descends into hierarchy
@@ -20,7 +20,7 @@ Both APB3 and APB4 standards are supported.
20
20
  APB3
21
21
  ----
22
22
 
23
- Implements the register block using an
23
+ Implements the bus decoder using an
24
24
  `AMBA 3 APB <https://developer.arm.com/documentation/ihi0024/b/Introduction/About-the-AMBA-3-APB>`_
25
25
  CPU interface.
26
26
 
@@ -29,19 +29,19 @@ The APB3 CPU interface comes in two i/o port flavors:
29
29
  SystemVerilog Interface
30
30
  * Command line: ``--cpuif apb3``
31
31
  * Interface Definition: :download:`apb3_intf.sv <../../hdl-src/apb3_intf.sv>`
32
- * Class: :class:`peakrdl_busdecoder.cpuif.apb3.APB3_Cpuif`
32
+ * Class: :class:`peakrdl_busdecoder.cpuif.apb3.APB3Cpuif`
33
33
 
34
34
  Flattened inputs/outputs
35
35
  Flattens the interface into discrete input and output ports.
36
36
 
37
37
  * Command line: ``--cpuif apb3-flat``
38
- * Class: :class:`peakrdl_busdecoder.cpuif.apb3.APB3_Cpuif_flattened`
38
+ * Class: :class:`peakrdl_busdecoder.cpuif.apb3.APB3CpuifFlat`
39
39
 
40
40
 
41
41
  APB4
42
42
  ----
43
43
 
44
- Implements the register block using an
44
+ Implements the bus decoder using an
45
45
  `AMBA 4 APB <https://developer.arm.com/documentation/ihi0024/d/?lang=en>`_
46
46
  CPU interface.
47
47
 
@@ -50,10 +50,10 @@ The APB4 CPU interface comes in two i/o port flavors:
50
50
  SystemVerilog Interface
51
51
  * Command line: ``--cpuif apb4``
52
52
  * Interface Definition: :download:`apb4_intf.sv <../../hdl-src/apb4_intf.sv>`
53
- * Class: :class:`peakrdl_busdecoder.cpuif.apb4.APB4_Cpuif`
53
+ * Class: :class:`peakrdl_busdecoder.cpuif.apb4.APB4Cpuif`
54
54
 
55
55
  Flattened inputs/outputs
56
56
  Flattens the interface into discrete input and output ports.
57
57
 
58
58
  * Command line: ``--cpuif apb4-flat``
59
- * Class: :class:`peakrdl_busdecoder.cpuif.apb4.APB4_Cpuif_flattened`
59
+ * Class: :class:`peakrdl_busdecoder.cpuif.apb4.APB4CpuifFlat`
@@ -0,0 +1,33 @@
1
+ .. _cpuif_axi4lite:
2
+
3
+ AMBA AXI4-Lite
4
+ ==============
5
+
6
+ Implements the bus decoder using an
7
+ `AMBA AXI4-Lite <https://developer.arm.com/documentation/ihi0022/e/AMBA-AXI4-Lite-Interface-Specification>`_
8
+ CPU interface.
9
+
10
+ The AXI4-Lite CPU interface comes in two i/o port flavors:
11
+
12
+ SystemVerilog Interface
13
+ * Command line: ``--cpuif axi4-lite``
14
+ * Interface Definition: :download:`axi4lite_intf.sv <../../hdl-src/axi4lite_intf.sv>`
15
+ * Class: :class:`peakrdl_busdecoder.cpuif.axi4lite.AXI4LiteCpuif`
16
+
17
+ Flattened inputs/outputs
18
+ Flattens the interface into discrete input and output ports.
19
+
20
+ * Command line: ``--cpuif axi4-lite-flat``
21
+ * Class: :class:`peakrdl_busdecoder.cpuif.axi4lite.AXI4LiteCpuifFlat`
22
+
23
+
24
+ Protocol Notes
25
+ --------------
26
+ The AXI4-Lite adapter is intentionally simplified:
27
+
28
+ * AW and W channels must be asserted together for writes. The adapter does not
29
+ support decoupled address/data for writes.
30
+ * Only a single outstanding transaction is supported. Masters should wait for
31
+ the corresponding response before issuing the next request.
32
+ * Burst transfers are not supported (single-beat transfers only), consistent
33
+ with AXI4-Lite.
@@ -29,15 +29,15 @@ Rather than rewriting a new CPU interface definition, you can extend and adjust
29
29
 
30
30
  .. code-block:: python
31
31
 
32
- from peakrdl_busdecoder.cpuif.axi4lite import AXI4Lite_Cpuif
32
+ from peakrdl_busdecoder.cpuif.axi4lite import AXI4LiteCpuif
33
33
 
34
- class My_AXI4Lite(AXI4Lite_Cpuif):
34
+ class My_AXI4Lite(AXI4LiteCpuif):
35
35
  @property
36
36
  def port_declaration(self) -> str:
37
37
  # Override the port declaration text to use the alternate interface name and modport style
38
38
  return "axi4_lite_interface.Slave_mp s_axil"
39
39
 
40
- def signal(self, name:str) -> str:
40
+ def signal(self, name: str, node=None, indexer=None) -> str:
41
41
  # Override the signal names to be lowercase instead
42
42
  return "s_axil." + name.lower()
43
43
 
@@ -72,7 +72,7 @@ you can define your own.
72
72
 
73
73
  2. Create a Python class that defines your CPUIF
74
74
 
75
- Extend your class from :class:`peakrdl_busdecoder.cpuif.CpuifBase`.
75
+ Extend your class from :class:`peakrdl_busdecoder.cpuif.BaseCpuif`.
76
76
  Define the port declaration string, and provide a reference to your template file.
77
77
 
78
78
  3. Use your new CPUIF definition when exporting.
@@ -0,0 +1,71 @@
1
+ .. _cpuif_protocol:
2
+
3
+ Internal CPUIF Protocol
4
+ =======================
5
+
6
+ Internally, the bus decoder uses a small set of common request/response signals
7
+ that each CPU interface adapter must drive. This protocol is intentionally simple
8
+ and supports a single outstanding transaction at a time. The CPU interface logic
9
+ is responsible for holding request signals stable until the transaction completes.
10
+
11
+
12
+ Signal Descriptions
13
+ -------------------
14
+
15
+ Request
16
+ ^^^^^^^
17
+ cpuif_req
18
+ When asserted, a read or write transfer is in progress. Request signals must
19
+ remain stable until the transfer completes.
20
+
21
+ cpuif_wr_en
22
+ When asserted alongside ``cpuif_req``, denotes a write transfer.
23
+
24
+ cpuif_rd_en
25
+ When asserted alongside ``cpuif_req``, denotes a read transfer.
26
+
27
+ cpuif_wr_addr / cpuif_rd_addr
28
+ Byte address of the write or read transfer, respectively.
29
+
30
+ cpuif_wr_data
31
+ Data to be written for the write transfer.
32
+
33
+ cpuif_wr_byte_en
34
+ Active-high byte-enable strobes for writes. Some CPU interfaces do not
35
+ provide byte enables and may drive this as all-ones.
36
+
37
+
38
+ Read Response
39
+ ^^^^^^^^^^^^^
40
+ cpuif_rd_ack
41
+ Single-cycle strobe indicating a read transfer has completed.
42
+ Qualifies ``cpuif_rd_err`` and ``cpuif_rd_data``.
43
+
44
+ cpuif_rd_err
45
+ Indicates that the read transaction failed. The CPU interface should return
46
+ an error response if possible.
47
+
48
+ cpuif_rd_data
49
+ Read data. Sampled on the same cycle that ``cpuif_rd_ack`` is asserted.
50
+
51
+
52
+ Write Response
53
+ ^^^^^^^^^^^^^^
54
+ cpuif_wr_ack
55
+ Single-cycle strobe indicating a write transfer has completed.
56
+ Qualifies ``cpuif_wr_err``.
57
+
58
+ cpuif_wr_err
59
+ Indicates that the write transaction failed. The CPU interface should return
60
+ an error response if possible.
61
+
62
+
63
+ Transfers
64
+ ---------
65
+
66
+ Transfers have the following characteristics:
67
+
68
+ * Only one outstanding transaction is supported.
69
+ * The CPU interface must hold ``cpuif_req`` and request parameters stable until
70
+ the corresponding ``cpuif_*_ack`` is asserted.
71
+ * Responses shall arrive in the same order as requests.
@@ -2,16 +2,17 @@ Introduction
2
2
  ============
3
3
 
4
4
  The CPU interface logic layer provides an abstraction between the
5
- application-specific bus protocol and the internal register file logic.
6
- When exporting a design, you can select from a variety of popular CPU interface
7
- protocols. These are described in more detail in the pages that follow.
5
+ application-specific bus protocol and the internal bus decoder logic.
6
+ When exporting a design, you can select from supported CPU interface protocols.
7
+ These are described in more detail in the pages that follow.
8
8
 
9
9
 
10
10
  Bus Width
11
11
  ^^^^^^^^^
12
- The CPU interface bus width is automatically determined from the contents of the
13
- design being exported. The bus width is equal to the widest ``accesswidth``
14
- encountered in the design.
12
+ The CPU interface bus width is inferred from the contents of the design.
13
+ It is intended to be equal to the widest ``accesswidth`` encountered in the
14
+ design. If the exported addrmap contains only external components, the width
15
+ cannot be inferred and will default to 32 bits.
15
16
 
16
17
 
17
18
  Addressing
@@ -32,5 +33,6 @@ For example, consider a fictional AXI4-Lite device that:
32
33
  - If care is taken to align the global address offset to the size of the device,
33
34
  creating a relative address is as simple as pruning down address bits.
34
35
 
35
- By default, the bit-width of the address bus will be the minimum size to span the contents
36
- of the register block. If needed, the address width can be overridden to a larger range.
36
+ By default, the bit-width of the address bus will be the minimum size to span the
37
+ contents of the decoded address space. If needed, the address width can be
38
+ overridden to a larger range using ``--addr-width``.
@@ -1,28 +1,34 @@
1
1
  Introduction
2
2
  ============
3
3
 
4
- PeakRDL-BusDecoder is a free and open-source bus decoder generator for hierarchical register address maps.
5
- This code generator translates your SystemRDL register description into a synthesizable
6
- SystemVerilog RTL module that decodes CPU interface transactions and routes them to
7
- multiple sub-address spaces (child addrmaps). This is particularly useful for:
4
+ PeakRDL-BusDecoder is a free and open-source bus decoder generator for hierarchical
5
+ SystemRDL address maps. It produces a synthesizable SystemVerilog RTL module that
6
+ accepts a single CPU interface (slave side) and fans transactions out to multiple
7
+ child address spaces (master side).
8
+
9
+ This tool **does not** generate register storage or field logic. It is strictly a
10
+ bus-routing layer that decodes addresses and forwards requests to child blocks.
11
+
12
+ This is particularly useful for:
8
13
 
9
14
  * Creating hierarchical register maps with multiple sub-components
10
15
  * Splitting a single CPU interface bus to serve multiple independent register blocks
11
- * Organizing large register designs into logical sub-address spaces
16
+ * Organizing large address spaces into logical sub-regions
12
17
  * Implementing address decode logic for multi-drop bus architectures
13
18
 
14
19
  The generated bus decoder provides:
15
20
 
16
21
  * Fully synthesizable SystemVerilog RTL (IEEE 1800-2012)
17
- * Support for many popular CPU interface protocols (AMBA APB, AXI4-Lite, and more)
22
+ * A top-level slave CPU interface and per-child master CPU interfaces
18
23
  * Address decode logic that routes transactions to child address maps
19
- * Configurable pipelining options for designs with fast clock rates
20
- * Broad support for SystemRDL 2.0 features
24
+ * Support for APB3, APB4, and AXI4-Lite (plus plugin-defined CPU interfaces)
25
+ * Configurable decode depth and array unrolling
21
26
 
22
27
 
23
28
  Quick Start
24
29
  -----------
25
- The easiest way to use PeakRDL-BusDecoder is via the `PeakRDL command line tool <https://peakrdl.readthedocs.io/>`_:
30
+ The easiest way to use PeakRDL-BusDecoder is via the
31
+ `PeakRDL command line tool <https://peakrdl.readthedocs.io/>`_:
26
32
 
27
33
  .. code-block:: bash
28
34
 
@@ -32,6 +38,20 @@ The easiest way to use PeakRDL-BusDecoder is via the `PeakRDL command line tool
32
38
  # Export!
33
39
  peakrdl busdecoder atxmega_spi.rdl -o busdecoder/ --cpuif axi4-lite
34
40
 
41
+ The exporter writes two files:
42
+
43
+ * A SystemVerilog module (the bus decoder)
44
+ * A SystemVerilog package (constants like data width and per-child address widths)
45
+
46
+ Key command-line options:
47
+
48
+ * ``--cpuif``: Select the CPU interface (``apb3``, ``apb3-flat``, ``apb4``, ``apb4-flat``, ``axi4-lite``, ``axi4-lite-flat``)
49
+ * ``--module-name``: Override the generated module name
50
+ * ``--package-name``: Override the generated package name
51
+ * ``--addr-width``: Override the slave address width
52
+ * ``--unroll``: Unroll arrayed children into discrete interfaces
53
+ * ``--max-decode-depth``: Control how far the decoder descends into hierarchy
54
+
35
55
 
36
56
  Looking for VHDL?
37
57
  -----------------
@@ -55,10 +75,8 @@ Links
55
75
 
56
76
  self
57
77
  architecture
58
- hwif
59
78
  configuring
60
79
  limitations
61
- faq
62
80
  licensing
63
81
  api
64
82
 
@@ -69,29 +87,5 @@ Links
69
87
  cpuif/introduction
70
88
  cpuif/apb
71
89
  cpuif/axi4lite
72
- cpuif/avalon
73
- cpuif/passthrough
74
90
  cpuif/internal_protocol
75
91
  cpuif/customizing
76
-
77
- .. toctree::
78
- :hidden:
79
- :caption: SystemRDL Properties
80
-
81
- props/field
82
- props/reg
83
- props/addrmap
84
- props/signal
85
- props/rhs_props
86
-
87
- .. toctree::
88
- :hidden:
89
- :caption: Other SystemRDL Features
90
-
91
- rdl_features/external
92
-
93
- .. toctree::
94
- :hidden:
95
- :caption: Extended Properties
96
-
97
- udps/intro
@@ -0,0 +1,47 @@
1
+ Known Limitations
2
+ =================
3
+
4
+ The busdecoder exporter intentionally focuses on address decode and routing.
5
+ Some SystemRDL features are ignored, and a few are explicitly disallowed.
6
+
7
+
8
+ Address Alignment
9
+ -----------------
10
+ All address offsets and array strides must be aligned to the CPU interface data
11
+ bus width (in bytes). Misaligned offsets/strides are rejected.
12
+
13
+
14
+ Wide Registers
15
+ --------------
16
+ If a register is wider than its ``accesswidth`` (a multi-word register), its
17
+ ``accesswidth`` must match the CPU interface data width. Multi-word registers
18
+ with a smaller accesswidth are not supported.
19
+
20
+
21
+ Fields Spanning Sub-Words
22
+ -------------------------
23
+ If a field spans multiple sub-words of a wide register:
24
+
25
+ * Software-writable fields must have write buffering enabled
26
+ * Fields with ``onread`` side-effects must have read buffering enabled
27
+
28
+ These rules are enforced to avoid ambiguous multi-word access behavior.
29
+
30
+
31
+ External Boundary References
32
+ ----------------------------
33
+ Property references are not allowed to cross the internal/external boundary of
34
+ the exported addrmap. References must point to components that are internal to
35
+ the busdecoder being generated.
36
+
37
+ CPU Interface Reset Location
38
+ ----------------------------
39
+ Only ``cpuif_reset`` signals instantiated at the top-level addrmap (or above)
40
+ are honored. Nested ``cpuif_reset`` signals are ignored.
41
+
42
+
43
+ Unsupported Properties
44
+ ----------------------
45
+ The following SystemRDL properties are explicitly rejected:
46
+
47
+ * ``sharedextbus`` on addrmap/regfile components
@@ -1,3 +1,2 @@
1
1
  pygments-systemrdl
2
- sphinxcontrib-wavedrom
3
2
  sphinx-book-theme
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "peakrdl-busdecoder"
7
- version = "0.6.7"
7
+ version = "0.6.8"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
10
  "jinja2~=3.1",
@@ -55,7 +55,6 @@ Documentation = "https://peakrdl-busdecoder.readthedocs.io/"
55
55
  docs = [
56
56
  "pygments-systemrdl>=1.3.0",
57
57
  "sphinx-book-theme>=1.1.4",
58
- "sphinxcontrib-wavedrom>=3.0.4",
59
58
  ]
60
59
  test = [
61
60
  "parameterized>=0.9.0",
@@ -44,3 +44,14 @@ class DesignScanner(RDLListener):
44
44
  self.ds.has_external_addressable = True
45
45
  if not isinstance(node, RegNode):
46
46
  self.ds.has_external_block = True
47
+
48
+ def enter_Reg(self, node: RegNode) -> None:
49
+ if node.external and node != self.top_node:
50
+ return
51
+
52
+ accesswidth = node.get_property("accesswidth")
53
+ if accesswidth is None:
54
+ return
55
+
56
+ if accesswidth > self.ds.cpuif_data_width:
57
+ self.ds.cpuif_data_width = accesswidth
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-busdecoder
3
- Version: 0.6.7
3
+ Version: 0.6.8
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
@@ -24,19 +24,15 @@ docs/api.rst
24
24
  docs/architecture.rst
25
25
  docs/conf.py
26
26
  docs/configuring.rst
27
- docs/faq.rst
28
- docs/hwif.rst
29
27
  docs/index.rst
30
28
  docs/licensing.rst
31
29
  docs/limitations.rst
32
30
  docs/requirements.txt
33
31
  docs/cpuif/apb.rst
34
- docs/cpuif/avalon.rst
35
32
  docs/cpuif/axi4lite.rst
36
33
  docs/cpuif/customizing.rst
37
34
  docs/cpuif/internal_protocol.rst
38
35
  docs/cpuif/introduction.rst
39
- docs/cpuif/passthrough.rst
40
36
  docs/dev_notes/Alpha-Beta Versioning
41
37
  docs/dev_notes/Hierarchy-and-Indexing
42
38
  docs/dev_notes/Program Flow
@@ -58,13 +54,6 @@ docs/diagrams/wbuf.png
58
54
  docs/img/err.svg
59
55
  docs/img/ok.svg
60
56
  docs/img/warn.svg
61
- docs/props/addrmap.rst
62
- docs/props/field.rst
63
- docs/props/reg.rst
64
- docs/props/rhs_props.rst
65
- docs/props/signal.rst
66
- docs/rdl_features/external.rst
67
- docs/udps/intro.rst
68
57
  hdl-src/README.md
69
58
  hdl-src/apb3_intf.sv
70
59
  hdl-src/apb4_intf.sv