SimplHDL 0.5.8__tar.gz → 0.7.0__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 (204) hide show
  1. {simplhdl-0.5.8 → simplhdl-0.7.0}/PKG-INFO +5 -1
  2. {simplhdl-0.5.8 → simplhdl-0.7.0}/pyproject.toml +4 -0
  3. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/SimplHDL.egg-info/PKG-INFO +5 -1
  4. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/SimplHDL.egg-info/SOURCES.txt +1 -0
  5. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/SimplHDL.egg-info/requires.txt +4 -0
  6. simplhdl-0.7.0/src/simplhdl/__init__.py +1 -0
  7. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/cocotb.py +20 -3
  8. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/quartusflow.py +3 -2
  9. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/questasim/questasimflow.py +1 -0
  10. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/simulationflow.py +9 -3
  11. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/vcs/vcsflow.py +13 -4
  12. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/vivadoflow.py +3 -2
  13. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/generators/ipxact.py +8 -3
  14. simplhdl-0.7.0/src/simplhdl/generators/systemrdl.py +271 -0
  15. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/__init__.py +17 -1
  16. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/attributes.py +5 -0
  17. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/design.py +6 -0
  18. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/vhdllibrary.py +12 -3
  19. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/quartus/project.tcl.j2 +4 -0
  20. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/questasim/project.qrun.j2 +5 -4
  21. simplhdl-0.7.0/src/simplhdl/resources/templates/vcs/simv-run.do.j2 +6 -0
  22. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vivado/project.tcl.j2 +31 -4
  23. simplhdl-0.5.8/src/simplhdl/__init__.py +0 -1
  24. simplhdl-0.5.8/src/simplhdl/generators/systemrdl.py +0 -27
  25. {simplhdl-0.5.8 → simplhdl-0.7.0}/.github/workflows/publish.yml +0 -0
  26. {simplhdl-0.5.8 → simplhdl-0.7.0}/.gitignore +0 -0
  27. {simplhdl-0.5.8 → simplhdl-0.7.0}/.readthedocs.yaml +0 -0
  28. {simplhdl-0.5.8 → simplhdl-0.7.0}/LICENSE +0 -0
  29. {simplhdl-0.5.8 → simplhdl-0.7.0}/README.md +0 -0
  30. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/_static/simplhdl_dark.png +0 -0
  31. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/_static/simplhdl_light.png +0 -0
  32. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/_static/simplhdl_light_1.png +0 -0
  33. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/conf.py +0 -0
  34. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/drawing.svg +0 -0
  35. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/ghdl.rst +0 -0
  36. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/icarus.rst +0 -0
  37. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/quartus.rst +0 -0
  38. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/questasim.rst +0 -0
  39. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/vcs.rst +0 -0
  40. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/vivado.rst +0 -0
  41. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows/xsim.rst +0 -0
  42. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/flows.rst +0 -0
  43. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/index.rst +0 -0
  44. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/intel-ips.md +0 -0
  45. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/introduction.rst +0 -0
  46. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/plugins.rst +0 -0
  47. {simplhdl-0.5.8 → simplhdl-0.7.0}/docs/requirements.txt +0 -0
  48. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/adder.yml +0 -0
  49. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/hdl/adder.sv +0 -0
  50. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/sim/testbench.sv +0 -0
  51. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/sim/testbench.yml +0 -0
  52. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/syn/build.yml +0 -0
  53. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/syn/placement.xdc +0 -0
  54. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/syn/timing.xdc +0 -0
  55. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/adder/syn/top.sv +0 -0
  56. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/alu.yml +0 -0
  57. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/hdl/add.sv +0 -0
  58. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/hdl/alu.sv +0 -0
  59. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/hdl/mul.sv +0 -0
  60. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/hdl/sub.sv +0 -0
  61. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/__init__.py +0 -0
  62. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/agent.py +0 -0
  63. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/aluif.py +0 -0
  64. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/driver.py +0 -0
  65. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/monitor.py +0 -0
  66. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/sequenceitem.py +0 -0
  67. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/alu_vip/sequencer.py +0 -0
  68. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/clock_vip/__init__.py +0 -0
  69. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/clock_vip/agent.py +0 -0
  70. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/clock_vip/clockif.py +0 -0
  71. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/pyuvm.yml +0 -0
  72. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/test/__init__.py +0 -0
  73. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/test/env.py +0 -0
  74. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/test/seq_lib.py +0 -0
  75. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/test/test.py +0 -0
  76. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/pyuvm/testbench.py +0 -0
  77. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/agent.svh +0 -0
  78. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.sv +0 -0
  79. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.yml +0 -0
  80. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/driver.svh +0 -0
  81. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/env.svh +0 -0
  82. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/monitor.svh +0 -0
  83. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/alu_vip/sequence_item.svh +0 -0
  84. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/add_seq.svh +0 -0
  85. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/base_seq.svh +0 -0
  86. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/tb_env/tb_env.sv +0 -0
  87. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/tb_env/tb_env.yml +0 -0
  88. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/tb_env/test/base_test.svh +0 -0
  89. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/tb_env/test/test_add.svh +0 -0
  90. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/testbench/alu_if.sv +0 -0
  91. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/testbench/testbench.sv +0 -0
  92. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/testbench/testbench.yml +0 -0
  93. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/sim/uvm/testcases/test_add/test_add.yml +0 -0
  94. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/syn/build.yml +0 -0
  95. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/syn/placement.xdc +0 -0
  96. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/alu/syn/timing.xdc +0 -0
  97. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/hello/build.sbt +0 -0
  98. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/hello/hello.yml +0 -0
  99. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/hello/src/main/scala/Hello.scala +0 -0
  100. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/hdl/hello/syn/build.yml +0 -0
  101. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/plugins/simple_parser/setup.py +0 -0
  102. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/plugins/simple_parser/src/simple_parser/__init__.py +0 -0
  103. {simplhdl-0.5.8 → simplhdl-0.7.0}/examples/plugins/simple_parser/src/simple_parser/simple_parser.py +0 -0
  104. {simplhdl-0.5.8 → simplhdl-0.7.0}/setup.cfg +0 -0
  105. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/SimplHDL.egg-info/dependency_links.txt +0 -0
  106. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/SimplHDL.egg-info/entry_points.txt +0 -0
  107. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/SimplHDL.egg-info/top_level.txt +0 -0
  108. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/__main__.py +0 -0
  109. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flow.py +0 -0
  110. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/__init__.py +0 -0
  111. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/encrypt/__init__.py +0 -0
  112. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/encrypt/encryptflow.py +0 -0
  113. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/flake8/flake8flow.py +0 -0
  114. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/implementationflow.py +0 -0
  115. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/lint/lintflow.py +0 -0
  116. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/modelsim/__init__.py +0 -0
  117. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/modelsim/modelsimflow.py +0 -0
  118. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/quartusdse/__init__.py +0 -0
  119. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/quartusdse/quartusdseflow.py +0 -0
  120. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/quartusexport/__init__.py +0 -0
  121. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/quartusexport/quartusexportflow.py +0 -0
  122. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/questasim/__init__.py +0 -0
  123. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/rivierapro/__init__.py +0 -0
  124. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/rivierapro/rivieraproflow.py +0 -0
  125. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/vcs/__init__.py +0 -0
  126. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/verible/__init__.py +0 -0
  127. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/verible/veribleflow.py +0 -0
  128. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/vsg/__init__.py +0 -0
  129. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/vsg/vsgflow.py +0 -0
  130. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/xsim/__init__.py +0 -0
  131. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/flows/xsim/xsimflow.py +0 -0
  132. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/generator.py +0 -0
  133. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/generators/__init__.py +0 -0
  134. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/generators/chisel.py +0 -0
  135. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/generators/spd.py +0 -0
  136. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/info.py +0 -0
  137. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/parser.py +0 -0
  138. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/parsers/__init__.py +0 -0
  139. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/parsers/fusesocparser.py +0 -0
  140. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/parsers/simplhdlparser.py +0 -0
  141. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/plugins.py +0 -0
  142. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/fileset.py +0 -0
  143. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/filetypes.py +0 -0
  144. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/project.py +0 -0
  145. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/pyedaa/target.py +0 -0
  146. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/repo.py +0 -0
  147. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/__init__.py +0 -0
  148. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/__init__.py +0 -0
  149. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/flake8/__init__.py +0 -0
  150. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/flake8/setup.cfg.j2 +0 -0
  151. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/Makefile.j2 +0 -0
  152. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/__init__.py +0 -0
  153. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/cocotb.mk.j2 +0 -0
  154. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/dependencies.mk.j2 +0 -0
  155. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/files.j2 +0 -0
  156. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/fileset.j2 +0 -0
  157. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/modelsim.tcl.j2 +0 -0
  158. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/project.mk.j2 +0 -0
  159. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/modelsim/run.do.j2 +0 -0
  160. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/quartus/__init__.py +0 -0
  161. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/quartus/run.tcl.j2 +0 -0
  162. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/questasim/__init__.py +0 -0
  163. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/questasim/modelsim.tcl.j2 +0 -0
  164. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/questasim/visualizer.tcl.j2 +0 -0
  165. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/questasim/vsim-run.do.j2 +0 -0
  166. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/Makefile.j2 +0 -0
  167. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/__init__.py +0 -0
  168. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2 +0 -0
  169. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/dependencies.mk.j2 +0 -0
  170. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/files.j2 +0 -0
  171. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/fileset.j2 +0 -0
  172. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/rivierapro/project.mk.j2 +0 -0
  173. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/Makefile.j2 +0 -0
  174. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/__init__.py +0 -0
  175. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/cocotb.mk.j2 +0 -0
  176. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/dependencies.mk.j2 +0 -0
  177. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/files.j2 +0 -0
  178. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/fileset.j2 +0 -0
  179. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/pli.tab.j2 +0 -0
  180. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/project.mk.j2 +0 -0
  181. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2 +0 -0
  182. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vcs/vcs.parameters.j2 +0 -0
  183. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/verible/__init__.py +0 -0
  184. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/verible/rules.cfg.j2 +0 -0
  185. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vivado/__init__.py +0 -0
  186. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vivado/launch_run.sh.j2 +0 -0
  187. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vivado/run.tcl.j2 +0 -0
  188. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vivado/steps.tcl.j2 +0 -0
  189. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vsg/__init__.py +0 -0
  190. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vsg/files.json.j2 +0 -0
  191. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/vsg/rules.yml.j2 +0 -0
  192. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/Makefile.j2 +0 -0
  193. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/__init__.py +0 -0
  194. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/cocotb.mk.j2 +0 -0
  195. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/dependencies.mk.j2 +0 -0
  196. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/files.j2 +0 -0
  197. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/fileset.j2 +0 -0
  198. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/resources/templates/xsim/project.mk.j2 +0 -0
  199. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/run.py +0 -0
  200. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/simplhdl.py +0 -0
  201. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/tools.py +0 -0
  202. {simplhdl-0.5.8 → simplhdl-0.7.0}/src/simplhdl/utils.py +0 -0
  203. {simplhdl-0.5.8 → simplhdl-0.7.0}/tests/test_dummy.py +0 -0
  204. {simplhdl-0.5.8 → simplhdl-0.7.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimplHDL
3
- Version: 0.5.8
3
+ Version: 0.7.0
4
4
  Summary: A framework for simulating and implementing HDL designs
5
5
  Author-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
6
6
  Maintainer-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
@@ -56,6 +56,10 @@ Requires-Dist: rich
56
56
  Requires-Dist: vsg
57
57
  Requires-Dist: flake8
58
58
  Requires-Dist: black
59
+ Requires-Dist: systemrdl-compiler
60
+ Requires-Dist: peakrdl-html
61
+ Requires-Dist: peakrdl-regblock
62
+ Requires-Dist: peakrdl-pyuvm
59
63
  Dynamic: license-file
60
64
 
61
65
  ## Introduction
@@ -24,6 +24,10 @@ dependencies = [
24
24
  "vsg",
25
25
  "flake8",
26
26
  "black",
27
+ "systemrdl-compiler",
28
+ "peakrdl-html",
29
+ "peakrdl-regblock",
30
+ "peakrdl-pyuvm",
27
31
  ]
28
32
  requires-python = ">=3.8"
29
33
  authors = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimplHDL
3
- Version: 0.5.8
3
+ Version: 0.7.0
4
4
  Summary: A framework for simulating and implementing HDL designs
5
5
  Author-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
6
6
  Maintainer-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
@@ -56,6 +56,10 @@ Requires-Dist: rich
56
56
  Requires-Dist: vsg
57
57
  Requires-Dist: flake8
58
58
  Requires-Dist: black
59
+ Requires-Dist: systemrdl-compiler
60
+ Requires-Dist: peakrdl-html
61
+ Requires-Dist: peakrdl-regblock
62
+ Requires-Dist: peakrdl-pyuvm
59
63
  Dynamic: license-file
60
64
 
61
65
  ## Introduction
@@ -177,6 +177,7 @@ src/simplhdl/resources/templates/vcs/files.j2
177
177
  src/simplhdl/resources/templates/vcs/fileset.j2
178
178
  src/simplhdl/resources/templates/vcs/pli.tab.j2
179
179
  src/simplhdl/resources/templates/vcs/project.mk.j2
180
+ src/simplhdl/resources/templates/vcs/simv-run.do.j2
180
181
  src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2
181
182
  src/simplhdl/resources/templates/vcs/vcs.parameters.j2
182
183
  src/simplhdl/resources/templates/verible/__init__.py
@@ -9,6 +9,10 @@ rich
9
9
  vsg
10
10
  flake8
11
11
  black
12
+ systemrdl-compiler
13
+ peakrdl-html
14
+ peakrdl-regblock
15
+ peakrdl-pyuvm
12
16
 
13
17
  [:python_version < "3.9"]
14
18
  importlib-resources
@@ -0,0 +1 @@
1
+ __version__ = "0.7.0"
@@ -2,6 +2,8 @@ import logging
2
2
  import re
3
3
  import os
4
4
 
5
+ from packaging.version import Version
6
+ from pkg_resources import get_distribution
5
7
  from pathlib import Path
6
8
  from typing import Optional, Dict
7
9
 
@@ -15,8 +17,9 @@ logger = logging.getLogger(__name__)
15
17
 
16
18
  class Cocotb:
17
19
 
18
- def __init__(self, project: Project) -> None:
20
+ def __init__(self, project: Project, seed: int) -> None:
19
21
  self.project = project
22
+ self.seed = seed
20
23
  self.top = self.module()
21
24
  self.dut = self.get_dut()
22
25
  self.toplevels = self.hdltoplevels()
@@ -36,6 +39,13 @@ class Cocotb:
36
39
  raise FileNotFoundError(f"{path}: not found")
37
40
  return path
38
41
 
42
+ def pythonbin(self) -> str:
43
+ output = sh(['cocotb-config', '--python-bin'])
44
+ path = Path(output)
45
+ if not path.exists():
46
+ raise FileNotFoundError(f"{path}: not found")
47
+ return path
48
+
39
49
  def module(self) -> Optional[str]:
40
50
  if not self.enabled:
41
51
  return None
@@ -140,9 +150,16 @@ class Cocotb:
140
150
  return f'-pli {lib_name_path}'
141
151
 
142
152
  def env(self) -> Dict[str, str]:
153
+ cocotb_version = Version(get_distribution('cocotb').version)
143
154
  e = os.environ.copy()
144
- e['MODULE'] = self.top
145
- e['TOPLEVEL'] = self.dut
155
+ if cocotb_version >= Version('2.0.0'):
156
+ e['COCOTB_TEST_MODULES'] = self.top
157
+ e['COCOTB_TOPLEVEL'] = self.dut
158
+ e['PYGPI_PYTHON_BIN'] = self.pythonbin()
159
+ e['COCOTB_RANDOM_SEED'] = str(self.seed)
160
+ else:
161
+ e['MODULE'] = self.top
162
+ e['TOPLEVEL'] = self.dut
146
163
  e['PYTHONPYCACHEPREFIX'] = './pycache'
147
164
  e['LIBPYTHON_LOC'] = self.libpython()
148
165
  if self.duttype == VHDLSourceFile:
@@ -34,7 +34,7 @@ from ..pyedaa import (
34
34
  QuartusSourceTCLFile
35
35
  )
36
36
  from ..pyedaa.project import Project
37
- from ..pyedaa.attributes import UsedIn
37
+ from ..pyedaa.attributes import UsedIn, Scope
38
38
 
39
39
  logger = logging.getLogger(__name__)
40
40
 
@@ -130,7 +130,8 @@ class QuartusFlow(ImplementationFlow):
130
130
  QuartusIniFile=QuartusIniFile,
131
131
  MemoryInitFile=MemoryInitFile,
132
132
  project=self.project,
133
- UsedIn=UsedIn)
133
+ UsedIn=UsedIn,
134
+ Scope=Scope)
134
135
  template = environment.get_template('run.tcl.j2')
