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
@@ -32,18 +32,85 @@ set sc_pdk [sc_cfg_get option pdk]
32
32
 
33
33
  source "$sc_refdir/procs.tcl"
34
34
 
35
+ ####################
36
+ # DESIGNER's CHOICE
37
+ ####################
38
+
39
+ set sc_logiclibs [sc_get_asic_libraries logic]
40
+ set sc_macrolibs [sc_get_asic_libraries macro]
41
+
42
+ set sc_libraries [sc_cfg_tool_task_get {file} synthesis_libraries]
43
+ if { [sc_cfg_tool_task_exists {file} synthesis_libraries_macros] } {
44
+ set sc_macro_libraries \
45
+ [sc_cfg_tool_task_get {file} synthesis_libraries_macros]
46
+ } else {
47
+ set sc_macro_libraries []
48
+ }
49
+ set sc_mainlib [lindex $sc_logiclibs 0]
50
+
51
+ set sc_abc_constraints \
52
+ [lindex [sc_cfg_tool_task_get {file} abc_constraint_file] 0]
53
+
54
+ set sc_blackboxes []
55
+ foreach lib $sc_macrolibs {
56
+ if { [sc_cfg_exists library $lib output blackbox verilog] } {
57
+ foreach lib_f [sc_cfg_get library $lib output blackbox verilog] {
58
+ lappend sc_blackboxes $lib_f
59
+ }
60
+ }
61
+ }
62
+
63
+ set sc_memory_libmap_files ""
64
+ if { [sc_cfg_tool_task_exists file memory_libmap] } {
65
+ set sc_memory_libmap_files [sc_cfg_tool_task_get file memory_libmap]
66
+ }
67
+
68
+ set sc_memory_techmap_files ""
69
+ if { [sc_cfg_tool_task_exists file memory_techmap] } {
70
+ set sc_memory_techmap_files [sc_cfg_tool_task_get file memory_techmap]
71
+ }
72
+
73
+ ########################################################
74
+ # Read Libraries
75
+ ########################################################
76
+
77
+ foreach lib_file "$sc_libraries $sc_macro_libraries" {
78
+ yosys read_liberty -overwrite -setattr liberty_cell -lib $lib_file
79
+ yosys read_liberty -overwrite -setattr liberty_cell \
80
+ -unit_delay -wb -ignore_miss_func -ignore_buses $lib_file
81
+ }
82
+ foreach bb_file $sc_blackboxes {
83
+ yosys log "Reading blackbox model file: $bb_file"
84
+ yosys read_verilog -setattr blackbox -sv $bb_file
85
+ }
86
+
87
+ # Before working on the design, we mask out any module supplied via
88
+ # `blackbox_modules`. This allows synthesis of parts of the design without having
89
+ # to modify the input RTL.
90
+ if { [sc_cfg_tool_task_exists var blackbox_modules] } {
91
+ foreach bb [sc_cfg_tool_task_get var blackbox_modules] {
92
+ foreach module [get_modules $bb] {
93
+ yosys log "Blackboxing module: $module"
94
+ yosys blackbox $module
95
+ }
96
+ }
97
+ }
98
+
35
99
  ########################################################
36
100
  # Design Inputs
37
101
  ########################################################
38
102
 
39
103
  set input_verilog "inputs/$sc_design.v"
