siliconcompiler 0.32.3__py3-none-any.whl → 0.33.1__py3-none-any.whl

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 (280) hide show
  1. siliconcompiler/__init__.py +19 -2
  2. siliconcompiler/_common.py +5 -0
  3. siliconcompiler/_metadata.py +1 -1
  4. siliconcompiler/apps/sc.py +2 -2
  5. siliconcompiler/apps/sc_install.py +10 -3
  6. siliconcompiler/apps/sc_issue.py +1 -1
  7. siliconcompiler/apps/sc_remote.py +10 -5
  8. siliconcompiler/apps/sc_show.py +2 -2
  9. siliconcompiler/apps/utils/replay.py +5 -3
  10. siliconcompiler/asic.py +120 -0
  11. siliconcompiler/checklist.py +150 -0
  12. siliconcompiler/core.py +299 -299
  13. siliconcompiler/flowgraph.py +803 -515
  14. siliconcompiler/fpga.py +84 -0
  15. siliconcompiler/metric.py +479 -0
  16. siliconcompiler/optimizer/vizier.py +2 -3
  17. siliconcompiler/package/__init__.py +29 -6
  18. siliconcompiler/pdk.py +415 -0
  19. siliconcompiler/record.py +453 -0
  20. siliconcompiler/remote/client.py +15 -5
  21. siliconcompiler/remote/schema.py +116 -112
  22. siliconcompiler/remote/server.py +9 -6
  23. siliconcompiler/report/dashboard/cli/__init__.py +14 -721
  24. siliconcompiler/report/dashboard/cli/board.py +899 -0
  25. siliconcompiler/report/dashboard/web/__init__.py +10 -10
  26. siliconcompiler/report/dashboard/web/components/__init__.py +5 -4
  27. siliconcompiler/report/dashboard/web/components/flowgraph.py +3 -3
  28. siliconcompiler/report/dashboard/web/components/graph.py +6 -3
  29. siliconcompiler/report/dashboard/web/state.py +1 -1
  30. siliconcompiler/report/dashboard/web/utils/__init__.py +4 -3
  31. siliconcompiler/report/html_report.py +2 -3
  32. siliconcompiler/report/report.py +22 -11
  33. siliconcompiler/report/summary_image.py +1 -1
  34. siliconcompiler/report/summary_table.py +3 -3
  35. siliconcompiler/report/utils.py +21 -14
  36. siliconcompiler/scheduler/__init__.py +234 -1206
  37. siliconcompiler/scheduler/run_node.py +2 -1
  38. siliconcompiler/scheduler/send_messages.py +11 -5
  39. siliconcompiler/scheduler/slurm.py +11 -44
  40. siliconcompiler/scheduler/taskscheduler.py +320 -0
  41. siliconcompiler/schema/__init__.py +19 -2
  42. siliconcompiler/schema/baseschema.py +493 -0
  43. siliconcompiler/schema/cmdlineschema.py +250 -0
  44. siliconcompiler/{sphinx_ext → schema/docs}/__init__.py +3 -1
  45. siliconcompiler/{sphinx_ext → schema/docs}/dynamicgen.py +63 -81
  46. siliconcompiler/{sphinx_ext → schema/docs}/schemagen.py +73 -85
  47. siliconcompiler/{sphinx_ext → schema/docs}/utils.py +12 -13
  48. siliconcompiler/schema/editableschema.py +136 -0
  49. siliconcompiler/schema/journalingschema.py +238 -0
  50. siliconcompiler/schema/namedschema.py +41 -0
  51. siliconcompiler/schema/packageschema.py +101 -0
  52. siliconcompiler/schema/parameter.py +791 -0
  53. siliconcompiler/schema/parametertype.py +323 -0
  54. siliconcompiler/schema/parametervalue.py +736 -0
  55. siliconcompiler/schema/safeschema.py +37 -0
  56. siliconcompiler/schema/schema_cfg.py +109 -1789
  57. siliconcompiler/schema/utils.py +5 -68
  58. siliconcompiler/schema_obj.py +119 -0
  59. siliconcompiler/tool.py +1416 -0
  60. siliconcompiler/tools/_common/__init__.py +6 -10
  61. siliconcompiler/tools/_common/asic.py +5 -5
  62. siliconcompiler/tools/_common/sdc/sc_constraints.sdc +1 -1
  63. siliconcompiler/tools/bluespec/convert.py +9 -8
  64. siliconcompiler/tools/builtin/_common.py +9 -2
  65. siliconcompiler/tools/builtin/concatenate.py +7 -3
  66. siliconcompiler/tools/builtin/minimum.py +7 -2
  67. siliconcompiler/tools/builtin/mux.py +8 -2
  68. siliconcompiler/tools/builtin/nop.py +7 -2
  69. siliconcompiler/tools/builtin/verify.py +11 -5
  70. siliconcompiler/tools/chisel/convert.py +10 -10
  71. siliconcompiler/tools/genfasm/bitstream.py +3 -3
  72. siliconcompiler/tools/ghdl/convert.py +1 -1
  73. siliconcompiler/tools/icarus/compile.py +4 -4
  74. siliconcompiler/tools/icepack/bitstream.py +6 -1
  75. siliconcompiler/tools/klayout/convert_drc_db.py +5 -0
  76. siliconcompiler/tools/klayout/drc.py +2 -2
  77. siliconcompiler/tools/klayout/klayout_export.py +0 -1
  78. siliconcompiler/tools/klayout/klayout_show.py +6 -6
  79. siliconcompiler/tools/klayout/klayout_utils.py +15 -22
  80. siliconcompiler/tools/netgen/count_lvs.py +2 -2
  81. siliconcompiler/tools/netgen/lvs.py +1 -1
  82. siliconcompiler/tools/nextpnr/apr.py +6 -1
  83. siliconcompiler/tools/nextpnr/nextpnr.py +4 -4
  84. siliconcompiler/tools/openroad/_apr.py +15 -2
  85. siliconcompiler/tools/openroad/rdlroute.py +3 -3
  86. siliconcompiler/tools/openroad/scripts/apr/postamble.tcl +1 -1
  87. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +5 -5
  88. siliconcompiler/tools/openroad/scripts/apr/sc_antenna_repair.tcl +2 -2
  89. siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +2 -2
  90. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +2 -2
  91. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +2 -2
  92. siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +2 -2
  93. siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +2 -2
  94. siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +2 -2
  95. siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +2 -2
  96. siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +2 -2
  97. siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +3 -9
  98. siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +3 -3
  99. siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +2 -2
  100. siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +2 -2
  101. siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +2 -2
  102. siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +2 -2
  103. siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +2 -2
  104. siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +2 -2
  105. siliconcompiler/tools/openroad/scripts/common/procs.tcl +75 -1
  106. siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +1 -7
  107. siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +2 -2
  108. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -3
  109. siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +1 -1
  110. siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +3 -3
  111. siliconcompiler/tools/openroad/scripts/sc_show.tcl +6 -6
  112. siliconcompiler/tools/opensta/scripts/sc_timing.tcl +10 -0
  113. siliconcompiler/tools/opensta/timing.py +11 -0
  114. siliconcompiler/tools/slang/__init__.py +13 -13
  115. siliconcompiler/tools/slang/elaborate.py +6 -6
  116. siliconcompiler/tools/slang/lint.py +1 -3
  117. siliconcompiler/tools/surelog/parse.py +4 -4
  118. siliconcompiler/tools/sv2v/convert.py +20 -3
  119. siliconcompiler/tools/verilator/compile.py +2 -2
  120. siliconcompiler/tools/verilator/verilator.py +3 -3
  121. siliconcompiler/tools/vpr/_xml_constraint.py +8 -8
  122. siliconcompiler/tools/vpr/place.py +1 -1
  123. siliconcompiler/tools/vpr/route.py +4 -4
  124. siliconcompiler/tools/vpr/screenshot.py +1 -1
  125. siliconcompiler/tools/vpr/show.py +5 -5
  126. siliconcompiler/tools/vpr/vpr.py +24 -24
  127. siliconcompiler/tools/xdm/convert.py +2 -2
  128. siliconcompiler/tools/xyce/simulate.py +1 -1
  129. siliconcompiler/tools/yosys/prepareLib.py +2 -2
  130. siliconcompiler/tools/yosys/sc_synth_asic.tcl +111 -63
  131. siliconcompiler/tools/yosys/screenshot.py +1 -1
  132. siliconcompiler/tools/yosys/syn_asic.py +7 -7
  133. siliconcompiler/toolscripts/_tools.json +12 -10
  134. siliconcompiler/toolscripts/rhel8/install-chisel.sh +9 -2
  135. siliconcompiler/toolscripts/rhel8/install-icarus.sh +10 -3
  136. siliconcompiler/toolscripts/rhel8/install-klayout.sh +8 -1
  137. siliconcompiler/toolscripts/rhel8/install-magic.sh +9 -2
  138. siliconcompiler/toolscripts/rhel8/install-montage.sh +1 -1
  139. siliconcompiler/toolscripts/rhel8/install-netgen.sh +9 -2
  140. siliconcompiler/toolscripts/rhel8/install-slang.sh +11 -4
  141. siliconcompiler/toolscripts/rhel8/install-surelog.sh +9 -2
  142. siliconcompiler/toolscripts/rhel8/install-sv2v.sh +11 -4
  143. siliconcompiler/toolscripts/rhel8/install-verible.sh +11 -3
  144. siliconcompiler/toolscripts/rhel8/install-verilator.sh +10 -3
  145. siliconcompiler/toolscripts/rhel8/install-xyce.sh +15 -10
  146. siliconcompiler/toolscripts/rhel9/install-chisel.sh +9 -2
  147. siliconcompiler/toolscripts/rhel9/install-ghdl.sh +9 -2
  148. siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +10 -3
  149. siliconcompiler/toolscripts/rhel9/install-icarus.sh +10 -3
  150. siliconcompiler/toolscripts/rhel9/install-klayout.sh +8 -1
  151. siliconcompiler/toolscripts/rhel9/install-magic.sh +9 -2
  152. siliconcompiler/toolscripts/rhel9/install-montage.sh +1 -1
  153. siliconcompiler/toolscripts/rhel9/install-netgen.sh +9 -2
  154. siliconcompiler/toolscripts/rhel9/install-openroad.sh +16 -3
  155. siliconcompiler/toolscripts/rhel9/install-opensta.sh +17 -5
  156. siliconcompiler/toolscripts/rhel9/install-slang.sh +11 -4
  157. siliconcompiler/toolscripts/rhel9/install-surelog.sh +9 -2
  158. siliconcompiler/toolscripts/rhel9/install-sv2v.sh +11 -4
  159. siliconcompiler/toolscripts/rhel9/install-verible.sh +11 -3
  160. siliconcompiler/toolscripts/rhel9/install-verilator.sh +10 -3
  161. siliconcompiler/toolscripts/rhel9/install-vpr.sh +9 -2
  162. siliconcompiler/toolscripts/rhel9/install-xdm.sh +10 -2
  163. siliconcompiler/toolscripts/rhel9/install-xyce.sh +15 -10
  164. siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +9 -2
  165. siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +10 -3
  166. siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +10 -2
  167. siliconcompiler/toolscripts/rhel9/install-yosys.sh +9 -2
  168. siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +10 -2
  169. siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +10 -3
  170. siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +9 -2
  171. siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +9 -2
  172. siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +9 -2
  173. siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +9 -2
  174. siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +9 -2
  175. siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +8 -1
  176. siliconcompiler/toolscripts/ubuntu20/install-magic.sh +9 -2
  177. siliconcompiler/toolscripts/ubuntu20/install-montage.sh +1 -1
  178. siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +9 -2
  179. siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +9 -2
  180. siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +16 -3
  181. siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +16 -5
  182. siliconcompiler/toolscripts/ubuntu20/install-slang.sh +11 -4
  183. siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +9 -2
  184. siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +10 -2
  185. siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +11 -4
  186. siliconcompiler/toolscripts/ubuntu20/install-verible.sh +11 -3
  187. siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +9 -2
  188. siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +10 -2
  189. siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +13 -8
  190. siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +9 -2
  191. siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +9 -2
  192. siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +10 -2
  193. siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +10 -3
  194. siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +9 -2
  195. siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +9 -2
  196. siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +9 -2
  197. siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +9 -2
  198. siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +9 -2
  199. siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +8 -1
  200. siliconcompiler/toolscripts/ubuntu22/install-magic.sh +9 -2
  201. siliconcompiler/toolscripts/ubuntu22/install-montage.sh +1 -1
  202. siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +9 -2
  203. siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +9 -2
  204. siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +16 -3
  205. siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +17 -5
  206. siliconcompiler/toolscripts/ubuntu22/install-slang.sh +11 -4
  207. siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +9 -2
  208. siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +10 -2
  209. siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +11 -4
  210. siliconcompiler/toolscripts/ubuntu22/install-verible.sh +11 -3
  211. siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +9 -2
  212. siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +9 -4
  213. siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +10 -2
  214. siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +13 -8
  215. siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +9 -2
  216. siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +10 -3
  217. siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +10 -2
  218. siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +9 -2
  219. siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +12 -4
  220. siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +10 -3
  221. siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +9 -2
  222. siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +9 -2
  223. siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +9 -2
  224. siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +9 -2
  225. siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +9 -2
  226. siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +8 -1
  227. siliconcompiler/toolscripts/ubuntu24/install-magic.sh +9 -2
  228. siliconcompiler/toolscripts/ubuntu24/install-montage.sh +1 -1
  229. siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +9 -2
  230. siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +9 -2
  231. siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +16 -3
  232. siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +17 -5
  233. siliconcompiler/toolscripts/ubuntu24/install-slang.sh +11 -4
  234. siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +9 -2
  235. siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +10 -2
  236. siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +11 -4
  237. siliconcompiler/toolscripts/ubuntu24/install-verible.sh +11 -3
  238. siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +9 -2
  239. siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +9 -4
  240. siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +10 -2
  241. siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +13 -8
  242. siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +9 -2
  243. siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +10 -3
  244. siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +10 -2
  245. siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +9 -2
  246. siliconcompiler/utils/__init__.py +19 -112
  247. siliconcompiler/utils/flowgraph.py +244 -0
  248. siliconcompiler/{issue.py → utils/issue.py} +18 -25
  249. siliconcompiler/utils/logging.py +3 -4
  250. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/METADATA +9 -8
  251. siliconcompiler-0.33.1.dist-info/RECORD +488 -0
  252. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/WHEEL +1 -1
  253. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/entry_points.txt +8 -8
  254. siliconcompiler/schema/schema_obj.py +0 -1936
  255. siliconcompiler/toolscripts/ubuntu20/install-vpr.sh +0 -29
  256. siliconcompiler/toolscripts/ubuntu20/install-yosys-parmys.sh +0 -61
  257. siliconcompiler-0.32.3.dist-info/RECORD +0 -470
  258. /siliconcompiler/{templates → data/templates}/__init__.py +0 -0
  259. /siliconcompiler/{templates → data/templates}/email/__init__.py +0 -0
  260. /siliconcompiler/{templates → data/templates}/email/general.j2 +0 -0
  261. /siliconcompiler/{templates → data/templates}/email/summary.j2 +0 -0
  262. /siliconcompiler/{templates → data/templates}/issue/README.txt +0 -0
  263. /siliconcompiler/{templates → data/templates}/issue/__init__.py +0 -0
  264. /siliconcompiler/{templates → data/templates}/issue/run.sh +0 -0
  265. /siliconcompiler/{templates → data/templates}/replay/replay.py.j2 +0 -0
  266. /siliconcompiler/{templates → data/templates}/replay/replay.sh.j2 +0 -0
  267. /siliconcompiler/{templates → data/templates}/replay/requirements.txt +0 -0
  268. /siliconcompiler/{templates → data/templates}/replay/setup.sh +0 -0
  269. /siliconcompiler/{templates → data/templates}/report/__init__.py +0 -0
  270. /siliconcompiler/{templates → data/templates}/report/bootstrap.min.css +0 -0
  271. /siliconcompiler/{templates → data/templates}/report/bootstrap.min.js +0 -0
  272. /siliconcompiler/{templates → data/templates}/report/bootstrap_LICENSE.md +0 -0
  273. /siliconcompiler/{templates → data/templates}/report/sc_report.j2 +0 -0
  274. /siliconcompiler/{templates → data/templates}/slurm/__init__.py +0 -0
  275. /siliconcompiler/{templates → data/templates}/slurm/run.sh +0 -0
  276. /siliconcompiler/{templates → data/templates}/tcl/__init__.py +0 -0
  277. /siliconcompiler/{templates → data/templates}/tcl/manifest.tcl.j2 +0 -0
  278. /siliconcompiler/{units.py → utils/units.py} +0 -0
  279. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/licenses/LICENSE +0 -0
  280. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,13 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