135
136
  generate_from_template(template, self.builddir,
136
137
  project=self.project)
@@ -362,6 +362,7 @@ class QuestaSimFlow(SimulationFlow):
362
362
  shutil.copy(file.Path.absolute(), self.builddir.absolute())
363
363
 
364
364
  def generate(self):
365
+ self.check_external_libraries()
365
366
  templatedir = resources_files(self.templates)
366
367
  env = Environment(
367
368
  loader=FileSystemLoader(templatedir),
@@ -35,7 +35,7 @@ class SimulationFlow(FlowBase):
35
35
  self.hashfile = self.builddir.joinpath('filesets.hash')
36
36
 
37
37
  def run(self) -> None:
38
- self.cocotb = Cocotb(self.project)
38
+ self.cocotb = Cocotb(self.project, self.args.seed)
39
39
  self.validate()
40
40
  self.configure()
41
41
  self.generate()
@@ -52,8 +52,6 @@ class SimulationFlow(FlowBase):
52
52
  os.makedirs(self.builddir, exist_ok=True)
53
53
  self.is_tool_setup()
54
54
  os.environ['RANDOM_SEED'] = str(self.args.seed)
55
- if self.cocotb.enabled:
56
- os.environ['MODULE'] = self.cocotb.module()
57
55
 
58
56
  def get_globals(self) -> Dict[str, Any]:
59
57
  incdirs = self.project.DefaultDesign.DefaultFileSet.IncludeDirs(usedin='simulation', isrecursive=True)
@@ -73,9 +71,17 @@ class SimulationFlow(FlowBase):
73
71
  globals['VHDLSourceFile'] = VHDLSourceFile
74
72
  globals['UsedIn'] = UsedIn
75
73
  globals['uvm'] = self.is_uvm()
74
+ globals['isinstance'] = isinstance
76
75
  return globals
77
76
 
77
+ def check_external_libraries(self):
78
+ for library in self.project.DefaultDesign.ExternalVHDLLibraries.values():
79
+ print(f"{library.Name}: {library.Path}")
80
+ if not library.Path.exists():
81
+ raise FlowError(f"External library {library.Name} doesn't exist at {library.Path.absolute()}")
82
+
78
83
  def generate(self):
84
+ self.check_external_libraries()
79
85
  templatedir = resources_files(self.templates)
80
86
  env = Environment(
81
87
  loader=FileSystemLoader(templatedir),
@@ -34,9 +34,11 @@ class VcsFlow(SimulationFlow):
34
34
  )
35
35
  parser.add_argument(
36
36
  '-w',
37
- '--wave',
38
- action='store_true',
39
- help="Dump waveforms"
37
+ '--wavedump',
38
+ nargs='?',
39
+ const='vpd',
40
+ choices=['vpd', 'evcd', 'fsdb'],
41
+ help="Dump waveforms using vpd, evcd or fsdb format"
40
42
  )
41
43
  parser.add_argument(
42
44
  '--gui',
@@ -92,6 +94,7 @@ class VcsFlow(SimulationFlow):
92
94
 
93
95
  def get_globals(self) -> Dict[str, Any]:
94
96
  globals = super().get_globals()
97
+ globals['wavedump'] = self.args.wavedump
95
98
  globals['vlogan_args'] = self.vlogan_args()
96
99
  globals['vhdlan_args'] = self.vhdlan_args()
97
100
  globals['vcs_args'] = self.vcs_args()
@@ -124,6 +127,8 @@ class VcsFlow(SimulationFlow):
124
127
  environment.get_template('synopsys_sim.setup.j2'),
125
128
  environment.get_template('project.mk.j2'),
126
129
  environment.get_template('vcs.parameters.j2'),
130
+ environment.get_template('simv-run.do.j2'),
131
+
127
132
  ]
128
133
 
129
134
  def get_cocotb_templates(self, environment):
@@ -179,7 +184,7 @@ class VcsFlow(SimulationFlow):
179
184
  args.add(f"-timescale={self.args.timescale}")
180
185
  if self.is_uvm():
181
186
  args.add('-ntb_opts uvm')
182
- if self.args.gui:
187
+ if self.args.gui or self.args.wavedump:
183
188
  args.add('-debug_access+all')
184
189
  if self.is_verdi():
185
190
  args.add('-kdb')
@@ -195,6 +200,10 @@ class VcsFlow(SimulationFlow):
195
200
  args.add(f"+ntb_random_seed={self.args.seed}")
196
201
  for name, value in self.project.PlusArgs.items():
197
202
  args.add(f"+{name}={escape(value)}")
203
+ if self.args.wavedump == 'vpd':
204
+ args.add('-ucli -do simv-run.do')
205
+ if self.args.wavedump == 'evcd' or self.args.wavedump == 'fsdb':
206
+ raise NotImplementedError(f"Wavedump for {self.args.wavedump} format is not yet implemented")
198
207
  return ' '.join(list(args) + [self.args.simv_args])
199
208
 
200
209
  def get_library(self, fileset: FileSet) -> str:
@@ -16,7 +16,7 @@ from ..pyedaa import (VivadoIPSpecificationFile, VerilogIncludeFile, VerilogSour
16
16
  SystemVerilogSourceFile, VHDLSourceFile, ConstraintFile,
17
17
  EDIFNetlistFile, NetlistFile, VivadoBDTclFile, VivadoProjectStepFile)
18
18
  from ..pyedaa.project import Project
19
- from ..pyedaa.attributes import UsedIn
19
+ from ..pyedaa.attributes import UsedIn, Scope
20
20
 
21
21
  logger = logging.getLogger(__name__)
22
22
 
@@ -118,7 +118,8 @@ class VivadoFlow(FlowBase):
118
118
  EDIFNetlistFile=EDIFNetlistFile,
119
119
  NetlistFile=NetlistFile,
120
120
  project=self.project,
121
- UsedIn=UsedIn)
121
+ UsedIn=UsedIn,
122
+ Scope=Scope)
122
123
  template = environment.get_template('run.tcl.j2')
