Merge pull request #130 from efabless/kareefardi-patch-2

assert OPENLANE_ROOT ne to cup/openlane
diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml
index d3e9f0c..0377c64 100644
--- a/.github/workflows/user_project_ci.yml
+++ b/.github/workflows/user_project_ci.yml
@@ -35,13 +35,13 @@
 
       - name: Tarball PDK
         run: |
-          tar -cf /tmp/sky130A.tar -C $PDK_ROOT/sky130A .
+          tar -cf /tmp/pdk.tar -C $PDK_ROOT .
 
       - name: Upload PDK Tarball
         uses: actions/upload-artifact@v2
         with:
           name: pdk-tarball
-          path: /tmp/sky130A.tar
+          path: /tmp/pdk.tar
 
 
   mpw_precheck:
@@ -72,9 +72,9 @@
 
       - name: Unpack PDK Tarball
         run: |
-          sudo mkdir -p ${{ env.PDK_ROOT }}/sky130A
+          sudo mkdir -p ${{ env.PDK_ROOT }}
           sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
-          tar -xf /tmp/sky130A.tar -C $PDK_ROOT/sky130A .
+          tar -xf /tmp/pdk.tar -C $PDK_ROOT .
       - name: Run MPW-Precheck
         run: |
           export INPUT_DIRECTORY=$(pwd)
