From b884fb36c399c6ab121d6039d18685c4a7265ad1 Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Tue, 25 Apr 2023 10:59:58 -0700 Subject: [PATCH 1/5] Install required packages in conda as well --- install_conda.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_conda.sh b/install_conda.sh index 0b85fc51..713f4dc3 100755 --- a/install_conda.sh +++ b/install_conda.sh @@ -26,6 +26,10 @@ then conda install -q -y -c vlsida-eda ${tool} done + # Install required Python packages + # (This step isn't required but used to prevent possible issues) + pip3 install -r requirements.txt + conda deactivate fi From 5fe784ab14fdf0a2182a573be64d2d1735ded2fc Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Tue, 25 Apr 2023 12:50:39 -0700 Subject: [PATCH 2/5] Use for/else in custom_module_finder --- __init__.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/__init__.py b/__init__.py index ccb1c2b0..7b62645b 100644 --- a/__init__.py +++ b/__init__.py @@ -60,26 +60,26 @@ class custom_module_finder(MetaPathFinder): # Skip if the package is not openram if package_name != "openram": return None - customizable = False # Search for the module name in customizable modules from openram import OPTS for k, v in OPTS.__dict__.items(): if module_name == v: - customizable = True + break + else: + return None # Search for the custom module - if customizable: - import sys - # Try to find the module in sys.path - for path in sys.path: - # Skip this path if not directory - if not os.path.isdir(path): - continue - for file in os.listdir(path): - # If there is a script matching the custom module name, - # import it with the default module name - if file == (module_name + ".py"): - from importlib.util import spec_from_file_location - return spec_from_file_location(module_name, "{0}/{1}.py".format(path, module_name)) + import sys + # Try to find the module in sys.path + for path in sys.path: + # Skip this path if not directory + if not os.path.isdir(path): + continue + for file in os.listdir(path): + # If there is a script matching the custom module name, + # import it with the default module name + if file == (module_name + ".py"): + from importlib.util import spec_from_file_location + return spec_from_file_location(module_name, "{0}/{1}.py".format(path, module_name)) return None # Python calls meta path finders and asks them to handle the module import if # they can From cc4262ec4fc29b8cee8dd8285a84bf13a05773e1 Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Tue, 25 Apr 2023 13:17:13 -0700 Subject: [PATCH 3/5] Add links for technology examples --- PORTING.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/PORTING.md b/PORTING.md index e98871e9..d008b539 100644 --- a/PORTING.md +++ b/PORTING.md @@ -6,19 +6,24 @@ If you want to support a new technology, you will need to create: We provide two technology examples for [SCMOS] and [FreePDK45]. Each specific technology (e.g., [FreePDK45]) should be a subdirectory -(e.g., $OPENRAM_TECH/freepdk45) and include certain folders and files: -* gds_lib folder with all the .gds (premade) library cells: - * dff.gds - * sense_amp.gds - * write_driver.gds - * cell_1rw.gds - * replica\_cell\_1rw.gds - * dummy\_cell\_1rw.gds -* sp_lib folder with all the .sp (premade) library netlists for the above cells. -* layers.map -* A valid tech Python module (tech directory with \_\_init\_\_.py and tech.py) with: +(e.g., `$OPENRAM_TECH/freepdk45`) and include certain folders and files: +* `gds_lib` folder with all the `.gds` (premade) library cells: + * `dff.gds` + * `sense_amp.gds` + * `write_driver.gds` + * `cell_1rw.gds` + * `replica\_cell\_1rw.gds` + * `dummy\_cell\_1rw.gds` +* `sp_lib` folder with all the `.sp` (premade) library netlists for the above cells. +* `layers.map` +* A valid tech Python module (tech directory with `__init__.py` and `tech.py`) with: * References in tech.py to spice models * DRC/LVS rules needed for dynamic cells and routing * Layer information * Spice and supply information * etc. + + + +[FreePDK45]: https://www.eda.ncsu.edu/wiki/FreePDK45:Contents +[SCMOS]: https://www.mosis.com/files/scmos/scmos.pdf From b03184864e0903545645471119facebae2a4d53d Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Fri, 28 Apr 2023 15:13:32 -0700 Subject: [PATCH 4/5] Fix Makefile to detect if conda is installed --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 4a09922c..aedf2202 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,8 @@ INSTALL_BASE_DIRS := gds_lib mag_lib sp_lib lvs_lib calibre_lvs_lib klayout_lvs_ INSTALL_BASE := $(OPENRAM_HOME)/../technology/sky130 INSTALL_DIRS := $(addprefix $(INSTALL_BASE)/,$(INSTALL_BASE_DIRS)) -# Remove this if you don't want to use conda -USE_CONDA ?= 1 +# If conda is installed, we will use Magic from there +CONDA_DIR := $(wildcard $(TOP_DIR)/miniconda) check-pdk-root: ifndef PDK_ROOT @@ -72,7 +72,14 @@ $(OPEN_PDKS_DIR): $(SKY130_PDKS_DIR) $(SKY130_PDK): $(OPEN_PDKS_DIR) $(SKY130_PDKS_DIR) @echo "Installing open_pdks..." -ifdef USE_CONDA +ifeq ($(CONDA_DIR),"") + @cd $(PDK_ROOT)/open_pdks && \ + ./configure --enable-sky130-pdk=$(PDK_ROOT)/skywater-pdk/libraries --with-sky130-local-path=$(PDK_ROOT) && \ + cd sky130 && \ + make veryclean && \ + make && \ + make SHARED_PDKS_PATH=$(PDK_ROOT) install +else @source $(TOP_DIR)/miniconda/bin/activate && \ cd $(PDK_ROOT)/open_pdks && \ ./configure --enable-sky130-pdk=$(PDK_ROOT)/skywater-pdk/libraries --with-sky130-local-path=$(PDK_ROOT) && \ @@ -81,13 +88,6 @@ ifdef USE_CONDA make && \ make SHARED_PDKS_PATH=$(PDK_ROOT) install && \ conda deactivate -else - @cd $(PDK_ROOT)/open_pdks && \ - ./configure --enable-sky130-pdk=$(PDK_ROOT)/skywater-pdk/libraries --with-sky130-local-path=$(PDK_ROOT) && \ - cd sky130 && \ - make veryclean && \ - make && \ - make SHARED_PDKS_PATH=$(PDK_ROOT) install endif $(SRAM_LIB_DIR): check-pdk-root From 20744cdbcd2e579453a74d3a1a2e2ed36b32bb63 Mon Sep 17 00:00:00 2001 From: vlsida-bot Date: Sat, 29 Apr 2023 01:49:25 +0000 Subject: [PATCH 5/5] Bump version: 1.2.10 -> 1.2.11 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 963ed7cf..c1147005 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.10 +1.2.11