siliconcompiler 0.33.0__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 (170) hide show
  1. siliconcompiler/_common.py +5 -0
  2. siliconcompiler/_metadata.py +1 -1
  3. siliconcompiler/apps/sc_install.py +7 -0
  4. siliconcompiler/apps/sc_remote.py +7 -2
  5. siliconcompiler/core.py +34 -12
  6. siliconcompiler/metric.py +59 -0
  7. siliconcompiler/record.py +6 -2
  8. siliconcompiler/remote/client.py +10 -3
  9. siliconcompiler/remote/server.py +7 -2
  10. siliconcompiler/report/dashboard/cli/__init__.py +2 -0
  11. siliconcompiler/report/dashboard/cli/board.py +34 -30
  12. siliconcompiler/report/report.py +10 -5
  13. siliconcompiler/report/utils.py +12 -6
  14. siliconcompiler/scheduler/__init__.py +137 -974
  15. siliconcompiler/scheduler/send_messages.py +9 -3
  16. siliconcompiler/scheduler/slurm.py +10 -43
  17. siliconcompiler/scheduler/taskscheduler.py +320 -0
  18. siliconcompiler/schema/schema_cfg.py +2 -2
  19. siliconcompiler/tool.py +127 -19
  20. siliconcompiler/tools/_common/asic.py +5 -5
  21. siliconcompiler/tools/bluespec/convert.py +2 -1
  22. siliconcompiler/tools/builtin/_common.py +9 -2
  23. siliconcompiler/tools/builtin/concatenate.py +6 -2
  24. siliconcompiler/tools/builtin/minimum.py +7 -2
  25. siliconcompiler/tools/builtin/mux.py +7 -2
  26. siliconcompiler/tools/builtin/nop.py +7 -2
  27. siliconcompiler/tools/builtin/verify.py +7 -3
  28. siliconcompiler/tools/chisel/convert.py +10 -10
  29. siliconcompiler/tools/klayout/drc.py +2 -2
  30. siliconcompiler/tools/klayout/klayout_show.py +6 -6
  31. siliconcompiler/tools/klayout/klayout_utils.py +12 -12
  32. siliconcompiler/tools/netgen/count_lvs.py +2 -2
  33. siliconcompiler/tools/netgen/lvs.py +1 -1
  34. siliconcompiler/tools/openroad/_apr.py +2 -2
  35. siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +1 -7
  36. siliconcompiler/tools/openroad/scripts/common/procs.tcl +18 -0
  37. siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +1 -7
  38. siliconcompiler/tools/opensta/scripts/sc_timing.tcl +10 -0
  39. siliconcompiler/tools/opensta/timing.py +11 -0
  40. siliconcompiler/tools/slang/__init__.py +3 -3
  41. siliconcompiler/tools/slang/elaborate.py +6 -6
  42. siliconcompiler/tools/slang/lint.py +1 -3
  43. siliconcompiler/tools/vpr/_xml_constraint.py +8 -8
  44. siliconcompiler/tools/yosys/prepareLib.py +2 -2
  45. siliconcompiler/tools/yosys/sc_synth_asic.tcl +43 -1
  46. siliconcompiler/tools/yosys/screenshot.py +1 -1
  47. siliconcompiler/tools/yosys/syn_asic.py +5 -5
  48. siliconcompiler/toolscripts/_tools.json +8 -6
  49. siliconcompiler/toolscripts/rhel8/install-chisel.sh +9 -2
  50. siliconcompiler/toolscripts/rhel8/install-icarus.sh +10 -3
  51. siliconcompiler/toolscripts/rhel8/install-klayout.sh +8 -1
  52. siliconcompiler/toolscripts/rhel8/install-magic.sh +9 -2
  53. siliconcompiler/toolscripts/rhel8/install-montage.sh +1 -1
  54. siliconcompiler/toolscripts/rhel8/install-netgen.sh +9 -2
  55. siliconcompiler/toolscripts/rhel8/install-slang.sh +11 -4
  56. siliconcompiler/toolscripts/rhel8/install-surelog.sh +9 -2
  57. siliconcompiler/toolscripts/rhel8/install-sv2v.sh +11 -4
  58. siliconcompiler/toolscripts/rhel8/install-verible.sh +11 -3
  59. siliconcompiler/toolscripts/rhel8/install-verilator.sh +10 -3
  60. siliconcompiler/toolscripts/rhel8/install-xyce.sh +15 -10
  61. siliconcompiler/toolscripts/rhel9/install-chisel.sh +9 -2
  62. siliconcompiler/toolscripts/rhel9/install-ghdl.sh +9 -2
  63. siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +10 -3
  64. siliconcompiler/toolscripts/rhel9/install-icarus.sh +10 -3
  65. siliconcompiler/toolscripts/rhel9/install-klayout.sh +8 -1
  66. siliconcompiler/toolscripts/rhel9/install-magic.sh +9 -2
  67. siliconcompiler/toolscripts/rhel9/install-montage.sh +1 -1
  68. siliconcompiler/toolscripts/rhel9/install-netgen.sh +9 -2
  69. siliconcompiler/toolscripts/rhel9/install-openroad.sh +16 -3
  70. siliconcompiler/toolscripts/rhel9/install-opensta.sh +17 -5
  71. siliconcompiler/toolscripts/rhel9/install-slang.sh +11 -4
  72. siliconcompiler/toolscripts/rhel9/install-surelog.sh +9 -2
  73. siliconcompiler/toolscripts/rhel9/install-sv2v.sh +11 -4
  74. siliconcompiler/toolscripts/rhel9/install-verible.sh +11 -3
  75. siliconcompiler/toolscripts/rhel9/install-verilator.sh +10 -3
  76. siliconcompiler/toolscripts/rhel9/install-vpr.sh +9 -2
  77. siliconcompiler/toolscripts/rhel9/install-xdm.sh +10 -2
  78. siliconcompiler/toolscripts/rhel9/install-xyce.sh +15 -10
  79. siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +9 -2
  80. siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +10 -3
  81. siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +10 -2
  82. siliconcompiler/toolscripts/rhel9/install-yosys.sh +9 -2
  83. siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +10 -2
  84. siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +10 -3
  85. siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +9 -2
  86. siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +9 -2
  87. siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +9 -2
  88. siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +9 -2
  89. siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +9 -2
  90. siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +8 -1
  91. siliconcompiler/toolscripts/ubuntu20/install-magic.sh +9 -2
  92. siliconcompiler/toolscripts/ubuntu20/install-montage.sh +1 -1
  93. siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +9 -2
  94. siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +9 -2
  95. siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +16 -3
  96. siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +16 -5
  97. siliconcompiler/toolscripts/ubuntu20/install-slang.sh +11 -4
  98. siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +9 -2
  99. siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +10 -2
  100. siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +11 -4
  101. siliconcompiler/toolscripts/ubuntu20/install-verible.sh +11 -3
  102. siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +9 -2
  103. siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +10 -2
  104. siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +13 -8
  105. siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +9 -2
  106. siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +9 -2
  107. siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +10 -2
  108. siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +10 -3
  109. siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +9 -2
  110. siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +9 -2
  111. siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +9 -2
  112. siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +9 -2
  113. siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +9 -2
  114. siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +8 -1
  115. siliconcompiler/toolscripts/ubuntu22/install-magic.sh +9 -2
  116. siliconcompiler/toolscripts/ubuntu22/install-montage.sh +1 -1
  117. siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +9 -2
  118. siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +9 -2
  119. siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +16 -3
  120. siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +17 -5
  121. siliconcompiler/toolscripts/ubuntu22/install-slang.sh +11 -4
  122. siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +9 -2
  123. siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +10 -2
  124. siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +11 -4
  125. siliconcompiler/toolscripts/ubuntu22/install-verible.sh +11 -3
  126. siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +9 -2
  127. siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +9 -2
  128. siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +10 -2
  129. siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +13 -8
  130. siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +9 -2
  131. siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +10 -3
  132. siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +10 -2
  133. siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +9 -2
  134. siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +12 -4
  135. siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +10 -3
  136. siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +9 -2
  137. siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +9 -2
  138. siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +9 -2
  139. siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +9 -2
  140. siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +9 -2
  141. siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +8 -1
  142. siliconcompiler/toolscripts/ubuntu24/install-magic.sh +9 -2
  143. siliconcompiler/toolscripts/ubuntu24/install-montage.sh +1 -1
  144. siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +9 -2
  145. siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +9 -2
  146. siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +16 -3
  147. siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +17 -5
  148. siliconcompiler/toolscripts/ubuntu24/install-slang.sh +11 -4
  149. siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +9 -2
  150. siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +10 -2
  151. siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +11 -4
  152. siliconcompiler/toolscripts/ubuntu24/install-verible.sh +11 -3
  153. siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +9 -2
  154. siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +9 -2
  155. siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +10 -2
  156. siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +13 -8
  157. siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +9 -2
  158. siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +10 -3
  159. siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +10 -2
  160. siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +9 -2
  161. siliconcompiler/utils/__init__.py +11 -0
  162. siliconcompiler/utils/flowgraph.py +6 -101
  163. siliconcompiler/utils/issue.py +15 -23
  164. siliconcompiler/utils/logging.py +2 -2
  165. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/METADATA +2 -2
  166. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/RECORD +170 -169
  167. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/WHEEL +1 -1
  168. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/entry_points.txt +0 -0
  169. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/licenses/LICENSE +0 -0
  170. {siliconcompiler-0.33.0.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
@@ -24,4 +31,4 @@ fi
24
31
 
25
32
  make CMAKE_PARAMS="$args -DWITH_PARMYS=OFF -DWITH_ABC=OFF -DYOSYS_F4PGA_PLUGINS=OFF" -j$(nproc)
26
33
  cd build
27
- 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 -
@@ -3,6 +3,8 @@ import os
3
3
  import re
4
4
  import psutil
5
5
  import shutil
6
+ import traceback
7
+ from io import StringIO
6
8
  from pathlib import Path
7
9
  from jinja2 import Environment, FileSystemLoader
8
10
  from siliconcompiler.schema.parametervalue import PathNodeValue
@@ -414,3 +416,12 @@ def get_cores(chip, physical=False):
414
416
  cores = 1
415
417
 
416
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)
@@ -6,88 +6,6 @@ from siliconcompiler.tools._common import input_file_node_name, get_tool_task
6
6
  from siliconcompiler.flowgraph import RuntimeFlowgraph
