siliconcompiler 0.29.1__py3-none-any.whl → 0.29.3__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 (81) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/apps/sc_install.py +2 -2
  3. siliconcompiler/core.py +18 -8
  4. siliconcompiler/flowgraph.py +23 -5
  5. siliconcompiler/scheduler/__init__.py +21 -9
  6. siliconcompiler/tools/__init__.py +2 -0
  7. siliconcompiler/tools/_common/asic.py +70 -0
  8. siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +2 -2
  9. siliconcompiler/tools/bambu/convert.py +2 -1
  10. siliconcompiler/tools/bluespec/convert.py +2 -1
  11. siliconcompiler/tools/chisel/convert.py +2 -1
  12. siliconcompiler/tools/genfasm/bitstream.py +2 -2
  13. siliconcompiler/tools/ghdl/convert.py +2 -2
  14. siliconcompiler/tools/gtkwave/__init__.py +39 -0
  15. siliconcompiler/tools/gtkwave/scripts/sc_show.tcl +34 -0
  16. siliconcompiler/tools/gtkwave/show.py +71 -0
  17. siliconcompiler/tools/icarus/compile.py +6 -2
  18. siliconcompiler/tools/klayout/drc.py +2 -1
  19. siliconcompiler/tools/magic/magic.py +1 -1
  20. siliconcompiler/tools/netgen/lvs.py +2 -1
  21. siliconcompiler/tools/openroad/_apr.py +14 -5
  22. siliconcompiler/tools/openroad/global_placement.py +23 -2
  23. siliconcompiler/tools/openroad/rdlroute.py +2 -2
  24. siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +1 -1
  25. siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +64 -1
  26. siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +78 -94
  27. siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +11 -1
  28. siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +4 -0
  29. siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +7 -1
  30. siliconcompiler/tools/openroad/scripts/common/procs.tcl +39 -3
  31. siliconcompiler/tools/openroad/scripts/common/reports.tcl +4 -0
  32. siliconcompiler/tools/openroad/scripts/common/write_data.tcl +2 -5
  33. siliconcompiler/tools/openroad/scripts/common/write_data_physical.tcl +3 -0
  34. siliconcompiler/tools/openroad/scripts/common/write_data_timing.tcl +1 -0
  35. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +10 -1
  36. siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +1 -1
  37. siliconcompiler/tools/opensta/__init__.py +2 -2
  38. siliconcompiler/tools/opensta/report_libraries.py +2 -2
  39. siliconcompiler/tools/opensta/timing.py +2 -1
  40. siliconcompiler/tools/slang/__init__.py +78 -2
  41. siliconcompiler/tools/slang/elaborate.py +46 -0
  42. siliconcompiler/tools/slang/lint.py +10 -76
  43. siliconcompiler/tools/surelog/parse.py +1 -1
  44. siliconcompiler/tools/sv2v/convert.py +2 -2
  45. siliconcompiler/tools/template/template.py +2 -2
  46. siliconcompiler/tools/verilator/compile.py +11 -0
  47. siliconcompiler/tools/verilator/verilator.py +3 -2
  48. siliconcompiler/tools/vivado/vivado.py +2 -1
  49. siliconcompiler/tools/vpr/place.py +2 -2
  50. siliconcompiler/tools/vpr/route.py +2 -2
  51. siliconcompiler/tools/vpr/show.py +2 -1
  52. siliconcompiler/tools/yosys/syn_asic.py +8 -0
  53. siliconcompiler/tools/yosys/syn_asic.tcl +4 -0
  54. siliconcompiler/toolscripts/_tools.json +8 -3
  55. siliconcompiler/toolscripts/rhel8/install-slang.sh +0 -0
  56. siliconcompiler/toolscripts/rhel8/install-sv2v.sh +7 -1
  57. siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +40 -0
  58. siliconcompiler/toolscripts/rhel9/install-slang.sh +0 -0
  59. siliconcompiler/toolscripts/rhel9/install-sv2v.sh +7 -1
  60. siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +28 -0
  61. siliconcompiler/toolscripts/ubuntu20/install-slang.sh +0 -0
  62. siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +1 -0
  63. siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +7 -1
  64. siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +28 -0
  65. siliconcompiler/toolscripts/ubuntu22/install-slang.sh +0 -0
  66. siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +7 -1
  67. siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +7 -1
  68. siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +3 -4
  69. siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +29 -0
  70. siliconcompiler/toolscripts/ubuntu24/install-slang.sh +0 -0
  71. siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +7 -1
  72. siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +7 -1
  73. siliconcompiler/utils/__init__.py +22 -0
  74. siliconcompiler/utils/logging.py +67 -0
  75. siliconcompiler/utils/showtools.py +3 -0
  76. {siliconcompiler-0.29.1.dist-info → siliconcompiler-0.29.3.dist-info}/METADATA +8 -8
  77. {siliconcompiler-0.29.1.dist-info → siliconcompiler-0.29.3.dist-info}/RECORD +76 -65
  78. {siliconcompiler-0.29.1.dist-info → siliconcompiler-0.29.3.dist-info}/LICENSE +0 -0
  79. {siliconcompiler-0.29.1.dist-info → siliconcompiler-0.29.3.dist-info}/WHEEL +0 -0
  80. {siliconcompiler-0.29.1.dist-info → siliconcompiler-0.29.3.dist-info}/entry_points.txt +0 -0
  81. {siliconcompiler-0.29.1.dist-info → siliconcompiler-0.29.3.dist-info}/top_level.txt +0 -0