123
124
  generate_from_template(template, self.builddir,
124
125
  project=self.project)
@@ -17,7 +17,7 @@ from ..pyedaa.vhdllibrary import VHDLLibrary
17
17
  from ..pyedaa import (
18
18
  File, SystemVerilogSourceFile, TCLSourceFile, ConstraintFile, HDLSourceFile,
19
19
  VHDLSourceFile, VerilogSourceFile, VivadoIPSpecificationFile,
20
- VerilogIncludeFile
20
+ VerilogIncludeFile, SystemCSourceFile, SystemCHeaderFile
21
21
  )
22
22
 
23
23
  logger = logging.getLogger(__name__)
@@ -40,6 +40,8 @@ FILETYPE_2014_MAP = {
40
40
  '.tcl': TCLSourceFile,
41
41
  'SDC': ConstraintFile,
42
42
  '.sdc': ConstraintFile,
43
+ 'systemCSource': SystemCSourceFile,
44
+ 'systemCSourceInclude': SystemCHeaderFile,
43
45
  'unknown': File,
44
46
  }
45
47
 
@@ -191,7 +193,7 @@ class VivadoIP(GeneratorBase):
191
193
  file = component.filepath(file_element).with_suffix('.xml')
192
194
  if file.exists():
193
195
  files += self.get_files(file)