6
6
 
7
+ if [ ! -z ${PREFIX} ]; then
8
+ export PATH="$PREFIX/bin:$PATH"
9
+ fi
10
+
7
11
  sudo apt-get install -y git build-essential wget
8
12
  sudo apt-get install -y tcl-dev tcl-tclreadline \
9
13
  bison flex libfl-dev zlib1g-dev automake autotools-dev
@@ -15,9 +19,17 @@ python3 -m venv .opensta --clear
15
19
  . .opensta/bin/activate
16
20
  python3 -m pip install cmake==3.31.6
17
21
 
22
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
23
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
24
+ SUDO_INSTALL="sudo -E PATH=$PATH"
25
+ else
26
+ SUDO_INSTALL=""
27
+ fi
28
+
18
29
  if [ ! -z ${PREFIX} ]; then
19
30
  cmake_args="-DCMAKE_INSTALL_PREFIX=$PREFIX"
20
31
  config_prefix="--prefix=$PREFIX"
32
+ export PATH="$PREFIX/bin:$PATH"
21
33
  fi
22
34
 
23
35
  # eigen
@@ -29,7 +41,7 @@ mkdir build
29
41
  cd build
30
42
  cmake $cmake_args ..
31
43
  make -j$(nproc)
32
- sudo make install
44
+ $SUDO_INSTALL make install
33
45
 
