From 0eeb0cfd23e46d378391228e35e536e9fbda2dbe Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Sun, 22 Sep 2024 12:26:04 +0300 Subject: [PATCH] hotfix: TCL8_5_TM_PATH being unset causes crash --- flow.tcl | 6 +++++- scripts/openlane-1.0.1.tm | 17 +++++++++++++++++ scripts/openlane_utils-1.0.1.tm | 17 +++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 scripts/openlane-1.0.1.tm create mode 100644 scripts/openlane_utils-1.0.1.tm diff --git a/flow.tcl b/flow.tcl index 5f5054bfb..276c62de6 100755 --- a/flow.tcl +++ b/flow.tcl @@ -21,7 +21,11 @@ if { [file exists $::env(OPENLANE_ROOT)/install/env.tcl ] } { if { ! [info exists ::env(OPENROAD_BIN) ] } { set ::env(OPENROAD_BIN) openroad } -set ::env(TCL8_5_TM_PATH) "$::env(OPENLANE_ROOT)/scripts:$::env(TCL8_5_TM_PATH)" +if { [info exists ::env(TCL8_5_TM_PATH)] } { + set ::env(TCL8_5_TM_PATH) "$::env(OPENLANE_ROOT)/scripts:$::env(TCL8_5_TM_PATH)" +} else { + set ::env(TCL8_5_TM_PATH) "$::env(OPENLANE_ROOT)/scripts" +} package require openlane; # provides the utils as well proc run_placement_step {args} { diff --git a/scripts/openlane-1.0.1.tm b/scripts/openlane-1.0.1.tm new file mode 100644 index 000000000..7cc3c8b5e --- /dev/null +++ b/scripts/openlane-1.0.1.tm @@ -0,0 +1,17 @@ +# Copyright 2024 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +set scripts_dir [ file dirname [ file normalize [ info script ] ] ] +foreach file [glob $scripts_dir/tcl_commands/*.tcl] { + source $file +} diff --git a/scripts/openlane_utils-1.0.1.tm b/scripts/openlane_utils-1.0.1.tm new file mode 100644 index 000000000..3187aefac --- /dev/null +++ b/scripts/openlane_utils-1.0.1.tm @@ -0,0 +1,17 @@ +# Copyright 2024 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +set scripts_dir [ file dirname [ file normalize [ info script ] ] ] +foreach file [glob $scripts_dir/utils/*.tcl] { + source $file +}