194
- for view in component.views('.*simulation.*'):
196
+ for view in component.views('.*(verilog|vhdl)simulation.*'):
195
197
  filesets = component.filesets(view)
196
198
  for fileset in filesets:
197
199
  files += component.pyedaa_files(fileset)
@@ -217,6 +219,9 @@ class VivadoIP(GeneratorBase):
217
219
  i += 1
218
220
  filesets.append(fileset)
219
221
  last_lib = file.Library.Name
220
- fileset.AddFile(file)
222
+ try:
223
+ fileset.AddFile(file)
224
+ except Exception:
225
+ logger.warning(f"Failed to add {file.Path}")
221
226
  for fileset in filesets:
222
227
  newipfile.FileSet._fileSets[fileset.Name] = fileset
@@ -0,0 +1,271 @@
1
+ import os
2
+ import logging
3
+ import jinja2
4
+
5
+ from typing import List
6
+ from pathlib import Path
7
+ from systemrdl import RDLCompiler, RDLCompileError, RDLListener, RDLWalker
8
+ from systemrdl.node import AddrmapNode
9
+ from systemrdl.rdltypes import AccessType, OnReadType, OnWriteType
10
+ from peakrdl_html import HTMLExporter
11
+ from peakrdl_regblock.exporter import RegblockExporter
12
+ from peakrdl_regblock.cpuif.axi4lite import AXI4Lite_Cpuif_flattened
13
+ from peakrdl_regblock.udps import ALL_UDPS
14
+ from peakrdl_pyuvm.exporter import PyUVMExporter
15
+
16
+ from ..pyedaa.fileset import FileSet
17
+ from ..generator import GeneratorFactory, GeneratorBase
18
+ from ..pyedaa import SystemRDLSourceFile, SystemVerilogSourceFile, VerilogSourceFile, CocotbPythonFile
19
+ from ..flow import FlowBase, FlowCategory
20
+
21
+
22
+ logger = logging.getLogger(__name__)
23
+
24
+ seennodetypes: List[AddrmapNode] = []
25
+ leafnodetypes: List[AddrmapNode] = []
26
+ hierachynodetypes: List[AddrmapNode] = []
27
+ leafnodes: List[AddrmapNode] = []
28
+ hierachynodes: List[AddrmapNode] = []
29
+ nodes: List[AddrmapNode] = []
30
+
31
+
32
+ class Environment(jinja2.Environment):
33
+ def find_template(self, name):
34
+ list = [i for i in self.list_templates() if i.startswith(name)]
35
+ if len(list) == 0:
36
+ raise jinja2.TemplateNotFound(name)
37
+ if len(list) > 1:
38
+ logger.warning(f"Multiple templates found ({list}) for {name}")
39
+ return self.get_template(list[0])
40
+
41
+
42
+ class Listener(RDLListener):
43
+ def exit_Addrmap(self, node: AddrmapNode):
44
+ nodes.append(node)
45
+ if is_leaf(node):
46
+ leafnodes.append(node)
47
+ else:
48
+ hierachynodes.append(node)
49
+ seen = [n for n in seennodetypes if n.type_name == node.type_name]
50
+ if not seen:
51
+ seennodetypes.append(node)
52
+ if is_leaf(node):
53
+ leafnodetypes.append(node)
54
+ else:
55
+ hierachynodetypes.append(node)
56
+
57
+
58
+ def get_template_dirs() -> List[Path]:
59
+ string = os.getenv('SIMPLHDL_SYSTEMRDL_TEMPLATES')
60
+ if string:
61
+ templates = [Path(p) for p in string.split(':')]
62
+ for t in templates:
63
+ if not t.is_dir():
64
+ logger.error(f"Directory {t} does not exist")
65
+ raise SystemError
66
+ else:
67
+ logger.error("SIMPLHDL_SYSTEMRDL_TEMPLATES is not set, no templates found")
68
+ raise SystemError
69
+ return templates
70
+
71
+
72
+ def get_reg_access(reg) -> str:
73
+ if reg.has_sw_readable and reg.has_sw_writable:
74
+ return "RW"
75
+ elif reg.has_sw_writable:
76
+ return "WO"
77
+ elif reg.has_sw_readable:
78
+ return "RO"
79
+ else:
80
+ return "RW"
81
+
82
+
83
+ def get_field_access(field) -> str: # noqa: C901
84
+ """
85
+ Get field's UVM access string
86
+ """
87
+ sw = field.get_property("sw")
88
+ onread = field.get_property("onread")
89
+ onwrite = field.get_property("onwrite")
90
+
91
+ if sw == AccessType.rw:
92
+ if (onwrite is None) and (onread is None):
93
+ return "RW"
94
+ elif (onread == OnReadType.rclr) and (onwrite == OnWriteType.woset):
95
+ return "W1SRC"
96
+ elif (onread == OnReadType.rclr) and (onwrite == OnWriteType.wzs):
97
+ return "W0SRC"
98
+ elif (onread == OnReadType.rclr) and (onwrite == OnWriteType.wset):
99
+ return "WSRC"
100
+ elif (onread == OnReadType.rset) and (onwrite == OnWriteType.woclr):
101
+ return "W1CRS"
102
+ elif (onread == OnReadType.rset) and (onwrite == OnWriteType.wzc):
103
+ return "W0CRS"
104
+ elif (onread == OnReadType.rset) and (onwrite == OnWriteType.wclr):
105
+ return "WCRS"
106
+ elif onwrite == OnWriteType.woclr:
107
+ return "W1C"
108
+ elif onwrite == OnWriteType.woset:
109
+ return "W1S"
110
+ elif onwrite == OnWriteType.wot:
111
+ return "W1T"
112
+ elif onwrite == OnWriteType.wzc:
113
+ return "W0C"
114
+ elif onwrite == OnWriteType.wzs:
115
+ return "W0S"
116
+ elif onwrite == OnWriteType.wzt:
117
+ return "W0T"
118
+ elif onwrite == OnWriteType.wclr:
119
+ return "WC"
120
+ elif onwrite == OnWriteType.wset:
121
+ return "WS"
122
+ elif onread == OnReadType.rclr:
123
+ return "WRC"
124
+ elif onread == OnReadType.rset:
125
+ return "WRS"
126
+ else:
127
+ return "RW"
128
+
129
+ elif sw == AccessType.r:
130
+ if onread is None:
131
+ return "RO"
132
+ elif onread == OnReadType.rclr:
133
+ return "RC"
134
+ elif onread == OnReadType.rset:
135
+ return "RS"
136
+ else:
137
+ return "RO"
138
+
139
+ elif sw == AccessType.w:
140
+ if onwrite is None:
141
+ return "WO"
142
+ elif onwrite == OnWriteType.wclr:
143
+ return "WOC"
144
+ elif onwrite == OnWriteType.wset:
145
+ return "WOS"
146
+ else:
147
+ return "WO"
148
+
149
+ elif sw == AccessType.rw1:
150
+ return "W1"
151
+
152
+ elif sw == AccessType.w1:
153
+ return "WO1"
154
+
155
+ else:
156
+ return "NOACCESS"
157
+
158
+
159
+ def is_leaf(node):
160
+ """
161
+ Check if node is leaf, meaning it has no children address maps
162
+ """
163
+ if AddrmapNode not in [type(c) for c in node.children()]:
164
+ return True
165
+ else:
166
+ return False
167
+
168
+
169
+ def mask(node):
170
+ m = ~(node.size - 1) & 0xFFFFFFFF
171
+ return m
172
+
173
+
174
+ @GeneratorFactory.register('SystemRDL')
175
+ class SystemRDL(GeneratorBase):
176
+
177
+ def render_template(self, template: jinja2.Template, node, outputdir) -> Path:
178
+ if not template.filename.endswith('.j2'):
179
+ return
180
+ context = template.render(node=node)
181
+ outputdir.mkdir(parents=True, exist_ok=True)
182
+ outputfile: Path = outputdir.joinpath(f'{node.type_name}__{Path(template.filename).name[:-3]}').absolute()
183
+ with outputfile.open('w') as f:
184
+ f.write(context)
185
+ rdlfile = self.project.DefaultDesign.GetFile(node.inst.def_src_ref.path)
186
+ fileset = rdlfile.FileSet
187
+ if outputfile.suffix == '.sv':
188
+ fileset.InsertFileAfter(rdlfile, SystemVerilogSourceFile(outputfile))
189
+ if outputfile.suffix == '.v':
190
+ fileset.InsertFileAfter(rdlfile, VerilogSourceFile(outputfile))
191
+
192
+ def peakrdl_template(self, node, outputdir) -> None:
193
+ RegblockExporter().export(
194
+ node=node,
195
+ output_dir=str(outputdir.absolute()),
196
+ cpuif_cls=AXI4Lite_Cpuif_flattened,
197
+ module_name=f'{node.type_name}_addrmap',
198
+ package_name=f'{node.type_name}_pkg',
199
+ address_width=32,
200
+ default_reset_activelow=True
201
+
202
+ )
203
+ modulefile: Path = outputdir.joinpath(f'{node.type_name}_pkg.sv').absolute()
204
+ packetfile: Path = outputdir.joinpath(f'{node.type_name}_addrmap.sv').absolute()
205
+ rdlfile = self.project.DefaultDesign.GetFile(node.inst.def_src_ref.path)
206
+ parent_fileset = rdlfile.FileSet
207
+ fileset = FileSet(name=rdlfile.Path, vhdlLibrary=parent_fileset.VHDLLibrary)
208
+ fileset.AddFile(SystemVerilogSourceFile(modulefile))
209
+ fileset.AddFile(SystemVerilogSourceFile(packetfile))
210
+ parent_fileset.AddFileSet(fileset)
211
+
212
+ def run(self, flow: FlowBase):
213
+ rdlfiles = list(self.project.DefaultDesign.DefaultFileSet.Files(fileType=SystemRDLSourceFile))
214
+ output_dir = self.builddir.joinpath('systemrdl')
215
+
216
+ if not rdlfiles:
217
+ return
218
+
219
+ rdlc = RDLCompiler()
220
+
221
+ for udp in ALL_UDPS:
222
+ rdlc.register_udp(udp)
223
+
224
+ try:
225
+ for rdlfile in rdlfiles:
226
+ rdlc.compile_file(rdlfile.Path, defines=self.project.Defines)
227
+ root = rdlc.elaborate()
228
+ except RDLCompileError as e:
229
+ logger.error(str(e))
230
+ raise SystemError
231
+
232
+ walker = RDLWalker()
233
+ walker.walk(root, Listener())
234
+
235
+ templatedirs = get_template_dirs()
236
+
237
+ for templatedir in templatedirs:
238
+ logger.info(f"Generate from template {templatedir}")
239
+ sub_dir = output_dir.joinpath(templatedir.name)
240
+
241
+ env = Environment(
242
+ loader=jinja2.FileSystemLoader(templatedir),
243
+ trim_blocks=True)
244
+ env.globals['hex'] = hex
245
+ env.globals['len'] = len
246
+ env.globals['get_field_access'] = get_field_access
247
+ env.globals['get_reg_access'] = get_reg_access
248
+ env.globals['nodes'] = nodes
249
+ env.globals['leafnodes'] = leafnodes
250
+ env.globals['hierachynodes'] = hierachynodes
251
+ env.globals['is_leaf'] = is_leaf
252
+ env.globals['mask'] = mask
253
+ template = env.find_template('registermap')
254
+ for node in leafnodetypes:
255
+ self.render_template(template=template, node=node, outputdir=sub_dir)
256
+ self.peakrdl_template(node=node, outputdir=output_dir.joinpath('hdl'))
257
+
258
+ template = env.find_template('hierachymap')
259
+ for node in hierachynodetypes:
260
+ self.render_template(template=template, node=node, outputdir=sub_dir)
261
+
262
+ if flow.category == FlowCategory.SIMULATION:
263
+ logger.info("Generate PyUVM Register Model")
264
+ output = output_dir.joinpath('pyuvm', 'ralmodel.py')
265
+ output.parent.mkdir(parents=True, exist_ok=True)
266
+ PyUVMExporter().export(root, str(output))
267
+ fileset = rdlfiles[-1].FileSet
268
+ fileset.InsertFileAfter(rdlfile, CocotbPythonFile(output))
269
+
270
+ logger.info("Generate HTML Documentation")
271
+ HTMLExporter().export(root, output_dir.joinpath('docs'))
@@ -3,7 +3,7 @@ import pyEDAA.ProjectModel as pm
3
3
  from pathlib import Path