34
46
  cd ../../..
35
47
  # cudd
@@ -40,7 +52,7 @@ cd cudd
40
52
  autoreconf
41
53
  ./configure $config_prefix
42
54
  make -j$(nproc)
43
- sudo make install
55
+ $SUDO_INSTALL make install
44
56
 
45
57
  cd ../..
46
58
  #swig
@@ -54,7 +66,7 @@ wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-1
54
66
  ./autogen.sh
55
67
  ./configure $config_prefix
56
68
  make -j$(nproc)
57
- sudo make -j$(nproc) install
69
+ $SUDO_INSTALL make -j$(nproc) install
58
70
 
59
71
  cd ../..
60
72
  # opensta
@@ -67,6 +79,6 @@ mkdir -p build
67
79
  cd build
68
80
  cmake .. $cmake_args
69
81
  make -j$(nproc)
70
- sudo make install
82
+ $SUDO_INSTALL make install
71
83
 
72
84
  cd -
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
@@ -14,17 +14,24 @@ python3 -m venv .slang --clear
14
14
  . .slang/bin/activate
15
15
  python3 -m pip install cmake==3.31.6
16
16
 
17
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
18
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
19
+ SUDO_INSTALL="sudo -E PATH=$PATH"
20
+ else
21
+ SUDO_INSTALL=""
22
+ fi
23
+
17
24
  git clone $(python3 ${src_path}/_tools.py --tool slang --field git-url) slang