7
7
 
8
8
 
9
- def _get_pruned_node_inputs(chip, flow, node):
10
- # Ignore option from/to, we want reachable nodes of the whole flowgraph
11
- flow_schema = chip.schema.get("flowgraph", flow, field="schema")
12
- runtime = RuntimeFlowgraph(
13
- flow_schema,
14
- from_steps=set([step for step, _ in flow_schema.get_entry_nodes()]),
15
- prune_nodes=chip.get('option', 'prune'))
16
-
17
- return runtime.get_node_inputs(*node, record=chip.schema.get("record", field="schema"))
18
-
19
-
20
- #######################################
21
- def _get_flowgraph_execution_order(chip, flow, reverse=False):
22
- return chip.schema.get("flowgraph", flow, field="schema").get_execution_order(reverse=reverse)
23
-
24
-
25
- def get_nodes_from(chip, flow, nodes):
26
- runtime = RuntimeFlowgraph(
27
- chip.schema.get("flowgraph", flow, field="schema"),
28
- from_steps=chip.get('option', 'from'),
29
- to_steps=chip.get('option', 'to'),
30
- prune_nodes=chip.get('option', 'prune'))
31
-
32
- all_nodes = set()
33
- for node in nodes:
34
- all_nodes.update(runtime.get_nodes_starting_at(*node))
35
-
36
- return all_nodes
37
-
38
-
39
- ###########################################################################
40
- def nodes_to_execute(chip, flow=None):
41
- '''
42
- Returns an ordered list of flowgraph nodes which will be executed.
43
- This takes the from/to options into account if flow is the current flow or None.
44
-
45
- Returns:
46
- A list of nodes that will get executed during run() (or a specific flow).
47
-
48
- Example:
49
- >>> nodes = nodes_to_execute()
50
- '''
51
- if flow is None:
52
- flow = chip.get('option', 'flow')
53
-
54
- runtime = RuntimeFlowgraph(
55
- chip.schema.get("flowgraph", flow, field='schema'),
56
- args=(chip.get('arg', 'step'), chip.get('arg', 'index')),
57
- from_steps=chip.get('option', 'from'),
58
- to_steps=chip.get('option', 'to'),
59
- prune_nodes=chip.get('option', 'prune'))
60
-
61
- return runtime.get_nodes()
62
-
63
-
64
- ###########################################################################
65
- def _check_flowgraph(chip, flow=None):
66
- '''
67
- Check if flowgraph is valid.
68
-
69
- * Checks if all edges have valid nodes
70
- * Checks that there are no duplicate edges
71
- * Checks if from/to is valid
72
-
73
- Returns True if valid, False otherwise.
74
- '''
75
-
76
- if not flow:
77
- flow = chip.get('option', 'flow')
78
-
79
- error = not chip.schema.get("flowgraph", flow, field="schema").validate(logger=chip.logger)
80
- if not error:
81
- error = not RuntimeFlowgraph.validate(
82
- chip.schema.get("flowgraph", flow, field="schema"),
83
- from_steps=chip.get('option', 'from'),
84
- to_steps=chip.get('option', 'to'),
85
- prune_nodes=chip.get('option', 'prune'),
86
- logger=chip.logger)
87
-
88
- return not error
89
-
90
-
91
9
  ###########################################################################
