isaac-toolkit 0.5.6__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 (275) hide show
  1. isaac_toolkit-0.5.6/.github/workflows/docs.yml +47 -0
  2. isaac_toolkit-0.5.6/.github/workflows/mlonmcu_examples.yml +90 -0
  3. isaac_toolkit-0.5.6/.github/workflows/release.yml +51 -0
  4. isaac_toolkit-0.5.6/.github/workflows/standalone_examples.yml +208 -0
  5. isaac_toolkit-0.5.6/.github/workflows/style.yml +52 -0
  6. isaac_toolkit-0.5.6/.github/workflows/test.yml +81 -0
  7. isaac_toolkit-0.5.6/.gitignore +167 -0
  8. isaac_toolkit-0.5.6/.gitmodules +3 -0
  9. isaac_toolkit-0.5.6/LICENSE +201 -0
  10. isaac_toolkit-0.5.6/PKG-INFO +40 -0
  11. isaac_toolkit-0.5.6/README.md +163 -0
  12. isaac_toolkit-0.5.6/docs/.gitignore +2 -0
  13. isaac_toolkit-0.5.6/docs/Makefile +20 -0
  14. isaac_toolkit-0.5.6/docs/_static/.gitkeep +0 -0
  15. isaac_toolkit-0.5.6/docs/api.rst +8 -0
  16. isaac_toolkit-0.5.6/docs/conf.py +40 -0
  17. isaac_toolkit-0.5.6/docs/index.rst +17 -0
  18. isaac_toolkit-0.5.6/docs/make.bat +35 -0
  19. isaac_toolkit-0.5.6/docs/readme.rst +2 -0
  20. isaac_toolkit-0.5.6/docs/requirements.txt +5 -0
  21. isaac_toolkit-0.5.6/examples/fixed/README.md +11 -0
  22. isaac_toolkit-0.5.6/examples/fixed/crc32/.gitignore +1 -0
  23. isaac_toolkit-0.5.6/examples/fixed/crc32/README.md +14 -0
  24. isaac_toolkit-0.5.6/examples/fixed/crc32/data.tar.xz +0 -0
  25. isaac_toolkit-0.5.6/examples/fixed/riscv_ovpsimplus/.gitignore +1 -0
  26. isaac_toolkit-0.5.6/examples/fixed/riscv_ovpsimplus/data.tar.xz +0 -0
  27. isaac_toolkit-0.5.6/examples/mlonmcu/.gitignore +5 -0
  28. isaac_toolkit-0.5.6/examples/mlonmcu/README.md +98 -0
  29. isaac_toolkit-0.5.6/examples/mlonmcu/SETUP.md +71 -0
  30. isaac_toolkit-0.5.6/examples/mlonmcu/mlonmcu_example.sh +86 -0
  31. isaac_toolkit-0.5.6/examples/mlonmcu/requirements.txt +4 -0
  32. isaac_toolkit-0.5.6/examples/standalone/.gitignore +14 -0
  33. isaac_toolkit-0.5.6/examples/standalone/README.md +36 -0
  34. isaac_toolkit-0.5.6/examples/standalone/SETUP.md +50 -0
  35. isaac_toolkit-0.5.6/examples/standalone/common.mk +481 -0
  36. isaac_toolkit-0.5.6/examples/standalone/coremark/Makefile +7 -0
  37. isaac_toolkit-0.5.6/examples/standalone/coremark/README.md +294 -0
  38. isaac_toolkit-0.5.6/examples/standalone/coremark/inc/core_portme.h +96 -0
  39. isaac_toolkit-0.5.6/examples/standalone/coremark/inc/coremark.h +184 -0
  40. isaac_toolkit-0.5.6/examples/standalone/coremark/operand_sources.py +62 -0
  41. isaac_toolkit-0.5.6/examples/standalone/coremark/src/core_list_join.c +595 -0
  42. isaac_toolkit-0.5.6/examples/standalone/coremark/src/core_main.c +450 -0
  43. isaac_toolkit-0.5.6/examples/standalone/coremark/src/core_matrix.c +359 -0
  44. isaac_toolkit-0.5.6/examples/standalone/coremark/src/core_portme.c +132 -0
  45. isaac_toolkit-0.5.6/examples/standalone/coremark/src/core_state.c +330 -0
  46. isaac_toolkit-0.5.6/examples/standalone/coremark/src/core_util.c +248 -0
  47. isaac_toolkit-0.5.6/examples/standalone/coremark/src/main.c +16 -0
  48. isaac_toolkit-0.5.6/examples/standalone/embench/Makefile +12 -0
  49. isaac_toolkit-0.5.6/examples/standalone/embench/README.md +46 -0
  50. isaac_toolkit-0.5.6/examples/standalone/embench/main.c +34 -0
  51. isaac_toolkit-0.5.6/examples/standalone/make_wrapper.sh +37 -0
  52. isaac_toolkit-0.5.6/examples/standalone/requirements.txt +2 -0
  53. isaac_toolkit-0.5.6/examples/standalone/scripts/download_helper.sh +63 -0
  54. isaac_toolkit-0.5.6/examples/standalone/scripts/gantt_stage_times.py +41 -0
  55. isaac_toolkit-0.5.6/examples/standalone/scripts/setup_etiss.sh +187 -0
  56. isaac_toolkit-0.5.6/examples/sw/matmul/matmult.c +22 -0
  57. isaac_toolkit-0.5.6/ipynb/TimeSummary.ipynb +924 -0
  58. isaac_toolkit-0.5.6/ipynb/TimeSummaryNew.ipynb +1315 -0
  59. isaac_toolkit-0.5.6/ipynb/out1.pdf +0 -0
  60. isaac_toolkit-0.5.6/ipynb/out1.png +0 -0
  61. isaac_toolkit-0.5.6/ipynb/requirements.txt +1 -0
  62. isaac_toolkit-0.5.6/isaac_toolkit/__init__.py +18 -0
  63. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/__init__.py +18 -0
  64. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/__init__.py +18 -0
  65. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/combination/__init__.py +18 -0
  66. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/identification/__init__.py +18 -0
  67. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/identification/maxmiso.py +259 -0
  68. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/identification/single_cut.py +18 -0
  69. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/identification/submaxmiso.py +18 -0
  70. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/selection/__init__.py +18 -0
  71. isaac_toolkit-0.5.6/isaac_toolkit/algorithm/ise/selection/mlip.py +18 -0
  72. isaac_toolkit-0.5.6/isaac_toolkit/analysis/__init__.py +18 -0
  73. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/__init__.py +18 -0
  74. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/histogram/__init__.py +18 -0
  75. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/histogram/instr.py +96 -0
  76. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/histogram/opcode.py +180 -0
  77. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/histogram/opcode_per_llvm_bb.py +127 -0
  78. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/histogram/pc.py +96 -0
  79. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/mem_trace/__init__.py +18 -0
  80. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/mem_trace/metrics.py +496 -0
  81. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/perf/__init__.py +18 -0
  82. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/perf/metrics.py +179 -0
  83. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/perf/rvv.py +255 -0
  84. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/profile/__init__.py +18 -0
  85. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/profile/profile.py +18 -0
  86. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/__init__.py +18 -0
  87. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/basic_blocks.py +375 -0
  88. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/instr_operands.py +305 -0
  89. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/map_llvm_bbs.py +191 -0
  90. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/map_llvm_bbs_new.py +152 -0
  91. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/normalize_trace.py +321 -0
  92. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/operand_sources.py +154 -0
  93. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/trace_bbs.py +830 -0
  94. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/track_used_functions.py +128 -0
  95. isaac_toolkit-0.5.6/isaac_toolkit/analysis/dynamic/trace/trunc_trace.py +183 -0
  96. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/__init__.py +18 -0
  97. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/dwarf.py +285 -0
  98. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/elf/mem_sections.py +98 -0
  99. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/elf/symbol_table.py +111 -0
  100. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/histogram/__init__.py +18 -0
  101. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/histogram/disass_instr.py +96 -0
  102. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/histogram/disass_opcode.py +175 -0
  103. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/linker_map.py +128 -0
  104. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/llvm_bbs.py +378 -0
  105. isaac_toolkit-0.5.6/isaac_toolkit/analysis/static/mem_footprint.py +121 -0
  106. isaac_toolkit-0.5.6/isaac_toolkit/arch/__init__.py +18 -0
  107. isaac_toolkit-0.5.6/isaac_toolkit/arch/riscv.py +60 -0
  108. isaac_toolkit-0.5.6/isaac_toolkit/backend/__init__.py +18 -0
  109. isaac_toolkit-0.5.6/isaac_toolkit/backend/isa/__init__.py +18 -0
  110. isaac_toolkit-0.5.6/isaac_toolkit/backend/isa/codesl2.py +18 -0
  111. isaac_toolkit-0.5.6/isaac_toolkit/backend/ise/__init__.py +18 -0
  112. isaac_toolkit-0.5.6/isaac_toolkit/backend/ise/synthesis.py +18 -0
  113. isaac_toolkit-0.5.6/isaac_toolkit/backend/memgraph/annotate_bb_weights.py +184 -0
  114. isaac_toolkit-0.5.6/isaac_toolkit/backend/pctrace.py +107 -0
  115. isaac_toolkit-0.5.6/isaac_toolkit/backend/perf/__init__.py +18 -0
  116. isaac_toolkit-0.5.6/isaac_toolkit/backend/perf/trace_analyzer/__init__.py +18 -0
  117. isaac_toolkit-0.5.6/isaac_toolkit/backend/perf/trace_analyzer/ranges.py +156 -0
  118. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/__init__.py +18 -0
  119. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/annotate.py +18 -0
  120. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/callgrind.py +546 -0
  121. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/callgrind.py.new +583 -0
  122. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/callgrind.py.old +579 -0
  123. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/callgrind_new.py +691 -0
  124. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/dot.py +18 -0
  125. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/lcov.py +264 -0
  126. isaac_toolkit-0.5.6/isaac_toolkit/backend/profile/text.py +18 -0
  127. isaac_toolkit-0.5.6/isaac_toolkit/eval/__init__.py +18 -0
  128. isaac_toolkit-0.5.6/isaac_toolkit/eval/hardware/__init__.py +18 -0
  129. isaac_toolkit-0.5.6/isaac_toolkit/eval/hardware/syn/__init__.py +18 -0
  130. isaac_toolkit-0.5.6/isaac_toolkit/eval/hardware/syn/asip/__init__.py +18 -0
  131. isaac_toolkit-0.5.6/isaac_toolkit/eval/hardware/syn/asip/synopsys.py +155 -0
  132. isaac_toolkit-0.5.6/isaac_toolkit/eval/hardware/syn/fpga/__init__.py +18 -0
  133. isaac_toolkit-0.5.6/isaac_toolkit/eval/hardware/syn/fpga/vivado.py +155 -0
  134. isaac_toolkit-0.5.6/isaac_toolkit/eval/ise/compare_bench.py +112 -0
  135. isaac_toolkit-0.5.6/isaac_toolkit/eval/ise/compare_sess.py +465 -0
  136. isaac_toolkit-0.5.6/isaac_toolkit/eval/ise/util.py +441 -0
  137. isaac_toolkit-0.5.6/isaac_toolkit/eval/mlonmcu/__init__.py +18 -0
  138. isaac_toolkit-0.5.6/isaac_toolkit/eval/mlonmcu/full.py +195 -0
  139. isaac_toolkit-0.5.6/isaac_toolkit/flow/__init__.py +18 -0
  140. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/__init__.py +18 -0
  141. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/__init__.py +18 -0
  142. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/analyze.py +105 -0
  143. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/load.py +110 -0
  144. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/pick.py +109 -0
  145. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/retargeting/iss.py +176 -0
  146. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/retargeting/iss_perf.py +149 -0
  147. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/retargeting/llvm.py +157 -0
  148. isaac_toolkit-0.5.6/isaac_toolkit/flow/demo/stage/visualize.py +69 -0
  149. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/full_flow.py +141 -0
  150. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/__init__.py +18 -0
  151. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/analyze.py +112 -0
  152. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/lcov.py +68 -0
  153. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/load.py +139 -0
  154. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/normalize.py +69 -0
  155. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/profile.py +72 -0
  156. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/report.py +114 -0
  157. isaac_toolkit-0.5.6/isaac_toolkit/flow/rvf/stage/visualize.py +72 -0
  158. isaac_toolkit-0.5.6/isaac_toolkit/frontend/__init__.py +18 -0
  159. isaac_toolkit-0.5.6/isaac_toolkit/frontend/cfg/__init__.py +18 -0
  160. isaac_toolkit-0.5.6/isaac_toolkit/frontend/cfg/yaml.py +74 -0
  161. isaac_toolkit-0.5.6/isaac_toolkit/frontend/compile_commands/__init__.py +18 -0
  162. isaac_toolkit-0.5.6/isaac_toolkit/frontend/compile_commands/json.py +88 -0
  163. isaac_toolkit-0.5.6/isaac_toolkit/frontend/disass/__init__.py +18 -0
  164. isaac_toolkit-0.5.6/isaac_toolkit/frontend/disass/objdump.py +117 -0
  165. isaac_toolkit-0.5.6/isaac_toolkit/frontend/elf/__init__.py +18 -0
  166. isaac_toolkit-0.5.6/isaac_toolkit/frontend/elf/riscv.py +73 -0
  167. isaac_toolkit-0.5.6/isaac_toolkit/frontend/ini/etiss_mem_layout.py +89 -0
  168. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/__init__.py +18 -0
  169. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/etiss.py +165 -0
  170. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/etiss_new.py +164 -0
  171. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/etiss_perf.py +164 -0
  172. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/helper.py +73 -0
  173. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/ovpsim.py +197 -0
  174. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/spike.py +249 -0
  175. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/tgc.py +317 -0
  176. isaac_toolkit-0.5.6/isaac_toolkit/frontend/instr_trace/utils.py +106 -0
  177. isaac_toolkit-0.5.6/isaac_toolkit/frontend/isa/__init__.py +18 -0
  178. isaac_toolkit-0.5.6/isaac_toolkit/frontend/isa/coredsl2.py +18 -0
  179. isaac_toolkit-0.5.6/isaac_toolkit/frontend/isa/m2isar.py +76 -0
  180. isaac_toolkit-0.5.6/isaac_toolkit/frontend/ise/__init__.py +18 -0
  181. isaac_toolkit-0.5.6/isaac_toolkit/frontend/ise/instrs.py +78 -0
  182. isaac_toolkit-0.5.6/isaac_toolkit/frontend/linker_map.py +77 -0
  183. isaac_toolkit-0.5.6/isaac_toolkit/frontend/mem_trace/__init__.py +18 -0
  184. isaac_toolkit-0.5.6/isaac_toolkit/frontend/mem_trace/etiss.py +122 -0
  185. isaac_toolkit-0.5.6/isaac_toolkit/frontend/memgraph/__init__.py +18 -0
  186. isaac_toolkit-0.5.6/isaac_toolkit/frontend/memgraph/llvm_ir_cdfg.py +18 -0
  187. isaac_toolkit-0.5.6/isaac_toolkit/frontend/memgraph/llvm_mir_cdfg.py +243 -0
  188. isaac_toolkit-0.5.6/isaac_toolkit/frontend/mlonmcu/__init__.py +18 -0
  189. isaac_toolkit-0.5.6/isaac_toolkit/frontend/mlonmcu/cmdline.py +74 -0
  190. isaac_toolkit-0.5.6/isaac_toolkit/frontend/mlonmcu/session_initializer.py +73 -0
  191. isaac_toolkit-0.5.6/isaac_toolkit/frontend/perf_trace/__init__.py +18 -0
  192. isaac_toolkit-0.5.6/isaac_toolkit/frontend/perf_trace/etiss_perf.py +97 -0
  193. isaac_toolkit-0.5.6/isaac_toolkit/frontend/source/__init__.py +18 -0
  194. isaac_toolkit-0.5.6/isaac_toolkit/frontend/source/c.py +70 -0
  195. isaac_toolkit-0.5.6/isaac_toolkit/frontend/source/cpp.py +31 -0
  196. isaac_toolkit-0.5.6/isaac_toolkit/frontend/timing_trace/__init__.py +18 -0
  197. isaac_toolkit-0.5.6/isaac_toolkit/frontend/timing_trace/etiss_perf.py +83 -0
  198. isaac_toolkit-0.5.6/isaac_toolkit/generate/__init__.py +18 -0
  199. isaac_toolkit-0.5.6/isaac_toolkit/generate/cdfg/__init__.py +18 -0
  200. isaac_toolkit-0.5.6/isaac_toolkit/generate/cdfg/memgraph.py +151 -0
  201. isaac_toolkit-0.5.6/isaac_toolkit/generate/hardware/__init__.py +18 -0
  202. isaac_toolkit-0.5.6/isaac_toolkit/generate/hardware/hls/__init__.py +18 -0
  203. isaac_toolkit-0.5.6/isaac_toolkit/generate/hardware/hls/nailgun.py +237 -0
  204. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/__init__.py +18 -0
  205. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/check_ise_potential.py +208 -0
  206. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/check_ise_potential_per_llvm_bb.py +155 -0
  207. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/choose_bbs.py +236 -0
  208. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/generate_cdsl.py +136 -0
  209. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/pool/__init__.py +18 -0
  210. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/pool/random.py +18 -0
  211. isaac_toolkit-0.5.6/isaac_toolkit/generate/ise/query_candidates_from_db.py +572 -0
  212. isaac_toolkit-0.5.6/isaac_toolkit/generate/iss/generate_etiss_core.py +612 -0
  213. isaac_toolkit-0.5.6/isaac_toolkit/logging.py +103 -0
  214. isaac_toolkit-0.5.6/isaac_toolkit/report/__init__.py +18 -0
  215. isaac_toolkit-0.5.6/isaac_toolkit/report/report_runtime.py +331 -0
  216. isaac_toolkit-0.5.6/isaac_toolkit/report/report_utils.py +111 -0
  217. isaac_toolkit-0.5.6/isaac_toolkit/report/sess_disk_usage.py +203 -0
  218. isaac_toolkit-0.5.6/isaac_toolkit/report/sess_mem_usage.py +171 -0
  219. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/fake_hls.py +680 -0
  220. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/iss/etiss.py +186 -0
  221. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/iss/etiss_perf.py +188 -0
  222. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/iss/spike.py +172 -0
  223. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/llvm/seal5.py +228 -0
  224. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/service/client.py +389 -0
  225. isaac_toolkit-0.5.6/isaac_toolkit/retargeting/service/client.py.orig +326 -0
  226. isaac_toolkit-0.5.6/isaac_toolkit/session/__init__.py +21 -0
  227. isaac_toolkit-0.5.6/isaac_toolkit/session/artifact.py +367 -0
  228. isaac_toolkit-0.5.6/isaac_toolkit/session/config.py +459 -0
  229. isaac_toolkit-0.5.6/isaac_toolkit/session/create.py +75 -0
  230. isaac_toolkit-0.5.6/isaac_toolkit/session/session.py +311 -0
  231. isaac_toolkit-0.5.6/isaac_toolkit/session/summary.py +73 -0
  232. isaac_toolkit-0.5.6/isaac_toolkit/utils/__init__.py +18 -0
  233. isaac_toolkit-0.5.6/isaac_toolkit/utils/agg_counts.py +52 -0
  234. isaac_toolkit-0.5.6/isaac_toolkit/utils/agg_util_scores.py +57 -0
  235. isaac_toolkit-0.5.6/isaac_toolkit/utils/analyze_compare.py +72 -0
  236. isaac_toolkit-0.5.6/isaac_toolkit/utils/analyze_compare_perf.py +77 -0
  237. isaac_toolkit-0.5.6/isaac_toolkit/utils/analyze_encoding.py +245 -0
  238. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_counts.py +72 -0
  239. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_enc_score.py +71 -0
  240. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_global_artifacts.py +57 -0
  241. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_hls_score.py +94 -0
  242. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_per_instr_metrics.py +108 -0
  243. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_score.py +127 -0
  244. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_seal5_score.py +67 -0
  245. isaac_toolkit-0.5.6/isaac_toolkit/utils/annotate_util_score.py +77 -0
  246. isaac_toolkit-0.5.6/isaac_toolkit/utils/assign_names.py +76 -0
  247. isaac_toolkit-0.5.6/isaac_toolkit/utils/benchmark_compression.py +104 -0
  248. isaac_toolkit-0.5.6/isaac_toolkit/utils/cli.py +18 -0
  249. isaac_toolkit-0.5.6/isaac_toolkit/utils/combine_pdfs.py +67 -0
  250. isaac_toolkit-0.5.6/isaac_toolkit/utils/compression.py +32 -0
  251. isaac_toolkit-0.5.6/isaac_toolkit/utils/filter_index.py +147 -0
  252. isaac_toolkit-0.5.6/isaac_toolkit/utils/graph_utils.py +228 -0
  253. isaac_toolkit-0.5.6/isaac_toolkit/utils/memgraph/purge_db.py +81 -0
  254. isaac_toolkit-0.5.6/isaac_toolkit/utils/names_helper.py +51 -0
  255. isaac_toolkit-0.5.6/isaac_toolkit/utils/nx_converter.py +46 -0
  256. isaac_toolkit-0.5.6/isaac_toolkit/utils/pickle_printer.py +104 -0
  257. isaac_toolkit-0.5.6/isaac_toolkit/utils/rank_uarchs.py +92 -0
  258. isaac_toolkit-0.5.6/isaac_toolkit/utils/seal5_score.py +80 -0
  259. isaac_toolkit-0.5.6/isaac_toolkit/utils/sort_index.py +57 -0
  260. isaac_toolkit-0.5.6/isaac_toolkit/utils/utils.py +18 -0
  261. isaac_toolkit-0.5.6/isaac_toolkit/version.py +3 -0
  262. isaac_toolkit-0.5.6/isaac_toolkit/visualize/pie/disass_counts.py +190 -0
  263. isaac_toolkit-0.5.6/isaac_toolkit/visualize/pie/mem_footprint.py +311 -0
  264. isaac_toolkit-0.5.6/isaac_toolkit/visualize/pie/runtime.py +319 -0
  265. isaac_toolkit-0.5.6/isaac_toolkit.egg-info/PKG-INFO +40 -0
  266. isaac_toolkit-0.5.6/isaac_toolkit.egg-info/SOURCES.txt +274 -0
  267. isaac_toolkit-0.5.6/isaac_toolkit.egg-info/dependency_links.txt +1 -0
  268. isaac_toolkit-0.5.6/isaac_toolkit.egg-info/requires.txt +37 -0
  269. isaac_toolkit-0.5.6/isaac_toolkit.egg-info/top_level.txt +1 -0
  270. isaac_toolkit-0.5.6/pyproject.toml +49 -0
  271. isaac_toolkit-0.5.6/requirements.txt +25 -0
  272. isaac_toolkit-0.5.6/requirements_dev.txt +9 -0
  273. isaac_toolkit-0.5.6/requirements_full.txt +4 -0
  274. isaac_toolkit-0.5.6/setup.cfg +24 -0
  275. isaac_toolkit-0.5.6/tests/unit-tests/session/test_artifact.py +48 -0
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Build Documentation
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: [v*]
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+ jobs:
11
+ docs:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ['3.10']
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Initialize Virtualenv
23
+ run: |
24
+ python -m pip install --upgrade pip virtualenv
25
+ python -m venv .venv
26
+ - name: Install package into virtualenv
27
+ run: |
28
+ source .venv/bin/activate
29
+ pip install -e ".[dev]"
30
+ pip install -e ".[memgraph]"
31
+ pip install -r docs/requirements.txt
32
+ - name: Build docs
33
+ run: |
34
+ source .venv/bin/activate
35
+ cd docs
36
+ make html
37
+ - name: Store docs as an artifact
38
+ uses: actions/upload-artifact@v4
39
+ with:
40
+ name: html-docs
41
+ path: docs/_build/html
42
+ - name: Deploy docs
43
+ uses: peaceiris/actions-gh-pages@v4
44
+ if: ${{ github.ref == 'refs/heads/main' }}
45
+ with:
46
+ github_token: ${{ secrets.GITHUB_TOKEN }}
47
+ publish_dir: ./docs/_build/html
@@ -0,0 +1,90 @@
1
+ ##
2
+ ## Copyright (c) 2024 TUM Department of Electrical and Computer Engineering.
3
+ ##
4
+ ## This file is part of ISAAC Toolkit.
5
+ ## See https://github.com/tum-ei-eda/isaac-toolkit.git for further info.
6
+ ##
7
+ ## Licensed under the Apache License, Version 2.0 (the "License");
8
+ ## you may not use this file except in compliance with the License.
9
+ ## You may obtain a copy of the License at
10
+ ##
11
+ ## http://www.apache.org/licenses/LICENSE-2.0
12
+ ##
13
+ ## Unless required by applicable law or agreed to in writing, software
14
+ ## distributed under the License is distributed on an "AS IS" BASIS,
15
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ ## See the License for the specific language governing permissions and
17
+ ## limitations under the License.
18
+ ##
19
+ name: MLonMCU Examples
20
+ on:
21
+ workflow_dispatch:
22
+
23
+ jobs:
24
+ benchmark:
25
+ runs-on: ubuntu-22.04
26
+ # runs-on: self-hosted
27
+ strategy:
28
+ matrix:
29
+ python-version: ["3.8"]
30
+ mlonmcu-ref: ["main"]
31
+ mlonmcu-template: ["default"]
32
+ prog: ["toycar"]
33
+ toolchain: ["gcc"]
34
+ simulator: ["etiss"]
35
+ backend: ["tvmaotplus"]
36
+ # full: ["1"]
37
+ env:
38
+ INSTALL_DIR: ${{ github.workspace }}/examples/standalone/install
39
+ VENV_DIR: ${{ github.workspace }}/venv
40
+ PYTHONPATH: ${{ github.workspace }}
41
+ MLONMCU_HOME: ${{ github.workspace }}/workspace
42
+ PROG: ${{ matrix.prog }}
43
+ SIMULATOR: ${{ matrix.simulator }}
44
+ TOOLCHAIN: ${{ matrix.toolchain }}
45
+ BACKEND: ${{ matrix.backend }}
46
+ # FULL: ${{ matrix.full }}
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ with:
50
+ submodules: recursive
51
+ - name: Set up Python ${{ matrix.python-version }}
52
+ uses: actions/setup-python@v5
53
+ with:
54
+ python-version: ${{ matrix.python-version }}
55
+ # TODO: caching
56
+ - name: Install APT packages
57
+ run: |
58
+ sudo apt -qq install -y build-essential git cmake libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev kcachegrind graphviz-dev device-tree-compiler
59
+ - name: Initialize Virtualenv
60
+ run: |
61
+ python -m pip install --upgrade pip
62
+ python -m venv $VENV_DIR
63
+ - name: Install dependencies
64
+ run: |
65
+ source $VENV_DIR/bin/activate
66
+ pip install -r requirements.txt
67
+ pip install git+https://github.com/tum-ei-eda/mlonmcu.git@${{ matrix.mlonmcu-ref }}
68
+ - name: Setup MLonMCU
69
+ run: |
70
+ source $VENV_DIR/bin/activate
71
+ mlonmcu init $MLONMCU_HOME -t ${{ matrix.mlonmcu-template}} --non-interactive --clone-models --allow-exists
72
+ mlonmcu setup -g
73
+ pip install -r $MLONMCU_HOME/requirements_addition.txt
74
+ mlonmcu setup -v --progress
75
+ - name: Run MLonMCU example
76
+ working-directory: examples/mlonmcu
77
+ run: |
78
+ source $VENV_DIR/bin/activate
79
+ export SESS=$(pwd)/sess
80
+ ./mlonmcu_example.sh $SESS $PROG $TOOLCHAIN $SIMULATOR $BACKEND
81
+ - name: Archive reports
82
+ uses: actions/upload-artifact@v4
83
+ with:
84
+ name: results-${{ matrix.mlonmcu-ref }}-${{ matrix.mlonmcu-template }}-${{ matrix.program }}-${{ matrix.toolchain }}-${{ matrix.simulator }}-${{ matrix.backend }}
85
+ path: |
86
+ examples/mlonmcu/sess/
87
+ examples/mlonmcu/*.pdf
88
+ examples/mlonmcu/*.out
89
+ !examples/mlonmcu/sess/elf
90
+ !examples/mlonmcu/sess/instr_trace/
@@ -0,0 +1,51 @@
1
+ ---
2
+ on:
3
+ push:
4
+ # Sequence of patterns matched against refs/tags
5
+ tags:
6
+ - \d+.\d+.\d+ # Push events for 0.1.0, 20.15.10 but not 0.1.0dev0
7
+ name: Create Release
8
+ jobs:
9
+ build:
10
+ name: Create Release
11
+ runs-on: ubuntu-latest
12
+ if: ${{ github.repository == 'tum-ei-eda/isaac-toolkit' }}
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+ # - name: Generate changelog
17
+ # id: changelog
18
+ # uses: metcalfc/changelog-generator@v4.3.1
19
+ # with:
20
+ # myToken: ${{ secrets.GITHUB_TOKEN }}
21
+ - name: Create Release
22
+ id: create_release
23
+ uses: actions/create-release@v1
24
+ env:
25
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26
+ with:
27
+ tag_name: ${{ github.ref }}
28
+ release_name: Release ${{ github.ref }}
29
+ # body: |
30
+ # Changes in this Release:
31
+ # ${{ steps.changelog.outputs.changelog }}
32
+ draft: true
33
+ prerelease: false
34
+ publish:
35
+ name: Publish to PyPI
36
+ runs-on: ubuntu-latest
37
+ if: ${{ github.repository == 'tum-ei-eda/isaac-toolkit' }}
38
+ steps:
39
+ - name: Checkout code
40
+ uses: actions/checkout@v4
41
+ - name: Install deps
42
+ run: |
43
+ sudo apt install libgraphviz-dev
44
+ - name: Build package
45
+ run: |
46
+ python -m pip install -e ".[dev]"
47
+ python -m build
48
+ - name: Publish to PyPI
49
+ uses: pypa/gh-action-pypi-publish@release/v1
50
+ with:
51
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,208 @@
1
+ ##
2
+ ## Copyright (c) 2024 TUM Department of Electrical and Computer Engineering.
3
+ ##
4
+ ## This file is part of ISAAC Toolkit.
5
+ ## See https://github.com/tum-ei-eda/isaac-toolkit.git for further info.
6
+ ##
7
+ ## Licensed under the Apache License, Version 2.0 (the "License");
8
+ ## you may not use this file except in compliance with the License.
9
+ ## You may obtain a copy of the License at
10
+ ##
11
+ ## http://www.apache.org/licenses/LICENSE-2.0
12
+ ##
13
+ ## Unless required by applicable law or agreed to in writing, software
14
+ ## distributed under the License is distributed on an "AS IS" BASIS,
15
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ ## See the License for the specific language governing permissions and
17
+ ## limitations under the License.
18
+ ##
19
+ name: Standalone Examples
20
+ on:
21
+ workflow_dispatch:
22
+
23
+ jobs:
24
+ benchmark:
25
+ runs-on: ubuntu-22.04
26
+ # runs-on: self-hosted
27
+ strategy:
28
+ matrix:
29
+ python-version: ["3.8"]
30
+ toolchain: ["gcc"]
31
+ # simulator: ["etiss", "spike"]
32
+ simulator: ["etiss"]
33
+ full: ["0", "1"]
34
+ env:
35
+ INSTALL_DIR: ${{ github.workspace }}/examples/standalone/install
36
+ VENV_DIR: ${{ github.workspace }}/venv
37
+ PYTHONPATH: ${{ github.workspace }}
38
+ RISCV_NAME: "riscv32-unknown-elf"
39
+ RISCV_ARCH: "rv32im_zicsr_zifencei"
40
+ RISCV_ABI: "ilp32"
41
+ SIMULATOR: ${{ matrix.simulator }}
42
+ TOOLCHAIN: ${{ matrix.toolchain }}
43
+ FULL: ${{ matrix.full }}
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+ with:
47
+ submodules: recursive
48
+ - name: Set up Python ${{ matrix.python-version }}
49
+ uses: actions/setup-python@v5
50
+ with:
51
+ python-version: ${{ matrix.python-version }}
52
+ # TODO: caching
53
+ - name: Install APT packages
54
+ run: |
55
+ sudo apt -qq install -y build-essential git cmake libboost-system-dev libboost-filesystem-dev libboost-program-options-dev kcachegrind graphviz-dev
56
+ - name: Initialize Virtualenv
57
+ run: |
58
+ python -m pip install --upgrade pip
59
+ python -m venv $VENV_DIR
60
+ - name: Install dependencies
61
+ run: |
62
+ source $VENV_DIR/bin/activate
63
+ pip install -r requirements.txt
64
+ - name: Setup dependencies
65
+ working-directory: examples/standalone
66
+ run: |
67
+ ./scripts/download_helper.sh $INSTALL_DIR/rv32im_ilp32/ gnu 2024.09.03 rv32im_zicsr_zifencei_ilp32
68
+
69
+ if [[ "$TOOLCHAIN" == "llvm" ]]
70
+ then
71
+ ./scripts/download_helper.sh $INSTALL_DIR/llvm/ llvm 19.1.1
72
+ fi
73
+
74
+ if [[ "$SIMULATOR" == "etiss" ]]
75
+ then
76
+ ./scripts/setup_etiss.sh $INSTALL_DIR/etiss
77
+ fi
78
+ - name: Run Coremark example
79
+ working-directory: examples/standalone/coremark
80
+ run: |
81
+ source $VENV_DIR/bin/activate
82
+
83
+ export SESS=$(pwd)/sess
84
+ export BUILD_DIR=$(pwd)/build
85
+
86
+ export RISCV_PREFIX=$INSTALL_DIR/rv32im_ilp32
87
+ export SYSROOT=$RISCV_PREFIX/$RISCV_NAME
88
+ export CC=$RISCV_PREFIX/bin/$RISCV_NAME-gcc
89
+ export OBJDUMP=$RISCV_PREFIX/bin/$RISCV_NAME-objdump
90
+
91
+ if [[ "$SIMULATOR" == "etiss" ]]
92
+ then
93
+ export ETISS=$INSTALL_DIR/etiss/install/bin/run_helper.sh
94
+ export ETISS_INI=$INSTALL_DIR/etiss/install/custom.ini
95
+ export ETISS_CRT=$INSTALL_DIR/etiss/etiss_riscv_examples/riscv_crt0
96
+ export ETISS_LDSCRIPT=$INSTALL_DIR/etiss/install/etiss.ld
97
+ elif [[ "$SIMULATOR" == "spike" ]]
98
+ then
99
+ export SIMULATOR=spike
100
+ export SPIKE=$INSTALL_DIR/spike/spike
101
+ export PK=$INSTALL_DIR/spike/pk_rv32gc
102
+ else
103
+ echo "Unsupported SIMULATOR=$SIMULATOR"
104
+ exit 1
105
+ fi
106
+
107
+ python3 -m isaac_toolkit.session.create --session $SESS
108
+
109
+ mkdir -p $BUILD_DIR
110
+ if [[ "$SIMULATOR" == "etiss" ]]
111
+ then
112
+ $CC -march=$RISCV_ARCH -mabi=$RISCV_ABI src/*.c $ETISS_CRT/crt0.S $ETISS_CRT/trap_handler.c -T $ETISS_LDSCRIPT -nostdlib -lc -lgcc -lsemihost -o $BUILD_DIR/coremark.elf -Iinc/ -DITERATIONS=100 -DFLAGS_STR='"testing"' -DPERFORMANCE_RUN -DHAS_STDIO -g -O3 -Xlinker -Map=build/coremark.map
113
+ elif [[ "$SIMULATOR" == "spike" ]]
114
+ then
115
+ $CC -march=$RISCV_ARCH -mabi=$RISCV_ABI src/*.c -o $BUILD_DIR/coremark.elf -Iinc/ -DITERATIONS=100 -DFLAGS_STR='"testing"' -DPERFORMANCE_RUN -DHAS_STDIO -g -O3 -Xlinker -Map=build/coremark.map
116
+ else
117
+ echo "Unsupported SIMULATOR=$SIMULATOR"
118
+ exit 1
119
+ fi
120
+ if [[ "$FULL" == "1" ]]
121
+ then
122
+ $OBJDUMP -d $BUILD_DIR/coremark.elf > $BUILD_DIR/coremark.dump
123
+ fi
124
+
125
+ python3 -m isaac_toolkit.frontend.elf.riscv --session $SESS $BUILD_DIR/coremark.elf
126
+
127
+ if [[ "$FULL" == "1" ]]
128
+ then
129
+ python3 -m isaac_toolkit.frontend.linker_map --session $SESS $BUILD_DIR/coremark.map
130
+ python3 -m isaac_toolkit.frontend.disass.objdump --session $SESS $BUILD_DIR/coremark.dump
131
+ fi
132
+
133
+ python3 -m isaac_toolkit.analysis.static.dwarf --session $SESS
134
+ python3 -m isaac_toolkit.analysis.static.mem_footprint --session $SESS
135
+
136
+ if [[ "$FULL" == "1" ]]
137
+ then
138
+ python3 -m isaac_toolkit.analysis.static.linker_map --session $SESS
139
+ python3 -m isaac_toolkit.analysis.static.histogram.disass_instr --session $SESS
140
+ python3 -m isaac_toolkit.analysis.static.histogram.disass_opcode --session $SESS
141
+ fi
142
+
143
+ python3 -m isaac_toolkit.visualize.pie.mem_footprint --session $SESS --legend
144
+
145
+ if [[ "$FULL" == "1" ]]
146
+ then
147
+ python3 -m isaac_toolkit.visualize.pie.disass_counts --session $SESS --legend
148
+ fi
149
+
150
+ if [[ "$SIMULATOR" == "etiss" ]]
151
+ then
152
+ $ETISS build/coremark.elf -i$ETISS_INI -pPrintInstruction | grep "^0x00000000" > etiss_instrs.log
153
+ elif [[ "$SIMULATOR" == "spike" ]]
154
+ then
155
+ $SPIKE --isa=${ARCH}_zicntr -l --log=spike_instrs.log $PK $BUILD_DIR/coremark.elf -s
156
+ else
157
+ echo "Unsupported SIMULATOR=$SIMULATOR"
158
+ exit 1
159
+ fi
160
+
161
+ # if [[ "$FULL" == "1" && "$SIMULATOR" == "etiss" ]]
162
+ if [[ "$FULL" == "1" && "$SIMULATOR" == "etiss" && "1" == "0" ]] # disabled due to RAM issues
163
+ then
164
+ python3 -m isaac_toolkit.frontend.instr_trace.${SIMULATOR} ${SIMULATOR}_instrs.log --session $SESS --operands
165
+ else
166
+ python3 -m isaac_toolkit.frontend.instr_trace.${SIMULATOR} ${SIMULATOR}_instrs.log --session $SESS
167
+ fi
168
+
169
+ python3 -m isaac_toolkit.analysis.dynamic.histogram.opcode --session $SESS
170
+ python3 -m isaac_toolkit.analysis.dynamic.histogram.instr --session $SESS
171
+ python3 -m isaac_toolkit.analysis.dynamic.trace.basic_blocks --session $SESS
172
+
173
+ if [[ "$FULL" == "1" ]]
174
+ then
175
+ python3 -m isaac_toolkit.analysis.dynamic.trace.track_used_functions --session $SESS
176
+ # if [[ "$SIMULATOR" == "etiss" ]]
177
+ if [[ "$SIMULATOR" == "etiss" && "1" == "0" ]] # disabled due to RAM issues
178
+ then
179
+ python3 -m isaac_toolkit.analysis.dynamic.trace.instr_operands --session $SESS --imm-only
180
+ fi
181
+ fi
182
+
183
+ python3 -m isaac_toolkit.visualize.pie.runtime --session $SESS --legend
184
+
185
+ if [[ "$FULL" == "1" ]]
186
+ then
187
+ python3 -m isaac_toolkit.visualize.pie.mem_footprint --session $SESS --legend --force
188
+ fi
189
+
190
+ python3 -m isaac_toolkit.backend.profile.callgrind --session $SESS --dump-pos --output callgrind_pos.out
191
+ python3 -m isaac_toolkit.backend.profile.callgrind --session $SESS --dump-pc --output callgrind_pc.out
192
+
193
+ # Callgraph
194
+ gprof2dot --format=callgrind --output=callgraph.dot callgrind_pos.out -n 0.1 -e 0.1 --color-nodes-by-selftime
195
+ dot -Tpdf callgraph.dot > callgraph.pdf
196
+
197
+ # Annotate source code (ASCII)
198
+ callgrind_annotate callgrind_pos.out src/*.c
199
+ - name: Archive reports
200
+ uses: actions/upload-artifact@v4
201
+ with:
202
+ name: results-${{ matrix.toolchain }}-${{ matrix.simulator }}-${{ matrix.full }}
203
+ path: |
204
+ examples/standalone/coremark/sess/
205
+ examples/standalone/coremark/*.pdf
206
+ examples/standalone/coremark/*.out
207
+ !examples/standalone/coremark/sess/elf
208
+ !examples/standalone/coremark/sess/instr_trace/
@@ -0,0 +1,52 @@
1
+ name: Lint
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ run-linters:
7
+ name: Run linters
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Check out Git repository
12
+ uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.10"
18
+
19
+ - name: Install Python dependencies
20
+ run: pip install black flake8
21
+
22
+ - name: Run linters
23
+ uses: wearerequired/lint-action@v2
24
+ with:
25
+ black: true
26
+ flake8: true
27
+
28
+ check-license:
29
+ name: Check for License headers
30
+ runs-on: ubuntu-latest
31
+
32
+ steps:
33
+ - name: Check out Git repository
34
+ uses: actions/checkout@v4
35
+
36
+ - name: Install Python dependencies
37
+ run: pip install licenseheaders
38
+
39
+ - name: Download template file
40
+ run: wget https://raw.githubusercontent.com/johann-petrak/licenseheaders/master/templates/apache-2.tmpl
41
+
42
+ - name: Run check
43
+ run: |
44
+ licenseheaders -t apache-2.tmpl -y "${YEARS}" -o "${OWNER}" -n "${PROJECT}" -u "${URL}" -d isaac_toolkit/ -E "${EXTENSIONS}"
45
+ licenseheaders -t apache-2.tmpl -y "${YEARS}" -o "${OWNER}" -n "${PROJECT}" -u "${URL}" -d tests/ -E "${EXTENSIONS}"
46
+ test -z "$(git status --untracked-files=no --porcelain)" || (echo "Please check your license headers!" ; git status --untracked-files=no --porcelain ; false) && echo "License check was successful."
47
+ env:
48
+ OWNER: "TUM Department of Electrical and Computer Engineering"
49
+ PROJECT: "ISAAC Toolkit"
50
+ YEARS: "2025"
51
+ URL: "https://github.com/tum-ei-eda/isaac-toolkit.git"
52
+ EXTENSIONS: "py"
@@ -0,0 +1,81 @@
1
+ ##
2
+ ## Copyright (c) 2024 TUM Department of Electrical and Computer Engineering.
3
+ ##
4
+ ## This file is part of ISAAC Toolkit.
5
+ ## See https://github.com/tum-ei-eda/isaac-toolkit.git for further info.
6
+ ##
7
+ ## Licensed under the Apache License, Version 2.0 (the "License");
8
+ ## you may not use this file except in compliance with the License.
9
+ ## You may obtain a copy of the License at
10
+ ##
11
+ ## http://www.apache.org/licenses/LICENSE-2.0
12
+ ##
13
+ ## Unless required by applicable law or agreed to in writing, software
14
+ ## distributed under the License is distributed on an "AS IS" BASIS,
15
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ ## See the License for the specific language governing permissions and
17
+ ## limitations under the License.
18
+ ##
19
+ name: Tests
20
+
21
+ on: [push, pull_request]
22
+
23
+ jobs:
24
+ unit-test:
25
+ runs-on: ubuntu-22.04
26
+ strategy:
27
+ matrix:
28
+ python-version: ["3.10"]
29
+ env:
30
+ VENV_DIR: ${{ github.workspace }}/venv
31
+ PYTHONPATH: ${{ github.workspace }}
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ with:
35
+ submodules: recursive
36
+ - name: Install APT packages
37
+ run: |
38
+ sudo apt -qq install -y graphviz-dev
39
+ - name: Set up Python ${{ matrix.python-version }}
40
+ uses: actions/setup-python@v5
41
+ with:
42
+ python-version: ${{ matrix.python-version }}
43
+ - name: Initialize Virtualenv
44
+ run: |
45
+ python -m pip install --upgrade pip
46
+ python -m venv $VENV_DIR
47
+ - name: Install dependencies
48
+ run: |
49
+ source $VENV_DIR/bin/activate
50
+ pip install -r requirements_dev.txt
51
+ - name: Run Pytest (via coverage)
52
+ run: |
53
+ source $VENV_DIR/bin/activate
54
+
55
+ # Without coverage:
56
+ # python3 -m pytest tests/ -rs -s
57
+
58
+ # With coverage:
59
+ coverage run --source isaac_toolkit -m pytest tests/
60
+ coverage report -m
61
+ coverage html
62
+ - name: Archive code coverage html report
63
+ uses: actions/upload-artifact@v4
64
+ with:
65
+ name: code-coverage-report
66
+ path: htmlcov
67
+ - name: Get coverage percentage
68
+ id: report
69
+ run: |
70
+ source $VENV_DIR/bin/activate
71
+ echo "name=percent::$(coverage report | awk '$1 == \"TOTAL\" {print $NF+0 \"%\"}')" >> $GITHUB_OUTPUT
72
+ - name: Test coverage Text
73
+ run: echo "|${{ steps.report.outputs.percent }}|"
74
+ - name: Create coverage badge
75
+ uses: RubbaBoy/BYOB@v1.2.1
76
+ with:
77
+ NAME: coverage
78
+ LABEL: 'Coverage'
79
+ STATUS: "${{ steps.report.outputs.percent }}"
80
+ COLOR: blue
81
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,167 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ # ISAAC specifc
165
+ *.elf
166
+ sess*/
167
+ !session/