18
25
  cd slang
19
26
  git checkout $(python3 ${src_path}/_tools.py --tool slang --field git-commit)
20
27
 
21
28
  cfg_args=""
22
29
  if [ ! -z ${PREFIX} ]; then
23
- cfg_args="--prefix=$PREFIX"
30
+ cfg_args="-D CMAKE_INSTALL_PREFIX=$PREFIX"
24
31
  fi
25
32
 
26
- cmake -B build
33
+ cmake -B build $cfg_args
27
34
  cmake --build build -j$(nproc)
28
- cmake --install build --strip $cfg_args
35
+ $SUDO_INSTALL make -C build install
29
36
 
30
37
  cd -
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  sudo apt-get install -y munge libmunge-dev build-essential libmariadb-dev lbzip2 libjson-c-dev
6
6
  sudo apt-get install -y libdbus-1-dev
@@ -8,6 +8,13 @@ sudo apt-get install -y libdbus-1-dev
8
8
  # Get directory of script
9
9
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
10
10
 
11
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
12
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
13
+ SUDO_INSTALL=sudo
14
+ else
15
+ SUDO_INSTALL=""
16
+ fi
17
+
11
18
  sudo apt-get install -y wget
12
19
 
13
20
  mkdir -p deps
@@ -31,4 +38,4 @@ fi
31
38
 
32
39
  make -j$(nproc)
33
40
 
34
- sudo make install
41
+ $SUDO_INSTALL make install
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
@@ -28,6 +28,14 @@ git checkout $(python3 ${src_path}/_tools.py --tool surelog --field git-commit)
28
28
  git submodule update --init --recursive
29
29
 
30
30
  make -j$(nproc)
31
- sudo -E PATH="$PATH" make install
31
+
32
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
33
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
34
+ SUDO_INSTALL="sudo -E PATH=$PATH"
35
+ else
36
+ SUDO_INSTALL=""
37
+ fi
38
+
39
+ $SUDO_INSTALL make install
32
40
 
33
41
  cd -
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
@@ -16,7 +16,14 @@ if [ ! -z ${PREFIX} ]; then
16
16
  export PATH="$PREFIX:$PATH"
17
17
  fi
18
18
 
19
- curl -sSL https://get.haskellstack.org/ | sh -s - -f $haskell_args
19
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
20
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
21
+ SUDO_INSTALL="sudo -E PATH=$PATH"
22
+ else
23
+ SUDO_INSTALL=""
24
+ fi
25
+
26
+ curl -sSL https://get.haskellstack.org/ | $SUDO_INSTALL sh -s - -f $haskell_args
20
27
 
21
28
  git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
22
29
  cd sv2v
@@ -25,8 +32,8 @@ git checkout $(python3 ${src_path}/_tools.py --tool sv2v --field git-commit)
25
32
  make -j$(nproc)
26
33
 
27
34
  if [ ! -z ${PREFIX} ]; then
28
- sudo mkdir -p ${PREFIX}/bin/
29
- sudo cp bin/* ${PREFIX}/bin/
35
+ $SUDO_INSTALL mkdir -p ${PREFIX}/bin/
36
+ $SUDO_INSTALL cp bin/* ${PREFIX}/bin/
30
37
  fi
31
38
 
32
39
  cd -
@@ -1,10 +1,17 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo apt-get install -y wget
9
16
 
10
17
  mkdir -p deps
@@ -19,8 +26,9 @@ tar xzf $filename
19
26
 
20
27
  if [ -z ${PREFIX} ]; then
21
28
  PREFIX=/opt/verible
22
- sudo mkdir -p $PREFIX
29
+ SUDO_INSTALL=sudo
30
+ $SUDO_INSTALL mkdir -p $PREFIX
23
31
  echo "Please add \"export PATH="/opt/verible/bin:\$PATH"\" to your .bashrc"
24
32
  fi
25
33
 
26
- sudo mv verible-$version/* $PREFIX
34
+ $SUDO_INSTALL mv verible-$version/* $PREFIX
@@ -1,10 +1,17 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo apt-get install -y git perl python3 make autoconf g++ flex bison ccache
9
16
  sudo apt-get install -y libgoogle-perftools-dev numactl perl-doc help2man
10
17
  sudo apt-get install -y libfl2
@@ -31,6 +38,6 @@ fi
31
38
 
32
39
  ./configure $args
33
40
  make -j$(nproc)
34
- sudo make install
41
+ $SUDO_INSTALL make install
35
42
 
36
43
  cd -
@@ -1,10 +1,17 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo apt-get install -y git wget
9
16
 
10
17
  mkdir -p deps
@@ -17,8 +24,6 @@ git submodule update --init --recursive
17
24
 
18
25
  ./install_apt_packages.sh
19
26
 
20
- sudo apt-get install -y libtbb-dev
21
-
22
27
  args=
23
28
  if [ ! -z ${PREFIX} ]; then
24
29
  args="-DCMAKE_INSTALL_PREFIX=$PREFIX"
@@ -26,4 +31,4 @@ fi
26
31
 
27
32
  make CMAKE_PARAMS="$args -DWITH_PARMYS=OFF -DWITH_ABC=OFF -DYOSYS_F4PGA_PLUGINS=OFF" -j$(nproc)
28
33
  cd build
29
- sudo make install
34
+ $SUDO_INSTALL make install
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
@@ -15,6 +15,7 @@ cd deps
15
15
  if [ -z ${PREFIX} ]; then
16
16
  PREFIX=~/.local
17
17
  fi
18
+ export PATH="$PREFIX/bin:$PATH"
18
19
 
19
20
  # Download XDM
20
21
  git clone $(python3 ${src_path}/_tools.py --tool xdm --field git-url) xdm
@@ -29,6 +30,13 @@ python3 -m venv venv
29
30
  python3 -m pip install --upgrade pip
30
31
  python3 -m pip install PyInstaller
31
32
 
33
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
34
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
35
+ SUDO_INSTALL="sudo -E PATH=$PATH"
36
+ else
37
+ SUDO_INSTALL=""
38
+ fi
39
+
32
40
  args=
33
41
  if [ ! -z ${PREFIX} ]; then
34
42
  args="-DCMAKE_INSTALL_PREFIX=$PREFIX"
@@ -37,6 +45,6 @@ fi
37
45
  cmake .. $args
38
46
  make -j$(nproc)
39
47
 
40
- sudo make install
48
+ $SUDO_INSTALL make install
41
49
 
42
50
  cd -
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
@@ -24,6 +24,13 @@ python3 -m venv .xyce --clear
24
24
  . .xyce/bin/activate
25
25
  python3 -m pip install cmake>=3.23.0
26
26
 
27
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
28
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
29
+ SUDO_INSTALL="sudo -E PATH=$PATH"
30
+ else
31
+ SUDO_INSTALL=""
32
+ fi
33
+
27
34
  # Download Trilinos.
28
35
  ## Version specified in: https://github.com/Xyce/Xyce/blob/master/INSTALL.md#building-trilinos
29
36
  trilinos_version=14-4-0
@@ -32,12 +39,9 @@ mkdir -p trilinos
32
39
  tar --strip-components=1 -xf trilinos.tar.gz -C trilinos
33
40
 
34
41
  # Download Xyce.
35
- xyce_version=$(python3 ${src_path}/_tools.py --tool xyce --field version)
36
- wget https://xyce.sandia.gov/files/xyce/Xyce-${xyce_version}.tar.gz --no-verbose -O xyce.tar.gz
37
- mkdir -p xyce
38
- tar --strip-components=1 -xf xyce.tar.gz -C xyce
39
-
42
+ git clone $(python3 ${src_path}/_tools.py --tool xyce --field git-url) xyce
40
43
  cd xyce
44
+ git checkout $(python3 ${src_path}/_tools.py --tool xyce --field git-commit)
41
45
 
42
46
  # Build Trilinos
43
47
  mkdir trilinos-build
@@ -48,7 +52,8 @@ cmake \
48
52
  -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \
49
53
  -C ../cmake/trilinos/trilinos-base.cmake \
50
54
  ../../trilinos
51
- cmake --build . -j$(nproc) -t install
55
+ cmake --build . -j$(nproc)
56
+ $SUDO_INSTALL make install
52
57
 
53
58
  cd ..
54
59
 
@@ -64,4 +69,4 @@ cmake \
64
69
 
65
70
  cmake --build . -j$(nproc)
66
71
  cmake --build . -j$(nproc) --target xycecinterface
67
- sudo -E PATH="$PATH" make install
72
+ $SUDO_INSTALL make install
@@ -1,10 +1,17 @@
1
1
  #!/bin/bash
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo apt-get install -y git
9
16
 
10
17
  mkdir -p deps
@@ -15,5 +22,5 @@ cd yosys-moosic
15
22
  git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
16
23
 
17
24
  make -j$(nproc)
18
- sudo PATH="$PATH" make install
25
+ $SUDO_INSTALL make install
19
26
  cd -
@@ -1,10 +1,17 @@
1
1
  #!/bin/bash
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo apt-get install -y git
9
16
 
10
17
  mkdir -p deps
@@ -56,6 +63,6 @@ YOSYS_PLUGIN=$(yosys-config --datdir)/plugins/
56
63
  cd parmys
57
64
 
58
65
  make -j$(nproc)
59
- sudo mkdir -p $YOSYS_PLUGIN
60
- sudo cp parmys-plugin/build/parmys.so $YOSYS_PLUGIN
66
+ $SUDO_INSTALL mkdir -p $YOSYS_PLUGIN
67
+ $SUDO_INSTALL cp parmys-plugin/build/parmys.so $YOSYS_PLUGIN
61
68
  cd -
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
@@ -20,5 +20,13 @@ git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-comm
20
20
  git submodule update --init --recursive
21
21
 
22
22
  make -j$(nproc)
23
- sudo PATH="$PATH" make install
23
+
24
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
25
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
26
+ SUDO_INSTALL="sudo -E PATH=$PATH"
27
+ else
28
+ SUDO_INSTALL=""
29
+ fi
30
+
31
+ $SUDO_INSTALL make install
24
32
  cd -
@@ -1,10 +1,17 @@
1
1
  #!/bin/bash
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  # From: https://github.com/YosysHQ/yosys/blob/f2c689403ace0637b7455bac8f1e8d4bc312e74f/README.md
9
16
  sudo apt-get install -y build-essential clang bison flex \
10
17
  libreadline-dev gawk tcl-dev libffi-dev git \
@@ -22,5 +29,5 @@ git checkout $(python3 ${src_path}/_tools.py --tool yosys --field git-commit)
22
29
  git submodule update --init --recursive
23
30
 
24
31
  make -j$(nproc) PREFIX="$PREFIX"
25
- sudo make install PREFIX="$PREFIX"
32
+ $SUDO_INSTALL make install PREFIX="$PREFIX"
26
33
  cd -
@@ -1,11 +1,13 @@
1
1
  import contextlib
2
- import hashlib
3
2
  import os
4
3
  import re
5
4
  import psutil
6
5
  import shutil
7
- from pathlib import Path, PurePosixPath
6
+ import traceback
7
+ from io import StringIO
8
+ from pathlib import Path
8
9
  from jinja2 import Environment, FileSystemLoader
10
+ from siliconcompiler.schema.parametervalue import PathNodeValue
9
11
 
10
12
  import sys
11
13
  if sys.version_info < (3, 10):
@@ -231,7 +233,9 @@ def sc_open(path, *args, **kwargs):
231
233
  def get_file_template(path,
232
234
  root=os.path.join(
233
235
  os.path.dirname(
234
- os.path.dirname(os.path.abspath(__file__))), 'templates')):
236
+ os.path.dirname(os.path.abspath(__file__))),
237
+ 'data',
238
+ 'templates')):
235
239
  if os.path.isabs(path):
236
240
  root = os.path.dirname(path)
237
241
  path = os.path.basename(path)
@@ -325,31 +329,6 @@ def grep(chip, args, line):
325
329
  return line
326
330
 
327
331
 
328
- #######################################
329
- def _resolve_env_vars(chip, filepath, step, index):
330
- if not filepath:
331
- return None
332
-
333
- env_save = os.environ.copy()
334
-
335
- os.environ.update(get_env_vars(chip, step, index))
336
- resolved_path = os.path.expandvars(filepath)
337
-
338
- os.environ.clear()
339
- os.environ.update(env_save)
340
-
341
- resolved_path = os.path.expanduser(resolved_path)
342
-
343
- # variables that don't exist in environment get ignored by `expandvars`,
344
- # but we can do our own error checking to ensure this doesn't result in
345
- # silent bugs
346
- envvars = re.findall(r'\$\{?(\w+)\}?', resolved_path)
347
- for var in envvars:
348
- chip.logger.warning(f'Variable {var} in {filepath} not defined in environment')
349
-
350
- return resolved_path
351
-
352
-
353
332
  #######################################
354
333
  def get_env_vars(chip, step, index):
355
334
  '''
@@ -373,69 +352,6 @@ def get_env_vars(chip, step, index):
373
352
  return schema_env
374
353
 
375
354
 
376
- ###########################################################################
377
- def find_sc_file(chip, filename, missing_ok=False, search_paths=None, step=None, index=None):
378
- """
379
- Returns the absolute path for the filename provided.
380
-
381
- Searches the for the filename provided and returns the absolute path.
382
- If no valid absolute path is found during the search, None is returned.
383
-
384
- Shell variables ('$' followed by strings consisting of numbers,
385
- underscores, and digits) are replaced with the variable value.
386
-
387
- Args:
388
- filename (str): Relative or absolute filename.
389
- missing_ok (bool): If False, error out if no valid absolute path
390
- found, rather than returning None.
391
- search_paths (list): List of directories to search under instead of
392
- the defaults.
393
- step (str): Step name
394
- index (str): Index
395
-
396
- Returns:
397
- Returns absolute path of 'filename' if found, otherwise returns
398
- None.
399
-
400
- Examples:
401
- >>> chip._find_sc_file('flows/asicflow.py')
402
- Returns the absolute path based on the sc installation directory.
403
-
404
- """
405
-
406
- if not filename:
407
- return None
408
-
409
- # Replacing environment variables
410
- filename = _resolve_env_vars(chip, filename, step, index)
411
-
412
- # If we have an absolute path, pass-through here
413
- if os.path.isabs(filename) and os.path.exists(filename):
414
- return filename
415
-
416
- # Otherwise, search relative to search_paths
417
- if search_paths is None:
418
- search_paths = [chip.cwd]
419
-
420
- searchdirs = ', '.join([str(p) for p in search_paths])
421
- chip.logger.debug(f"Searching for file {filename} in {searchdirs}")
422
-
423
- result = None
424
- for searchdir in search_paths:
425
- if not os.path.isabs(searchdir):
426
- searchdir = os.path.join(chip.cwd, searchdir)
427
-
428
- abspath = os.path.abspath(os.path.join(searchdir, filename))
429
- if os.path.exists(abspath):
430
- result = abspath
431
- break
432
-
433
- if result is None and not missing_ok:
434
- chip.error(f"File {filename} was not found")
435
-
436
- return result
437
-
438
-
439
355
  def get_plugins(system, name=None):
440
356
  '''
441
357
  Search for python modules with a specific function
@@ -470,32 +386,14 @@ def truncate_text(text, width):
470
386
  return text
471
387
 
472
388
 
473
- def get_hashed_filename(path, package=None, hash=hashlib.sha1):
389
+ def get_hashed_filename(path, package=None):
474
390
  '''
475
391
  Utility to map collected file to an unambiguous name based on its path.
476
392
 
477
393
  The mapping looks like:
478
- path/to/file.ext => file_<hash('path/to/file')>.ext
394
+ path/to/file.ext => file_<hash('path/to')>.ext
479
395
  '''
480
- path = PurePosixPath(path)
481
- ext = ''.join(path.suffixes)
482
-
483
- # strip off all file suffixes to get just the bare name
484
- barepath = path
485
- while barepath.suffix:
486
- barepath = PurePosixPath(barepath.stem)
487
- filename = str(barepath.parts[-1])
488
-
489
- if not package:
490
- package = ''
491
- else:
492
- package = f'{package}:'
493
-
494
- path_to_hash = f'{package}{str(path)}'
495
-
496
- pathhash = hash(path_to_hash.encode('utf-8')).hexdigest()
497
-
498
- return f'{filename}_{pathhash}{ext}'
396
+ return PathNodeValue.generate_hashed_path(path, package)
499
397
 
500
398
 
501
399
  def get_cores(chip, physical=False):
@@ -518,3 +416,12 @@ def get_cores(chip, physical=False):
518
416
  cores = 1
519
417
 
520
418
  return cores
419
+
420
+
421
+ def print_traceback(logger, exception):
422
+ logger.error(f'{exception}')
423
+ trace = StringIO()
424
+ traceback.print_tb(exception.__traceback__, file=trace)
425
+ logger.error("Backtrace:")
426
+ for line in trace.getvalue().splitlines():
427
+ logger.error(line)