92
10
  def _check_flowgraph_io(chip, nodes=None):
93
11
  '''Check if flowgraph is valid in terms of input and output files.
@@ -98,7 +16,6 @@ def _check_flowgraph_io(chip, nodes=None):
98
16
 
99
17
  runtime_full = RuntimeFlowgraph(
100
18
  chip.schema.get("flowgraph", flow, field='schema'),
101
- args=(chip.get('arg', 'step'), chip.get('arg', 'index')),
102
19
  to_steps=chip.get('option', 'to'),
103
20
  prune_nodes=chip.get('option', 'prune'))
104
21
  runtime_flow = RuntimeFlowgraph(
@@ -144,7 +61,11 @@ def _check_flowgraph_io(chip, nodes=None):
144
61
  manifest = f'{design}.pkg.json'
145
62
  inputs = [inp for inp in os.listdir(in_step_out_dir) if inp != manifest]
146
63
  else:
147
- inputs = _gather_outputs(chip, in_step, in_index)
64
+ in_tool, _ = get_tool_task(chip, in_step, in_index, flow=flow)
65
+ task_class = chip.get("tool", in_tool, field="schema")
66
+ task_class.set_runtime(chip, step=in_step, index=in_index)
67
+
68
+ inputs = task_class.get_output_files()
148
69
 
149
70
  for inp in inputs:
150
71
  node_inp = input_file_node_name(inp, in_step, in_index)
@@ -165,22 +86,6 @@ def _check_flowgraph_io(chip, nodes=None):
165
86
  return True
166
87
 
167
88
 
168
- ###########################################################################
169
- def _gather_outputs(chip, step, index):
170
- '''Return set of filenames that are guaranteed to be in outputs
171
- directory after a successful run of step/index.'''
172
-
173
- flow = chip.get('option', 'flow')
174
- task_gather = getattr(chip._get_task_module(step, index, flow=flow, error=False),
175
- '_gather_outputs',
176
- None)
177
- if task_gather:
178
- return set(task_gather(chip, step, index))
179
-
180
- tool, task = get_tool_task(chip, step, index, flow=flow)
181
- return set(chip.get('tool', tool, 'task', task, 'output', step=step, index=index))
182
-
183
-
184
89
  def _get_flowgraph_information(chip, flow, io=True):
185
90
  from siliconcompiler.scheduler import _setup_node
186
91
  from siliconcompiler.tools._common import input_provides, input_file_node_name
@@ -190,7 +95,7 @@ def _get_flowgraph_information(chip, flow, io=True):
190
95
  chip.schema = chip.schema.copy()
191
96
 
192
97
  # Setup nodes
193
- node_exec_order = _get_flowgraph_execution_order(chip, flow)
98
+ node_exec_order = chip.schema.get("flowgraph", flow, field="schema").get_execution_order()
194
99
  if io:
195
100
  # try:
196
101
  for layer_nodes in node_exec_order: