blob: 62833558ac8f399ab354518de96f38934fd13193 [file] [log] [blame]
;; Copyright 2019-2021 SkyWater PDK Authors
;;
;; 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
;;
;; https://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.
;;
;; This code is *alternatively* available under a BSD-3-Clause license, see
;; details in the README.md at the top level and the license text at
;; https://github.com/google/skywater-pdk-libs-sky130_bag3_pr/blob/master/LICENSE.alternative
;;
;; SPDX-License-Identifier: BSD-3-Clause OR Apache 2.0
printf("STARTING CDSINIT\n")
; load configuration skill scripts.
let( (configFileList file path saveSkillPath)
configFileList = '(
)
; paths of the configuration files.
path = strcat(
". ~ "
prependInstallPath("local ")
)
saveSkillPath=getSkillPath()
setSkillPath(path)
foreach(file configFileList
if(isFile(file) then
loadi(file)
)
)
setSkillPath(saveSkillPath)
)
; load key bindings scripts
let( (bindKeyFileList file path saveSkillPath)
bindKeyFileList = '(
"leBindKeys.il"
"schBindKeys.il"
)
; paths of key binding scripts
path = strcat(
". ~ "
prependInstallPath("local ")
prependInstallPath("samples/local")
)
saveSkillPath=getSkillPath()
setSkillPath(path)
foreach(file bindKeyFileList
if(isFile(file ) then
loadi(file)
)
)
setSkillPath(saveSkillPath)
)
sstatus(writeProtect nil)
let((skillPath)
skillPath= strcat(
". ~ " ; Current & home directory
prependInstallPath("samples/techfile ") ; sample source technology files
)
setSkillPath(skillPath)
)
;
; check CALIBRE_HOME
;
cal_home=getShellEnvVar("CALIBRE_HOME")
if( cal_home==nil then
cal_home=getShellEnvVar("MGC_HOME")
if( cal_home!=nil then
printf("// CALIBRE_HOME environment variable not set; setting it to value of MGC_HOME\n");
)
)
if( cal_home!=nil && isDir(cal_home) && isReadable(cal_home) then
; Load calibre.skl or calibre.4.3.skl, not both!
if( getShellEnvVar("MGC_CALIBRE_REALTIME_VIRTUOSO_ENABLED") &&
getShellEnvVar("MGC_REALTIME_HOME") && dbGetDatabaseType()=="OpenAccess" then
load(strcat(getShellEnvVar("MGC_REALTIME_HOME") "/lib/calibre.skl"))
else
; Load calibre.skl for Cadence versions 4.4 and greater
load(strcat(cal_home "/lib/calibre.skl"))
)
;;;;Load calibre.4.3.skl for Cadence version 4.3
;;; load(strcat(cal_home "/lib/calibre.4.3.skl"))
else
; CALIBRE_HOME is not set correctly. Report the problem.
printf("// Calibre Error: Environment variable ")
if( cal_home==nil || cal_home=="" then
printf("CALIBRE_HOME is not set.");
else
if( !isDir(cal_home) then
printf("CALIBRE_HOME does not point to a directory.");
else
if( !isReadable(cal_home) then
printf("CALIBRE_HOME points to an unreadable directory.");
)
)
)
printf(" Calibre Skill Interface not loaded.\n")
; Display a dialog box message about load failure.
hiDisplayAppDBox(
?name 'MGCHOMEErrorDlg
?dboxBanner "Calibre Error"
?dboxText "Calibre Skill Interface not loaded."
?dialogType hicErrorDialog
?dialogStyle 'modal
?buttonLayout 'Close
)
)
printf("END OF STANDARD CONFIG SETTINGS\n")
; set default editor
editor = "emacs"
envLoadFile( "./.cdsenv" )
if( isFile( ".cdsenv.personal" ) then
envLoadFile( ".cdsenv.personal" )
)
cdlOutKeys = list(nil
'incFILE "$BAG_TECH_CONFIG_DIR/calibre_setup/source.added"
)
if( isFile( ".cdsinit.personal" ) then
load(".cdsinit.personal")
)
; open library manager
ddsOpenLibManager()
;; Set Default Model Files. Note the "#;" de-selects the model call.
setModelFiles=strcat(
" " getShellEnvVar("PDK_HOME") "/MODELS/SPECTRE/" getShellEnvVar("METAL_STACK") "/Models/design_wrapper.lib.scs;tt_fet"
" " getShellEnvVar("PDK_HOME") "/MODELS/SPECTRE/" getShellEnvVar("METAL_STACK") "/Models/design_wrapper.lib.scs;tt_cell"
" " getShellEnvVar("PDK_HOME") "/MODELS/SPECTRE/" getShellEnvVar("METAL_STACK") "/Models/design_wrapper.lib.scs;tt_parRC"
" " getShellEnvVar("PDK_HOME") "/MODELS/SPECTRE/" getShellEnvVar("METAL_STACK") "/Models/design_wrapper.lib.scs;tt_rc"
" " getShellEnvVar("PDK_HOME") "/MODELS/SPECTRE/" getShellEnvVar("METAL_STACK") "/Models/design_wrapper.lib.scs;npn_t"
)
envSetVal("spectre.envOpts" "modelFiles" 'string setModelFiles)
envSetVal("spectre.envOpts" "controlMode" 'string "batch")
printf("END OF CUSTOM CONFIG SETTINGS\n")