@@ -10,7 +10,13 @@ cd deps
10
10
 
11
11
  sudo apt-get install -y curl
12
12
 
13
- curl -sSL https://get.haskellstack.org/ | sh
13
+ haskell_args=""
14
+ if [ ! -z ${PREFIX} ]; then
15
+ haskell_args="-d $PREFIX"
16
+ export PATH="$PREFIX:$PATH"
17
+ fi
18
+
19
+ curl -sSL https://get.haskellstack.org/ | sh -s - -f $haskell_args
14
20
 
15
21
  git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
16
22
  cd sv2v
@@ -12,9 +12,8 @@ sudo apt-get install -y autoconf autoconf-archive automake libtool \
12
12
  libfl-dev
13
13
  sudo apt-get install -y \
14
14
  gcc-11 gcc-11-multilib g++-11 g++-11-multilib \
15
- llvm-11 llvm-11-dev libllvm11 \
16
- gfortran-10 gfortran-10-multilib \
17
- clang-11 libclang-11-dev
15
+ llvm-16 llvm-16-dev libllvm16 \
16
+ clang-16 libclang-16-dev
18
17
 
19
18
  mkdir -p deps
20
19
  cd deps
@@ -38,7 +37,7 @@ make -f Makefile.init
38
37
  mkdir obj
39
38
  cd obj
40
39
 
41
- ../configure --enable-release --disable-flopoco --with-opt-level=2 $args
40
+ CC=$(which gcc-11) CXX=$(which g++-11) ../configure --enable-release --disable-flopoco --with-opt-level=2 $args
42
41
  make -j$(nproc)
43
42
  make install
44
43
 
@@ -0,0 +1,29 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ sudo apt-get install -y build-essential gperf libgtk-3-dev \
9
+ libbz2-dev libjudy-dev liblzma-dev tcl-dev tk-dev autotools-dev \
10
+ automake
11
+
12
+ mkdir -p deps
13
+ cd deps
14
+
15
+ git clone $(python3 ${src_path}/_tools.py --tool gtkwave --field git-url) gtkwave
16
+ cd gtkwave
17
+ git checkout $(python3 ${src_path}/_tools.py --tool gtkwave --field git-commit)
18
+
19
+ args=
20
+ if [ ! -z ${PREFIX} ]; then
21
+ args=--prefix="$PREFIX"
22
+ fi
23
+
24
+ cd gtkwave3-gtk3
25
+
26
+ ./autogen.sh
27
+ ./configure --enable-gtk3 $args
28
+ make -j$(nproc)
29
+ sudo make install
File without changes
@@ -14,12 +14,18 @@ sudo apt-get install -y build-essential cmake git pkg-config \
14
14
  mkdir -p deps
15
15
  cd deps
16
16
 
17
+ python3 -m venv .surelog --clear
18
+ . .surelog/bin/activate
19
+ python3 -m pip install --upgrade pip
20
+ python3 -m pip install cmake
21
+ python3 -m pip install orderedmultidict
22
+
17
23
  git clone $(python3 ${src_path}/_tools.py --tool surelog --field git-url) surelog
18
24
  cd surelog
19
25
  git checkout $(python3 ${src_path}/_tools.py --tool surelog --field git-commit)
20
26
  git submodule update --init --recursive
21
27
 
22
28
  make -j$(nproc)
23
- sudo make install
29
+ sudo -E PATH="$PATH" make install
24
30
 
25
31
  cd -
@@ -10,7 +10,13 @@ cd deps
10
10
 
11
11
  sudo apt-get install -y curl
12
12
 