40
104
  if { ![file exists $input_verilog] } {
41
- set input_verilog []
42
- if { [sc_cfg_exists input rtl systemverilog] } {
43
- lappend input_verilog {*}[sc_cfg_get input rtl systemverilog]
44
- }
45
- if { [sc_cfg_exists input rtl verilog] } {
46
- lappend input_verilog {*}[sc_cfg_get input rtl verilog]
105
+ set input_verilog "inputs/$sc_design.sv"
106
+ if { ![file exists $input_verilog] } {
107
+ set input_verilog []
108
+ if { [sc_cfg_exists input rtl systemverilog] } {
109
+ lappend input_verilog {*}[sc_cfg_get input rtl systemverilog]
110
+ }
111
+ if { [sc_cfg_exists input rtl verilog] } {
112
+ lappend input_verilog {*}[sc_cfg_get input rtl verilog]
113
+ }
47
114
  }
48
115
  }
49
116
 
@@ -63,9 +130,12 @@ if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugi
63
130
  yosys read_slang \
64
131
  -D SYNTHESIS \
65
132
  --keep-hierarchy \
133
+ --ignore-assertions \
134
+ --allow-use-before-declare \
66
135
  --top $sc_design \
67
136
  {*}$slang_params \
68
137
  {*}$input_verilog
138
+ yosys setattr -unset init
69
139
  } else {
70
140
  # Use -noblackbox to correctly interpret empty modules as empty,
71
141
  # actual black boxes are read in later
@@ -119,42 +189,43 @@ proc get_modules { { find "*" } } {
119
189
  return [lsort $modules]
120
190
  }
121
191
 
122
- ####################
123
- # DESIGNER's CHOICE
124
- ####################
125
-
126
- set sc_logiclibs [sc_get_asic_libraries logic]
127
- set sc_macrolibs [sc_get_asic_libraries macro]
128
-
129
- set sc_libraries [sc_cfg_tool_task_get {file} synthesis_libraries]
130
- if { [sc_cfg_tool_task_exists {file} synthesis_libraries_macros] } {
131
- set sc_macro_libraries \
132
- [sc_cfg_tool_task_get {file} synthesis_libraries_macros]
133
- } else {
134
- set sc_macro_libraries []
135
- }
136
- set sc_mainlib [lindex $sc_logiclibs 0]
137
-
138
- set sc_abc_constraints \
139
- [lindex [sc_cfg_tool_task_get {file} abc_constraint_file] 0]
140
-
141
- set sc_blackboxes []
142
- foreach lib $sc_macrolibs {
143
- if { [sc_cfg_exists library $lib output blackbox verilog] } {
144
- foreach lib_f [sc_cfg_get library $lib output blackbox verilog] {
145
- lappend sc_blackboxes $lib_f
192
+ proc sc_annotate_gate_cost_equivalent { } {
193
+ yosys cellmatch -derive_luts =A:liberty_cell
194
+ # find a reference nand2 gate
195
+ set found_cell ""
196
+ set found_cell_area ""
197
+ # iterate over all cells with a nand2 signature
198
+ yosys echo off
199
+ set nand2_cells [yosys tee -q -s result.string select -list-mod =*/a:lut=4'b0111 %m]
200
+ yosys echo on
201
+ foreach cell $nand2_cells {
202
+ if { ![rtlil::has_attr -mod $cell area] } {
203
+ puts "WARNING: Cell $cell missing area information"
204
+ continue
205
+ }
206
+ set area [rtlil::get_attr -string -mod $cell area]
207
+ if { $found_cell == "" || $area < $found_cell_area } {
208
+ set found_cell $cell
209
+ set found_cell_area $area
146
210
  }
147
211
  }
148
- }
149
-
150
- set sc_memory_libmap_files ""
151
- if { [sc_cfg_tool_task_exists file memory_libmap] } {
152
- set sc_memory_libmap_files [sc_cfg_tool_task_get file memory_libmap]
153
- }
212
+ if { $found_cell == "" } {
213
+ set found_cell_area 1
214
+ puts "WARNING: reference nand2 cell not found, using $found_cell_area as area"
215
+ } else {
216
+ puts "Using nand2 reference cell ($found_cell) with area: $found_cell_area"
217
+ }
154
218
 
155
- set sc_memory_techmap_files ""
156
- if { [sc_cfg_tool_task_exists file memory_techmap] } {
157
- set sc_memory_techmap_files [sc_cfg_tool_task_get file memory_techmap]
219
+ # convert the area on all Liberty cells to a gate number equivalent
220
+ yosys echo off
221
+ set cells [yosys tee -q -s result.string select -list-mod =A:area =A:liberty_cell %i]
222
+ yosys echo on
223
+ foreach cell $cells {
224
+ set area [rtlil::get_attr -mod -string $cell area]
225
+ set gate_eq [expr { int(max(1, ceil($area / $found_cell_area))) }]
226
+ puts "Setting gate_cost_equivalent for $cell as $gate_eq"
227
+ rtlil::set_attr -mod -uint $cell gate_cost_equivalent $gate_eq
228
+ }
158
229
  }
159
230
 
160
231
  #########################
@@ -209,34 +280,10 @@ proc get_buffer_cell { } {
209
280
  return "$cell $in $out"
210
281
  }
211
282
 
212
- ########################################################
213
- # Read Libraries
214
- ########################################################
215
-
216
- foreach lib_file "$sc_libraries $sc_macro_libraries" {
217
- yosys read_liberty -setattr liberty_cell -lib $lib_file
218
- }
219
- foreach bb_file $sc_blackboxes {
220
- yosys log "Reading blackbox model file: $bb_file"
221
- yosys read_verilog -setattr blackbox -sv $bb_file
222
- }
223
-
224
283
  ########################################################
225
284
  # Synthesis
226
285
  ########################################################
227
286
 
228
- # Before working on the design, we mask out any module supplied via
229
- # `blackbox_modules`. This allows synthesis of parts of the design without having
230
- # to modify the input RTL.
231
- if { [sc_cfg_tool_task_exists var blackbox_modules] } {
232
- foreach bb [sc_cfg_tool_task_get var blackbox_modules] {
233
- foreach module [get_modules $bb] {
234
- yosys log "Blackboxing module: $module"
235
- yosys blackbox $module
236
- }
237
- }
238
- }
239
-
240
287
  # Although the `synth` command also runs `hierarchy`, we run it here without the
241
288
  # `-check` flag first in order to resolve parameters before looking for missing
242
289
  # modules. This works around the fact that Surelog doesn't pickle modules that
@@ -290,6 +337,7 @@ if { !$flatten_design && [lindex [sc_cfg_tool_task_get var auto_flatten] 0] == "
290
337
  set sc_hier_threshold \
291
338
  [lindex [sc_cfg_tool_task_get var hier_threshold] 0]
292
339
 
340
+ sc_annotate_gate_cost_equivalent
293
341
  yosys keep_hierarchy -min_cost $sc_hier_threshold
294
342
 
295
343
  yosys synth -flatten {*}$synth_args -top $sc_design -run coarse:fine
@@ -75,7 +75,7 @@ def prepare_asic_libraries(chip):
75
75
  lib_file_name = f'{lib_file_name_base}_{unique_ident}'
76
76
  unique_ident += 1
77
77
 
78
- lib_content[lib_file_name] = prepareLib.processLibertyFile(
78
+ lib_content[lib_file_name] = prepareLib.process_liberty_file(
79
79
  lib_file,
80
80
  logger=None if chip.get('option', 'quiet',
81
81
  step=step, index=index) else chip.logger)
@@ -2,7 +2,7 @@ from siliconcompiler.tools.yosys import synth_post_process, setup as tool_setup
2
2
  import os
3
3
  import json
4
4
  import re
5
- from siliconcompiler.tools.yosys.prepareLib import processLibertyFile
5
+ from siliconcompiler.tools.yosys.prepareLib import process_liberty_file
6
6
  from siliconcompiler import sc_open
7
7
  from siliconcompiler import utils
8
8
  from siliconcompiler.tools._common.asic import set_tool_task_var, get_libraries, get_mainlib, \
@@ -36,6 +36,8 @@ def setup(chip):
36
36
  # Input/output requirements.
37
37
  if f'{design}.v' in input_provides(chip, step, index):
38
38
  chip.set('tool', tool, 'task', task, 'input', design + '.v', step=step, index=index)
39
+ elif f'{design}.sv' in input_provides(chip, step, index):
40
+ chip.set('tool', tool, 'task', task, 'input', design + '.sv', step=step, index=index)
39
41
  else:
40
42
  added = False
41
43
  added |= add_require_input(chip, 'input', 'rtl', 'systemverilog',
@@ -320,7 +322,7 @@ def prepare_synthesis_libraries(chip):
320
322
  lib_file_name = f'{lib_file_name_base}_{unique_ident}'
321
323
  unique_ident += 1
322
324
 
323
- lib_content[lib_file_name] = processLibertyFile(
325
+ lib_content[lib_file_name] = process_liberty_file(
324
326
  lib_file,
325
327
  logger=logger
326
328
  )
@@ -565,8 +567,6 @@ def _generate_cell_area_report(chip):
565
567
  area = info["area"]
566
568
 
567
569
  for cell, inst_count in info["num_cells_by_type"].items():
568
- # print(module, cell, inst_count)
569
-
570
570
  cell_area, cell_count = get_area_count(cell)
571
571
 
572
572
  count += cell_count * inst_count
@@ -583,7 +583,7 @@ def _generate_cell_area_report(chip):
583
583
  cell_type = level_info["cells"][cell]["type"]
584
584
  if cell_type in modules:
585
585
  area, count = get_area_count(cell_type)
586
- cellarea_report.addCell(
586
+ cellarea_report.add_cell(
587
587
  name=f"{prefix}{cell}",
588
588
  module=cell_type,
589
589
  cellcount=count,
@@ -594,7 +594,7 @@ def _generate_cell_area_report(chip):
594
594
  area = 0.0
595
595
  if "area" in stat["design"]:
596
596
  area = stat["design"]["area"]
597
- cellarea_report.addCell(
597
+ cellarea_report.add_cell(
598
598
  name=design,
599
599
  module=design,
600
600
  cellarea=area,
@@ -604,4 +604,4 @@ def _generate_cell_area_report(chip):
604
604
  handle_heir(netlist["modules"][design], "")
605
605
 
606
606
  if cellarea_report.size() > 0:
607
- cellarea_report.writeReport("reports/hierarchical_cell_area.json")
607
+ cellarea_report.write_report("reports/hierarchical_cell_area.json")
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "openroad": {
3
3
  "git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
4
- "git-commit": "e78e29127134a0b95ebcd5661895c6dc4651e641",
4
+ "git-commit": "b0107893ea0693f3cf09bbf95450a38c1b26b950",
5
5
  "docker-cmds": [
6
6
  "# Remove OR-Tools files",
7
7
  "RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "opensta": {
19
19
  "git-url": "https://github.com/parallaxsw/OpenSTA.git",
20
- "git-commit": "109bc9ab5e35b830db9569f741db09e468704e6b",
20
+ "git-commit": "71bdfb99049f33a010bb23527c5c921c925378a0",
21
21
  "auto-update": true
22
22
  },
23
23
  "netgen": {
@@ -41,7 +41,7 @@
41
41
  "auto-update": false
42
42
  },
43
43
  "klayout": {
44
- "version": "0.30.0",
44
+ "version": "0.30.1",
45
45
  "git-url": "https://github.com/KLayout/klayout.git",
46
46
  "docker-skip": true,
47
47
  "auto-update": true,
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "sv2v": {
52
52
  "git-url": "https://github.com/zachjs/sv2v.git",
53
- "git-commit": "d30c7e7f4e9018b9d4a565207ff752460c81eeb4",
53
+ "git-commit": "380c2b978a54e459ac216c9e6b7f1a4e31573a0e",
54
54
  "auto-update": true
55
55
  },
56
56
  "verilator": {
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "vpr": {
73
73
  "git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
74
- "git-commit": "2a4e92181280a235315621253d1dc9eb8826bc53",
74
+ "git-commit": "c606a21d9ab5db53fb382a7dd79a0703c887108c",
75
75
  "auto-update": false
76
76
  },
77
77
  "icepack": {
@@ -96,13 +96,15 @@
96
96
  },
97
97
  "yosys": {
98
98
  "git-url": "https://github.com/YosysHQ/yosys.git",
99
- "git-commit": "v0.52",
99
+ "git-commit": "v0.53",
100
100
  "version-prefix": "",
101
101
  "auto-update": true
102
102
  },
103
103
  "xyce": {
104
- "version": "7.8",
105
- "auto-update": false
104
+ "git-url": "https://github.com/Xyce/Xyce.git",
105
+ "git-commit": "Release-7.9.0",
106
+ "version-prefix": "Release-",
107
+ "auto-update": true
106
108
  },
107
109
  "xdm": {
108
110
  "git-url": "https://github.com/Xyce/XDM.git",
@@ -144,7 +146,7 @@
144
146
  },
145
147
  "yosys-slang": {
146
148
  "git-url": "https://github.com/povik/yosys-slang.git",
147
- "git-commit": "a95ef24f0307230ae25ea6f2216d2fe8b8ece0be",
149
+ "git-commit": "34753c07b7bd285b784b3a2c756cfac56e1a26ab",
148
150
  "docker-depends": "yosys",
149
151
  "auto-update": true
150
152
  },
@@ -156,7 +158,7 @@
156
158
  },
157
159
  "yosys-parmys": {
158
160
  "git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
159
- "git-commit": "2a4e92181280a235315621253d1dc9eb8826bc53",
161
+ "git-commit": "c606a21d9ab5db53fb382a7dd79a0703c887108c",
160
162
  "docker-depends": [
161
163
  "yosys",
162
164
  "vpr"
@@ -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 yum install -y wget
9
16
 
10
17
  mkdir -p deps
@@ -19,7 +26,7 @@ if [ ! -z ${PREFIX} ]; then
19
26
  args="-C $PREFIX --strip-components 1"
20
27
  fi
21
28
 
22
- tar xvf sbt.tgz $args
29
+ $SUDO_INSTALL tar xvf sbt.tgz $args
23
30
 
24
31
  cd -
25
32
 
@@ -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 yum group install -y "Development Tools"
9
16
  sudo yum install -y wget git
10
17
 
@@ -21,7 +28,7 @@ tar xvf gperf-3.1.tar.gz
21
28
  cd gperf-3.1
22
29
  ./configure $args
23
30
  make -j$(nproc)
24
- sudo make install
31
+ $SUDO_INSTALL make install
25
32
  cd ..
26
33
 
27
34
  if [ ! -z ${PREFIX} ]; then
@@ -36,6 +43,6 @@ git checkout $(python3 ${src_path}/_tools.py --tool icarus --field git-commit)
36
43
  sh autoconf.sh
37
44
  ./configure $args
38
45
  make -j$(nproc)
39
- sudo make install
46
+ $SUDO_INSTALL make install
40
47
 
41
48
  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 yum install -y wget
9
16
 
10
17
  mkdir -p deps
@@ -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 yum group install -y "Development Tools"
9
16
  sudo yum install -y tcl-devel tk-devel tcsh csh git
10
17
 
@@ -22,4 +29,4 @@ fi
22
29
 
23
30
  LD_FLAGS=-shared ./configure $args
24
31
  make -j$(nproc)
25
- sudo make install
32
+ $SUDO_INSTALL make install
@@ -1,5 +1,5 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  sudo yum install -y ImageMagick
@@ -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 yum group install -y "Development Tools"
9
16
  sudo yum install -y tcl-devel tk-devel git
10
17
 
@@ -22,4 +29,4 @@ fi
22
29
 
23
30
  ./configure $args
24
31
  make -j$(nproc)
25
- sudo make install
32
+ $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,13 @@ python3 -m venv .slang --clear
15
15
  python3 -m pip install --upgrade pip
16
16
  python3 -m pip install cmake
17
17
 
18
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
19
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
20
+ SUDO_INSTALL="sudo -E PATH=$PATH"
21
+ else
22
+ SUDO_INSTALL=""
23
+ fi
24
+
18
25
  sudo yum install -y gcc-toolset-12
19
26
 
20
27
  git clone $(python3 ${src_path}/_tools.py --tool slang --field git-url) slang
@@ -23,11 +30,11 @@ git checkout $(python3 ${src_path}/_tools.py --tool slang --field git-commit)
23
30
 
24
31
  cfg_args=""
25
32
  if [ ! -z ${PREFIX} ]; then
26
- cfg_args="--prefix=$PREFIX"
33
+ cfg_args="-D CMAKE_INSTALL_PREFIX=$PREFIX"
27
34
  fi
28
35
 
29
- scl run gcc-toolset-12 "cmake -B build"
36
+ scl run gcc-toolset-12 "cmake -B build $cfg_args"
30
37
  scl run gcc-toolset-12 "cmake --build build -j$(nproc)"
31
- scl run gcc-toolset-12 "cmake --install build --strip $cfg_args"
38
+ scl run gcc-toolset-12 "$SUDO_INSTALL make -C build install"
32
39
 
33
40
  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)/..
@@ -29,6 +29,13 @@ git submodule update --init --recursive
29
29
 
30
30
  scl run gcc-toolset-12 "LDFLAGS=\"-lrt\" make -j$(nproc)"
31
31
 
32
- sudo -E PATH="$PATH" make install
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
33
40
 
34
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)/..
@@ -18,7 +18,14 @@ if [ ! -z ${PREFIX} ]; then
18
18
  export PATH="$PREFIX:$PATH"
19
19
  fi
20
20
 
21
- curl -sSL https://get.haskellstack.org/ | sh -s - -f $haskell_args
21
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
22
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
23
+ SUDO_INSTALL="sudo -E PATH=$PATH"
24
+ else
25
+ SUDO_INSTALL=""
26
+ fi
27
+
28
+ curl -sSL https://get.haskellstack.org/ | $SUDO_INSTALL sh -s - -f $haskell_args
22
29
 
23
30
  git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
24
31
  cd sv2v
@@ -27,8 +34,8 @@ git checkout $(python3 ${src_path}/_tools.py --tool sv2v --field git-commit)
27
34
  make -j$(nproc)
28
35
 
29
36
  if [ ! -z ${PREFIX} ]; then
30
- sudo mkdir -p ${PREFIX}/bin/
31
- sudo cp bin/* ${PREFIX}/bin/
37
+ $SUDO_INSTALL mkdir -p ${PREFIX}/bin/
38
+ $SUDO_INSTALL cp bin/* ${PREFIX}/bin/
32
39
  fi
33
40
 
34
41
  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 yum 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 yum group install -y "Development Tools"
9
16
  sudo yum install -y git wget
10
17
 
@@ -22,7 +29,7 @@ cd help2man-1.43.3
22
29
 
23
30
  ./configure $args
24
31
  make -j$(nproc)
25
- sudo make install
32
+ $SUDO_INSTALL make install
26
33
 
27
34
  cd ..
28
35
 
@@ -36,6 +43,6 @@ autoconf
36
43
 
37
44
  ./configure $args
38
45
  make -j$(nproc)
39
- sudo make install
46
+ $SUDO_INSTALL make install
40
47
 
41
48
  cd -