@@ -99,7 +99,7 @@
           path: |
             /home/runner/work/caravel_user_project/caravel_user_project/mpw_precheck_result/logs/*
 
-  user_project_flow:
+  user_project_flow_sky130A:
     timeout-minutes: 720
     runs-on: ubuntu-latest
     needs: [pdk]
@@ -115,6 +115,9 @@
       - name: Export PDK ROOT
         run: echo "PDK_ROOT=/home/runner/work/pdk" >> $GITHUB_ENV
 
+      - name: Export PDK
+        run: echo "PDK=sky130A" >> $GITHUB_ENV
+
       - name: Export OPENLANE ROOT
         run: echo "OPENLANE_ROOT=/home/runner/work/caravel_user_project/openlane" >> $GITHUB_ENV
 
@@ -126,9 +129,9 @@
 
       - name: Unpack PDK Tarball
         run: |
-          sudo mkdir -p ${{ env.PDK_ROOT }}/sky130A
+          sudo mkdir -p ${{ env.PDK_ROOT }}
           sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
-          tar -xf /tmp/sky130A.tar -C $PDK_ROOT/sky130A .
+          tar -xf /tmp/pdk.tar -C $PDK_ROOT .
 
       - name: Install dependencies
         run: |
@@ -157,3 +160,65 @@
           make verify-la_test2-gl 
           make verify-mprj_stimulus-gl 
           make verify-wb_port-gl
+
+  user_project_flow_sky130B:
+    timeout-minutes: 720
+    runs-on: ubuntu-latest
+    needs: [pdk]
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+
+      - name: Export PDK ROOT
+        run: echo "PDK_ROOT=/home/runner/work/pdk" >> $GITHUB_ENV
+
+      - name: Export PDK
+        run: echo "PDK=sky130B" >> $GITHUB_ENV
+
+      - name: Export OPENLANE ROOT
+        run: echo "OPENLANE_ROOT=/home/runner/work/caravel_user_project/openlane" >> $GITHUB_ENV
+
+      - name: Download PDK Tarball
+        uses: actions/download-artifact@v2
+        with:
+          name: pdk-tarball
+          path: /tmp
+
+      - name: Unpack PDK Tarball
+        run: |
+          sudo mkdir -p ${{ env.PDK_ROOT }}
+          sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
+          tar -xf /tmp/pdk.tar -C $PDK_ROOT .
+
+      - name: Install dependencies
+        run: |
+          make install
+          make install_mcw
+          make openlane
+          make simenv
+
+      - name: Harden using Openlane
+        run: |
+          make user_proj_example
+          make user_project_wrapper
+
+      - name: Run DV RTL tests
+        run: |
+          make verify-io_ports-rtl 
+          make verify-la_test1-rtl 
+          make verify-la_test2-rtl 
+          make verify-mprj_stimulus-rtl 
+          make verify-wb_port-rtl
+
+      - name: Run DV GL tests
+        run: |
+          make verify-io_ports-gl 
+          make verify-la_test1-gl 
+          make verify-la_test2-gl 
+          make verify-mprj_stimulus-gl 
+          make verify-wb_port-gl
\ No newline at end of file
diff --git a/Makefile b/Makefile
index ba36e31..c9c8594 100644
--- a/Makefile
+++ b/Makefile
@@ -25,12 +25,14 @@
 export PDK_MAGIC_COMMIT=7d601628e4e05fd17fcb80c3552dacb64e9f6e7b
 export OPENLANE_TAG=2022.02.23_02.50.41
 export MISMATCHES_OK=1
-export PDKPATH?=$(PDK_ROOT)/sky130A
-export PDK?=sky130A
+export PDKPATH?=$(PDK_ROOT)/sky130B
 
 # Install lite version of caravel, (1): caravel-lite, (0): caravel
 CARAVEL_LITE?=1
 
+# PDK switch varient
+export PDK?=sky130B
+
 MPW_TAG ?= mpw-6c
 
 ifeq ($(CARAVEL_LITE),1)
diff --git a/docs/source/index.rst b/docs/source/index.rst
index e756a3f..90a41d9 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -171,6 +171,9 @@
 
     # set PDK_ROOT to the path you wish to use for the pdk
     export PDK_ROOT=<pdk-installation-path>
+    
+    # set the PDK variant depending on your shuttle, if you don't know leave it as default
+    export PDK=sky130B
 
     # use volare to download the pdk
     # To change the default pdk version you can export OPEN_PDKS_COMMIT=<pdk_commit>
diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst
index 3ca86c0..3236a49 100644
--- a/docs/source/quickstart.rst
+++ b/docs/source/quickstart.rst
@@ -36,43 +36,29 @@
 ---------------------
 
 
-#. To start the project you need to first create an empty Git project on Github and make sure your repo is public and includes a README
+#. To start the project you first need to create a new repository based on the `caravel_user_project <https://github.com/efabless/caravel_user_project/>`_ template and make sure your repo is public and includes a README.
 
-#.  Open your Terminal. Create an empty folder to use as your Caravel workspace, and navigate to it.
+   *   Follow https://github.com/efabless/caravel_user_project/generate to create a new repository.
+   *   Clone the reposity using the following command:
 
     .. code:: bash
 
-        # Create a directory and call it anything you want
-        mkdir -p caravel_tutorial
-
-        # navigate into the directory
-        cd caravel_tutorial
-	
-#.  Clone caravel_user_project and setup the git environment as follows
-
-    .. code:: bash
-
-        # Make sure that "caravel_example" matches the empty github repo name in step 1
-        git clone -b mpw-6b https://github.com/efabless/caravel_user_project caravel_example
-        cd caravel_example
-        git remote rename origin upstream
-
-        # You need to put your empty github repo URL from step 1
-        git remote add origin <your github repo URL>
-
-        # Create a new branch, you can name it anything 
-        git checkout -b <my_branch>
-        git push -u origin <my_branch>
+        git clone -b mpw-6c  <your github repo URL> caravel_example
 	
 #.  Now that your git environment is setup, it's time to setup your local environment by running.
 
     .. code:: bash
     
+	cd caravel_example
+
     	# make sure to change <directory_name> with the directory you created in step 2
 	# in this case it is caravel_tutorial
-	export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
 	
+	export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
 	export PDK_ROOT=~/<directory_name>/pdks # you need to export this whenever you start a new shell
+	
+	# export the PDK variant depending on your shuttle, if you don't know leave it to the default
+	export PDK=sky130B
 
         make setup
 
@@ -131,7 +117,7 @@
         make precheck
         make run-precheck
 
-#. You are done! now go to www.efabless.com to submit your project!
+#. You are done! now go to https://efabless.com/open_shuttle_program/ to submit your project!
    
    
 .. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
diff --git a/openlane/user_proj_example/config.tcl b/openlane/user_proj_example/config.tcl
index c9266ee..b216984 100755
--- a/openlane/user_proj_example/config.tcl
+++ b/openlane/user_proj_example/config.tcl
@@ -13,7 +13,7 @@
 # limitations under the License.
 # SPDX-License-Identifier: Apache-2.0
 
-set ::env(PDK) "sky130A"
+set ::env(PDK) $::env(PDK)
 set ::env(STD_CELL_LIBRARY) "sky130_fd_sc_hd"
 
 set script_dir [file dirname [file normalize [info script]]]
diff --git a/openlane/user_project_wrapper/config.tcl b/openlane/user_project_wrapper/config.tcl
index f720e39..f0d44fa 100755
--- a/openlane/user_project_wrapper/config.tcl
+++ b/openlane/user_project_wrapper/config.tcl
@@ -16,7 +16,7 @@
 # Base Configurations. Don't Touch
 # section begin
 
-set ::env(PDK) "sky130A"
+set ::env(PDK) $::env(PDK)
 set ::env(STD_CELL_LIBRARY) "sky130_fd_sc_hd"
 
 # YOU ARE NOT ALLOWED TO CHANGE ANY VARIABLES DEFINED IN THE FIXED WRAPPER CFGS