13
- curl -sSL https://get.haskellstack.org/ | sh
13
+ haskell_args=""
14
+ if [ ! -z ${PREFIX} ]; then
15
+ haskell_args="-d $PREFIX"
16
+ export PATH="$PREFIX:$PATH"
17
+ fi
18
+
19
+ curl -sSL https://get.haskellstack.org/ | sh -s - -f $haskell_args
14
20
 
15
21
  git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
16
22
  cd sv2v
@@ -461,3 +461,25 @@ def get_hashed_filename(path, package=None, hash=hashlib.sha1):
461
461
  pathhash = hash(path_to_hash.encode('utf-8')).hexdigest()
462
462
 
463
463
  return f'{filename}_{pathhash}{ext}'
464
+
465
+
466
+ def get_cores(chip, physical=False):
467
+ '''
468
+ Get max number of cores for this machine.
469
+
470
+ Args:
471
+ physical (boolean): if true, only count physical cores
472
+ '''
473
+
474
+ cores = psutil.cpu_count(logical=not physical)
475
+
476
+ if not cores:
477
+ cores = os.cpu_count()
478
+ if physical and cores:
479
+ # assume this is divide by 2
480
+ cores = int(cores / 2)
481
+
482
+ if not cores or cores < 1:
483
+ cores = 1
484
+
485
+ return cores
@@ -0,0 +1,67 @@
1
+ import logging
2
+ import sys
3
+
4
+
5
+ class LoggerFormatter(logging.Formatter):
6
+ def __init__(self, log_formatprefix, level_fmt, message_fmt):
7
+ self.__formats = {}
8
+
9
+ self.add_format(None, log_formatprefix + level_fmt, message_fmt)
10
+ for level in [logging.DEBUG,
11
+ logging.INFO,
12
+ logging.WARNING,
13
+ logging.ERROR,
14
+ logging.CRITICAL]:
15
+ self.add_format(level, log_formatprefix + level_fmt, message_fmt)
16
+
17
+ def format(self, record):
18
+ log_fmt = self.__formats.get(record.levelno)
19
+ if not log_fmt:
20
+ log_fmt = self.__formats.get(None)
21
+ formatter = logging.Formatter(log_fmt)
22
+ return formatter.format(record)
23
+
24
+ def add_format(self, level, level_format, message_format):
25
+ if level == logging.CRITICAL:
26
+ self.__formats[level] = level_format + message_format
27
+ else:
28
+ self.__formats[level] = level_format + " " + message_format
29
+
30
+
31
+ class ColorStreamFormatter(LoggerFormatter):
32
+ '''
33
+ Apply color to stream logger
34
+ '''
35
+ blue = u"\u001b[34m"
36
+ yellow = u"\u001b[33m"
37
+ red = u"\u001b[31m"
38
+ bold_red = u"\u001b[31;1m"
39
+ reset = u"\u001b[0m"
40
+
41
+ def __init__(self, log_formatprefix, level_fmt, message_fmt):
42
+ super().__init__(log_formatprefix, level_fmt, message_fmt)
43
+
44
+ # Replace with colors
45
+ for level, color in [(logging.DEBUG, ColorStreamFormatter.blue),
46
+ (logging.WARNING, ColorStreamFormatter.yellow),
47
+ (logging.ERROR, ColorStreamFormatter.red),
48
+ (logging.CRITICAL, ColorStreamFormatter.bold_red)]:
49
+ if color:
50
+ fmt = log_formatprefix + color + level_fmt + ColorStreamFormatter.reset
51
+ else:
52
+ fmt = log_formatprefix + level_fmt
53
+
54
+ self.add_format(level, fmt, message_fmt)
55
+
56
+ @staticmethod
57
+ def supports_color(handler):
58
+ if not isinstance(handler, logging.StreamHandler):
59
+ return False
60
+
61
+ supported_platform = sys.platform != 'win32'
62
+ try:
63
+ is_a_tty = hasattr(handler.stream, 'isatty') and handler.stream.isatty()
64
+ except: # noqa E722
65
+ is_a_tty = False
66
+
67
+ return supported_platform and is_a_tty
@@ -5,6 +5,7 @@ from siliconcompiler.tools.openroad import screenshot as openroad_screenshot
5
5
  from siliconcompiler.tools.vpr import show as vpr_show
6
6
  from siliconcompiler.tools.vpr import screenshot as vpr_screenshot
7
7
  from siliconcompiler.tools.yosys import screenshot as yosys_screenshot
8
+ from siliconcompiler.tools.gtkwave import show as gtkwave_show
8
9
 