4
4
  from typing import Optional
5
5
  from pyTooling.MetaClasses import ExtendedType
6
- from .attributes import Encrypt, UsedIn, SIMULATION, IMPLEMENTATION
6
+ from .attributes import Encrypt, UsedIn, SIMULATION, IMPLEMENTATION, Scope
7
7
 
8
8
 
9
9
  class FileMixIn(metaclass=ExtendedType, mixin=True):
@@ -144,10 +144,25 @@ class EDIFNetlistFile(pm.EDIFNetlistFile, FileMixIn):
144
144
  FileMixIn._registerAttributes(self)
145
145
 
146
146
 
147
+ class CHeaderFile(SourceFile):
148
+ def _registerAttributes(self):
149
+ super()._registerAttributes()
150
+ self[UsedIn] = {SIMULATION}
151
+
152
+
147
153
  class CSourceFile(pm.CSourceFile, FileMixIn):
148
154
  def _registerAttributes(self):
149
155
  super()._registerAttributes()
150
156
  FileMixIn._registerAttributes(self)
157
+ self[UsedIn] = {SIMULATION}
158
+
159
+
160
+ class SystemCSourceFile(CSourceFile):
161
+ pass
162
+
163
+
164
+ class SystemCHeaderFile(CHeaderFile):
165
+ pass
151
166
 
