From c7923d8899566d33bfcea900c1d4cdc104062c15 Mon Sep 17 00:00:00 2001 From: nayiri-k Date: Thu, 8 Jun 2023 14:56:42 -0700 Subject: [PATCH] use klayout for sky130-openroad tutorial, update conda install directions so that openroad/klayout installs don't fail --- docs/VLSI/Sky130-OpenROAD-Tutorial.rst | 25 +++++++++++++++++++------ vlsi/example-openroad.yml | 11 ++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/VLSI/Sky130-OpenROAD-Tutorial.rst b/docs/VLSI/Sky130-OpenROAD-Tutorial.rst index 6777bb79..1b380835 100644 --- a/docs/VLSI/Sky130-OpenROAD-Tutorial.rst +++ b/docs/VLSI/Sky130-OpenROAD-Tutorial.rst @@ -50,7 +50,7 @@ Prerequisites * Yosys (synthesis), install `using conda `__ or `from source `__ * OpenROAD (place-and-route), install `using conda `__ (note that GUI is disabled in conda package) or `from source `__ - * KLayout (DEF to GDSII conversion), install `using conda `__ or `from source `__ + * KLayout (DEF to GDSII conversion, DRC), install `using conda `__ or `from source `__ * Magic (DRC), , install `using conda `__ or `from source `__ * NetGen (LVS), , install `using conda `__ or `from source `__ @@ -67,6 +67,10 @@ Note that we create a new conda environment for each tool because some of them h .. code-block:: shell + # channel settings so openroad/klayout install properly + conda config --set channel_priority true + conda config --add channels defaults + # download all files for Sky130A PDK conda create -c litex-hub --prefix ~/.conda-sky130 open_pdks.sky130a=1.0.399_0_g63dbde9 # clone the SRAM22 Sky130 SRAM macros @@ -78,6 +82,10 @@ Note that we create a new conda environment for each tool because some of them h conda create -c litex-hub --prefix ~/.conda-klayout klayout=0.28.5_98_g87e2def28 conda create -c litex-hub --prefix ~/.conda-signoff magic=8.3.376_0_g5e5879c netgen=1.5.250_0_g178b172 + # revert conda settings + conda config --set channel_priority strict + conda config --remove channels defaults + Initial Setup ------------- In the Chipyard root, ensure that you have the Chipyard conda environment activated. Then, run: @@ -118,7 +126,7 @@ Add the following YAML keys to the top of this file to specify the location of t example-openroad.yml ^^^^^^^^^^^^^^^^^^^^ This contains the Hammer configuration for the OpenROAD tool flow. -It selects tools for synthesis (Yosys), place and route (OpenROAD), DRC (Magic), and LVS (NetGen). +It selects tools for synthesis (Yosys), place and route (OpenROAD), DRC (KLayout or Magic), and LVS (NetGen). Add the following YAML keys to the top of this file to specify the locations of the tool binaries. Note that this is not required if the tools are already on your PATH. @@ -129,7 +137,8 @@ Note that this is not required if the tools are already on your PATH. # tool binary paths synthesis.yosys.yosys_bin: ~/.conda-yosys/bin/yosys par.openroad.openroad_bin: ~/.conda-openroad/bin/openroad - par.openroad.klayout_bin: ~/.conda-klayout/bin/klayout + par.openroad.klayout_bin: ~/.conda-klayout/bin/klayout # binary that OpenROAD calls for final GDS writeout + drc.klayout.klayout_bin: ~/.conda-klayout/bin/klayout # binary that runs for DRC step drc.magic.magic_bin: ~/.conda-signoff/bin/magic lvs.netgen.netgen_bin: ~/.conda-signoff/bin/netgen @@ -237,10 +246,14 @@ DRC & LVS As a note, this tutorial has been run extensively through commercial signoff tools, thus the open-source signoff flow is not stable or guaranteed to produce useful results. -We welcome any contributions to improving both our `Magic tool plugin `__ +We welcome any contributions to improving our `KLayout tool plugin `__, +`Magic tool plugin `__, and `Netgen tool plugin `__. -To run DRC & LVS in Magic & Netgen, respectively: +We recommend KLayout for DRC to produce readable results, but Magic may be selected in ``example-openroad.yml`` +by uncommenting the line ``vlsi.core.drc_tool: "hammer.drc.magic"``. + +To run DRC & LVS and view the results: .. code-block:: shell @@ -259,7 +272,7 @@ Note that in ``sky130-openroad.yml`` we have set the following YAML keys: These keys cause the Hammer plugin to only generate all necessary scripts, without executing them with the respective tool. This is because Magic and Netgen, as of the writing of this tutorial, do not have a database format that may be loaded interactively, so to view the DRC/LVS results for debugging you must launch the tool interactively, then run DRC/LVS checks, -which is done by the ``generated-scripts/view_[drc|lvs]`` scripts. +which is done by the ``generated-scripts/view_[drc|lvs]`` scripts. This is not the case for KLayout, which does have a loadable database format. VLSI Flow Control diff --git a/vlsi/example-openroad.yml b/vlsi/example-openroad.yml index 28889799..1f96d603 100644 --- a/vlsi/example-openroad.yml +++ b/vlsi/example-openroad.yml @@ -1,10 +1,11 @@ # Tool options. Replace with your tool plugin of choice. vlsi.core.build_system: make -# Yosys +# Synthesis: Yosys vlsi.core.synthesis_tool: "hammer.synthesis.yosys" -# OpenROAD +# Place-and-Route: OpenROAD vlsi.core.par_tool: "hammer.par.openroad" -# Magic -vlsi.core.drc_tool: "hammer.drc.magic" -# Netgen +# DRC: KLayout or Magic (comment other one out) +vlsi.core.drc_tool: "hammer.drc.klayout" +# vlsi.core.drc_tool: "hammer.drc.magic" +# LVS: Netgen vlsi.core.lvs_tool: "hammer.lvs.netgen"