https://open-source-silicon.dev logo
#openlane
Title
# openlane
h

Hieu Bui

11/26/2021, 7:28 AM
Does anyone have problems with editing the drc.tcl in Openlane? I am trying to change srcripts/magic/drc.tcl in openlane source tree but I do not see any change in the log file. Furthermore, I added the code to bypass the DRC checks on SRAM cells but it did not take any effect also. This is the code that I added to drc.tcl:
Copy code
diff --git a/scripts/magic/drc.tcl b/scripts/magic/drc.tcl
index 5019f2c..d253a36 100755
--- a/scripts/magic/drc.tcl
+++ b/scripts/magic/drc.tcl
@@ -11,7 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
+puts stdout "Hello world\n"
 if { [info exist ::env(MAGIC_DRC_USE_GDS)] && $::env(MAGIC_DRC_USE_GDS) } {
        gds read $::env(CURRENT_GDS)
 } else {
@@ -32,6 +32,8 @@ set cell_name $::env(DESIGN_NAME)
 magic::suspendall
 puts stdout "\[INFO\]: Loading $cell_name\n"
 flush stdout
+puts stdout "\[INFO\]: Hello world\n"
+flush stdout
 load $cell_name
 select top cell
 drc euclidean on
v

Vijayan Krishnan

11/26/2021, 7:55 AM
is magic drc enabled? set ::env(MAGIC_DRC_USE_GDS) "1"
h

Hieu Bui

11/26/2021, 8:55 AM
Yes, it is set by default.
I found out the problem. It is set in the caravel makefile that map $OPENLANE_ROOT to /openLANE_flow into the docker image while /openlane is the directory in the image. Therefore, the flow will always execute openlane included in the image. To run openlane with the source code in $OPENLANE_ROOT, we have to change the makefile to map OPENLANE_ROOT into /openlane in the docker image.
Copy code
diff --git a/openlane/Makefile b/openlane/Makefile
index d1ac633..bdea26e 100644
--- a/openlane/Makefile
+++ b/openlane/Makefile
@@ -51,7 +51,8 @@ endif
                -u $(shell id -u $(USER)):$(shell id -g $(USER)) \
                $(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_INTERACTIVE_COMMAND);\
        else\
-               docker run -it -v $(OPENLANE_ROOT):/openLANE_flow \
+               docker run -it -v $(OPENLANE_ROOT):/openlane \
                -v $(PDK_ROOT):$(PDK_ROOT) \
                -v $(PWD)/..:/project \
                -v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \
m

Matthew Guthaus

11/26/2021, 5:22 PM
The mount point for OpenLane is wrong
Comment on that and maybe they'll fix it
👍 1