152
167
 
153
168
  class SettingFile(pm.SettingFile, FileMixIn):
@@ -161,6 +176,7 @@ class ConstraintFile(pm.ConstraintFile, FileMixIn):
161
176
  super()._registerAttributes()
162
177
  FileMixIn._registerAttributes(self)
163
178
  self[UsedIn] = {IMPLEMENTATION}
179
+ self[Scope] = None
164
180
 
165
181
 
166
182
  class QuartusSignalTapFile(File):
@@ -14,3 +14,8 @@ class UsedIn(pm.Attribute):
14
14
  class Encrypt(pm.Attribute):
15
15
  NAME: 'Encrypt'
16
16
  VALUE_TYPE: bool
17
+
18
+
19
+ class Scope(pm.Attribute):
20
+ NAME: 'Scope'
21
+ VALUE_TYPE: str
@@ -3,6 +3,7 @@ import pyEDAA.ProjectModel as pm
3
3
  from pathlib import Path
4
4
  from typing import Dict, Union, Generator
5
5
 
6
+ from . import File
6
7
  from .vhdllibrary import VHDLLibrary
7
8
 
8
9
 
@@ -82,3 +83,8 @@ class Design(pm.Design):
82
83
  continue
83
84
  seen.append(fileid)
84
85
  yield file