9
10
 
10
11
  def setup(chip):
@@ -29,3 +30,5 @@ def setup(chip):
29
30
 
30
31
  chip.register_showtool('v', yosys_screenshot)
31
32
  chip.register_showtool('vg', yosys_screenshot)
33
+
34
+ chip.register_showtool('vcd', gtkwave_show)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: siliconcompiler
3
- Version: 0.29.1
3
+ Version: 0.29.3
4
4
  Summary: A compiler framework that automates translation from source code to silicon.
5
5
  Author-email: Andreas Olofsson <andreas.d.olofsson@gmail.com>
6
6
  License: Apache License 2.0
@@ -38,7 +38,7 @@ Requires-Dist: psutil>=5.8.0
38
38
  Requires-Dist: Pillow==10.4.0; python_version <= "3.8"
39
39
  Requires-Dist: Pillow==11.1.0; python_version >= "3.9"
40
40
  Requires-Dist: GitPython==3.1.44
41
- Requires-Dist: lambdapdk>=0.1.44
41
+ Requires-Dist: lambdapdk>=0.1.46
42
42
  Requires-Dist: PyGithub==2.5.0
43
43
  Requires-Dist: urllib3>=1.26.0
44
44
  Requires-Dist: fasteners==0.19
@@ -46,7 +46,7 @@ Requires-Dist: fastjsonschema==2.21.1
46
46
  Requires-Dist: docker==7.1.0
47
47
  Requires-Dist: importlib_metadata; python_version < "3.10"
48
48
  Requires-Dist: sc-surelog==1.84.1
49
- Requires-Dist: orjson==3.10.13
49
+ Requires-Dist: orjson==3.10.15
50
50
  Requires-Dist: streamlit==1.40.1; python_version <= "3.8"
51
51
  Requires-Dist: streamlit==1.41.1; python_version >= "3.9" and python_full_version != "3.9.7"
52
52
  Requires-Dist: streamlit_agraph==0.0.45; python_full_version != "3.9.7"
@@ -58,15 +58,15 @@ Requires-Dist: pytest==8.3.4; extra == "test"
58
58
  Requires-Dist: pytest-xdist==3.6.1; extra == "test"
59
59
  Requires-Dist: pytest-timeout==2.3.1; extra == "test"
60
60
  Requires-Dist: pytest-asyncio==0.24.0; python_version <= "3.8" and extra == "test"
61
- Requires-Dist: pytest-asyncio==0.25.1; python_version >= "3.9" and extra == "test"
61
+ Requires-Dist: pytest-asyncio==0.25.2; python_version >= "3.9" and extra == "test"
62
62
  Requires-Dist: pytest-cov==5.0.0; python_version <= "3.8" and extra == "test"
63
63
  Requires-Dist: pytest-cov==6.0.0; python_version >= "3.9" and extra == "test"
64
- Requires-Dist: responses==0.25.3; extra == "test"
64
+ Requires-Dist: responses==0.25.6; extra == "test"
65
65
  Requires-Dist: PyVirtualDisplay==3.0; extra == "test"
66
66
  Provides-Extra: lint
67
67
  Requires-Dist: flake8==7.1.1; extra == "lint"
68
68
  Requires-Dist: tclint==0.5.0; extra == "lint"
69
- Requires-Dist: codespell==2.3.0; extra == "lint"
69
+ Requires-Dist: codespell==2.4.0; extra == "lint"
70
70
  Provides-Extra: docs
71
71
  Requires-Dist: Sphinx==8.1.3; extra == "docs"
72
72
  Requires-Dist: pip-licenses==5.0.0; extra == "docs"
@@ -76,9 +76,9 @@ Provides-Extra: profile
76
76
  Requires-Dist: gprof2dot==2024.6.6; extra == "profile"
77
77
  Provides-Extra: examples
78
78
  Requires-Dist: migen==0.9.2; extra == "examples"
79
- Requires-Dist: lambdalib==0.3.2; extra == "examples"
79
+ Requires-Dist: lambdalib==0.3.3; extra == "examples"
80
80
  Provides-Extra: optimizer
81
- Requires-Dist: google-vizier[jax]==0.1.20; python_version >= "3.10" and extra == "optimizer"
81
+ Requires-Dist: google-vizier[jax]==0.1.21; python_version >= "3.10" and extra == "optimizer"
82
82
 
83
83
  ![SiliconCompiler](https://raw.githubusercontent.com/siliconcompiler/siliconcompiler/main/docs/_static/sc_logo_with_text.png)
84
84