setup of X-Fab PDK to avoid tcl errors while opening the schematic from dialog box in layouteditor
User LayoutEditorFull Wednesday 6th January 2021
I'm using paid version and getting this error while opening schematic on the terminal.
tcl error 'couldn't open "./XFABlib.defs": no such file or directory' when running /test/LayoutEditor/xh035/stdformats/v6_6/iPDK/v6_6_2_1/PRIMLIB_4121/autoLoad.file
I'm opning on cloud. While one user is able to do it correclty in his area with no error. For another user we are getting this error.
Please let us know the reason. Settings are same at both the places. like lib.defs etc.
User LayoutEditorFull Wednesday 6th January 2021
Also getting these along with tcl
ERROR ( getComponents): Unable to open library TECH_XH035 at path TECH_XH035.oa: Invalid Lib Path.
ERROR ( getComponents): Unable to open library PRIMLIB at path PRIMLIB.oa: Invalid Lib Path.
Jürgen LayoutEditorFull Wednesday 6th January 2021
X-Fab PDK require to have some setup files in the working folder and needs the LayoutEditor to be started from this working folder:
```
cd /to/my/working_folder
layout
```
Required files are *display.drf*, *lib.defs*, *ProjectSettings.tcl*, *strmInOut.layertable* and *XFABlib.defs*. A template for these files for different libCodes is shipped with each PDK under the folder *ckit/4121* (or what ever libCode you need).
Furthermore X-Fab PDK required to be set the **FTK_KIT_DIR** environment variable. In cases you don't set it, the LayoutEditor will set it for you to *~/LayoutEditor* on Linux systems and to */c/LayoutEditor* or */d/LayoutEditor* on Windows system. These are the default locations of the installed PDK. It seems that you don't have installed the PDK at the default location. So you need to set it manual, in you case by a call:
```
export FTK_KIT_DIR=/test/LayoutEditor
```
From the next update (or the current development version of the LayoutEditor), you will also need a *autoLoadMacro.layout* file in the working folder to get the automatic schematic-to-GDS and RTL-to-GDS flow running. This file is shipped with the LayoutEditor package under *macros/layout-macro/Utilities/Technology/X-FAB/*.
This macro will perform the required setting in the LayoutEditor, which is now done by the installer script. These settings are required:
```cpp
setup::lefCellBoundaryLayer=62;
setup::openAccessBoundary=62;
setup::autoLoadLayerFiles=true;
setup::openAccessMapLayerNames=true;
setup::gdsMapLayer=false;
setup::oasisMapLayer=false;
setup::placeModeForPCB=false;
```
User LayoutEditorFull Wednesday 6th January 2021
se OpenAccess library path /opt/synopsys/plat_linux_gcc483_64/3rd/oa/lib/linux_rhel40_gcc483_64/opt
start: /opt/layout/bin/layout
tcl error 'couldn't open "./XFABlib.defs": no such file or directory' when running /LayoutEditor/xh035/stdformats/v6_6/iPDK/v6_6_2_1/PRIMLIB_4121/autoLoad.file
Getting same error even when changing to actual path from /test/LayoutEditor to /LayoutEditor . I just made test to check the other way.
Also all required files lib.defs, display.drf, settings.tcl all are present in the path.
Same files are present in other user area and its working fine there. We just oved to cloud and facing issue here. For 1 user its fine whle for another it has issue. While we have common path for /opt/ and LayoutEditor in root ..... only invoking part is user specific in there specific area on local machine.
Jürgen LayoutEditorFull Wednesday 6th January 2021
The default path is *~/LayoutEditor* with a leading *~* . On Linux system that is the home folder of the current user. So the default path is for example */home/my_account/LayoutEditor*
User LayoutEditorFull Wednesday 6th January 2021
ERROR ( getComponents): Unable to open library TECH_XH035 at path TECH_XH035.oa: Invalid Lib Path.
tcl error 'couldn't open "./XFABlib.defs": no such file or directory' when running /home/bittoo/LayoutEditor/xh035/stdformats/v6_6/iPDK/v6_6_2_1/PRIMLIB_4121/autoLoad.file
ERROR (getComponents ): Unable to open library TECH_XH035 at path TECH_XH035.oa: Invalid Lib Path.
ERROR ( getComponents): Unable to open library TECH_XH035 at path TECH_XH035.oa: Invalid Lib Path.
ERROR ( getComponents): Unable to open library PRIMLIB at path PRIMLIB.oa: Invalid Lib Path.
Still the same error
Jürgen LayoutEditorFull Wednesday 6th January 2021
How did you start the LayoutEditor? Did you call *layout* after cd into the working folder?
In this case *layout* wiill point to */usr/bin/layout* which will link to */opt/layout/start*. Incorrect and causing this error would be to call */op/layout/bin/layout* as the FTK_KIT_DIR variable is set in the *start* script.
Please also add these two lines into the autoLoad.file of your PDK at line 28 before the line starting with *set XFABPDK_KERNEL_ROOT*:
```
puts "\$FTK_KIT_DIR is $env(FTK_KIT_DIR)"
puts "the current path is [pwd]"
```
The first line will output the setting of the environment variable FTK_KIT_DIR and should output */home/bittoo/LayoutEditor*.
The second one prints the current path you have started the LayoutEditor from and should point to the folder containing the XFABlib.defs file. So in result you should get a output like this:
```
start: /opt/layout/bin/layout
$FTK_KIT_DIR is /home/bittoo/LayoutEditor
the current path is /home/bittoo/LayoutEditor/xh035/stdformats/v6_6/iPDK/v6_6_2_1/ckit/3022
#--------------------------------------------
#
# Loading XFAB PDK components
# generic O.K
# basic O.K
# exports O.K
# custom O.K
# cdf O.K
# xh035 O.K
#
#--------------------------------------------
#
# Technology xh035
# Version v6_6_2_1
# LibCode 3022
# Core MOSLT
# Metal Metal4
#
#--------------------------------------------
user customized code can be inserted into "/mnt/ssd/thies/LayoutEditor/xh035/stdformats/v6_6/iPDK/v6_6_2_1/ckit/3022/.xfabrc" and will be auto-loaded at subsequent start up
```