86
+
87
+ def GetFile(self, path: Path) -> File:
88
+ for file in self.Files():
89
+ if file.Path.absolute() == path.absolute():
90
+ return file
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import pyEDAA.ProjectModel as pm
2
3
 
3
4
  from typing import Optional
@@ -5,6 +6,9 @@ from pathlib import Path
5
6
  from pyVHDLModel import VHDLVersion # type: ignore
6
7
 
7
8
 
9
+ logger = logging.getLogger(__name__)
10
+
11
+
8
12
  class VHDLLibrary(pm.VHDLLibrary):
9
13
 
10
14
  _path: Optional[Path]
@@ -18,9 +22,9 @@ class VHDLLibrary(pm.VHDLLibrary):
18
22
  ):
19
23
  super().__init__(name, project, design, vhdlVersion)
20
24
  if path is None:
21
- self._path = name
25
+ self.Path = Path(name)
22
26
  else:
23
- self._path = path
27
+ self.Path = path
24
28
 
25
29
  @property
26
30
  def Path(self) -> Optional[Path]:
@@ -28,4 +32,9 @@ class VHDLLibrary(pm.VHDLLibrary):
28
32
 
29
33
  @Path.setter
30
34
  def Path(self, path: Path) -> None:
31
- self._path = path
35
+ if isinstance(path, str):
36
+ filename, lineno, funcname, info = logger.findCaller(stacklevel=3)
37
+ logger.debug(f"The VHDL library path is a string in {filename}:{lineno}")
38
+ self._path = Path(path)
39
+ else:
40
+ self._path = path