#!/bin/sh
#
#

hostName=`hostname`
if [ "$hostName" == "linux04" ] ||
   [ "$hostName" == "linux05" ] ||
   [ "$hostName" == "linux005" ] ||
   [ "$hostName" == "linux007" ] ||
   [ "$hostName" == "linux008" ] ||
   [ "$hostName" == "linux009" ] ||
   [ "$hostName" == "linux010" ] ||
   [ "$hostName" == "linux011" ] ||
   [ "$hostName" == "linux012" ] ||
   [ "$hostName" == "linux013" ] ||
   [ "$hostName" == "linux014" ] ||
   [ "$hostName" == "linux015" ] ||
   [ "$hostName" == "linux016" ] ||
   [ "$hostName" == "linux017" ] ||
   [ "$hostName" == "linux018" ] ||
   [ "$hostName" == "linux019" ] ||
   [ "$hostName" == "linux020" ] ||
   [ "$hostName" == "linux021" ] ||
   [ "$hostName" == "linux022" ] ||
   [ "$hostName" == "linux023" ] ||
   [ "$hostName" == "linux024" ] ||
   [ "$hostName" == "linux025" ] ||
   [ "$hostName" == "linux026" ] ||
   [ "$hostName" == "linux027" ] ||
   [ "$hostName" == "linux028" ] ||
   [ "$hostName" == "linux029" ] ||
   [ "$hostName" == "linux06" ] ||
   [ "$hostName" == "linux07" ] ||
   [ "$hostName" == "server10" ] ||
   [ "$hostName" == "server13" ] ||
   [ "$hostName" == "server11" ] ||
   [ "$hostName" == "server12" ] ||
   [ "$hostName" == "server13" ] ||
   [ "$hostName" == "server14" ] ||
   [ "$hostName" == "server15" ] ||
   [ "$hostName" == "server16" ] ||
   [ "$hostName" == "server17" ] ||
   [ "$hostName" == "server18" ] ||
   [ "$hostName" == "layout006" ] ||
   [ "$hostName" == "mhfhckt02" ] ||
   [ "$hostName" == "mhfhckt10" ] ||
   [ "$hostName" == "mhfhckt03" ] ||
   [ "$hostName" == "mhfhlgc05" ] ||
   [ "$hostName" == "mhfhlgc10" ] ||
   [ "$hostName" == "mhfhlgc11" ] ||
   [ "$hostName" == "mhfhlgc12" ] ||
   [ "$hostName" == "linux08" ] ||
   [ "$hostName" == "linux09" ] ||
   [ "$hostName" == "linux11" ] ||
   [ "$hostName" == "linux10" ]; then
  
  #-------------------------------------------------------------------------------------------------------------------------
  #  User's Guide
  #
  #  Copy this .bashrc environment setting file to the working (design project) directory, e.g.
  #  /home/johndoe/project1, /home/johndoe/project2, ...., etc.
  #
  #  On terminal, cd to the working directory and then source the .bashrc file by typing the
  #  following at the shell prompt $:
  #  . .bashrc
  #  Note:  a space is required between "." and ".bashrc" in the above command.
  #
  #  Now all the environment variables in .bashrc file have been loaded into the current shell
  #  terminal and commands can be issued at the shell prompt $ to launch various Cadence
  #  tools, for instance, "virtuoso &" (without the quote).  Some frequently used commands are
  #  listed in this file together with corresponding environment settings.
  #
  #  You may finish the Cadence session at any time by closing the running Cadence tool.  To
  #  start up another Cadence session, just issue another Cadence command at the shell
  #  prompt $, e.g. "encounter &" (without the quote), etc. To exit the entire Cadence
  #  environment, close the terminal.  By closing the terminal, all loaded Cadence and Calibre
  #  environment variables are terminated since all of these variables are loaded and
  #  contained in the terminated shell terminal.  The benefit of sourcing .bashrc to a local shell
  #  terminal instead of setting them in the $HOME/.bashrc is that all of the loaded Cadence &
  #  Calibre environment variables don't globally affect system environment settings and
  #  therefore you can run other programs on the system normally and won't disturb the
  #  Cadence session or vice versa.
  #
  #  If you're setting up a multiuser server, create a client copy of this .bashrc file and make
  #  necessary changes accordingly, e.g. point CDS_LIC_FILE to the server's license directory
  #  as port@hostname.  Instruct users to download it to the working directory on the client
  #  machine and source the client copy before starting up any Cadence tool.
  #-------------------------------------------------------------------------------------------------------------------------
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # For proper distributed processing execution using Cadence PVS software, it requires
  # that the following is set as the first line in .bashrc
  # Note: the space between the ! and $prompt is required!
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  if (! $prompt); then
    exit
  fi
  
  ##############################################################
  # Cadence Design Systems
  #
  # Master IC CAD flow including schematic capture, simulation, layout, and verification.
  ##############################################################
  tmp_PATH=$PATH
  export PATH=/bin
  
  
  export CADHOME=/home/tools/cadence
  
  # Requied for Cadence on Linux
  export LANG=C
  
  # Set netlisting mode
  export CDS_Netlisting_Mode=Analog
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Specify a search order for .cdsenv
  #
  # Load .cdsenv in the working directory ($CWD)
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export CDS_LOAD_ENV=CWD
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # browser setup for Cadence Help
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export MOZILLA_HOME=/usr/bin/firefox
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence - IC
  #
  # IC Schematic Entry, Simulation, Layout, Verification (Diva)
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export CDS=$CADHOME/IC616
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Some of these variables are used by various other tools, e.g. foundry's PDK.
  # Set them to be safe
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export CDSDIR=$CDS
  export CDSHOME=$CDS
  export CADENCE_DIR=$CDS
  export CDS_INST_DIR=$CDS
  export CDS_ROOT=$CDS
  export CDSROOT=$CDS
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up either CDS_LIC_FILE or LM_LICENSE_FILE, but NOT both or it'll
  # take long time to search license!!!
  #
  # Set variable CDS_LIC_ONLY to ignore LM_LICENSE_FILE if it exists.
  #
  # Use absolute PATH to license.dat file instead of port@hostname
  #
  # The license server is no longer needed once all features are set to uncounted or 0
  # (unlimited use) for the FEATURE lines in license.dat.  The SERVER, VENDOR and
  # USE_SERVER lines can be safely removed from license.dat file, i.e. license.dat here
  # contains FEATURE lines only.  DO NOT START UP LICENSE SERVER DAEMON!!!
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export CDS_LIC_FILE=$CADHOME/license/license.dat
  export CDS_LIC_ONLY=1
  
  # Support for 64-bit executables (this should be set for 64-bit hosts - IMPORTANT!!!)
  export CDS_AUTO_64BIT=ALL
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Master IC PATH
  #
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export PATH=$PATH:$CDSDIR/tools/dfII/bin:$CDSDIR/tools/plot/bin
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up OA (OpenAccess)
  #
  # It is STRONGLY recommended that you DO NOT change the OA installation that
  # each tool uses because tools are tested with the version of OA shipped with the
  # particular tool such as EDI142. However, if it is necessary to use a different
  # version of OA, you can do so with one of the following approaches:
  # 1) Use the Configure utility on InstallScape to specify a different OA installation.
  # 2) Use the OA_HOME environment variable to override the default OA installation.
  #
  # DO NOT set up OA_HOME as recommended above!  Instead use the default OA
  # installed within each Cadence tool, or use Configure utility on InstallScape to
  # re-set OA back to the original default OA installation in each product such as.EDI,
  # EXT, etc. if they were ever changed.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  
  # Set up Cadence unsupported systems such as Ubuntu Linux
  export OA_UNSUPPORTED_PLAT=linux_rhel50_gcc44x
  
  # To run Virtuoso Schematic and Verilog Driven Mixed-Signal Flow,  the following
  # environment variable must be set before starting Virtuoso.
  export CDS_ENABLE_VMS=1
  
  # A new AMS Unified Netlister (AMS UNL) was introduced in IC6.1.6 ISR6. The
  # AMS UNL feature is available by default in IC6.1.6 ISR11 and is no longer
  # required to enable the AMS UNL feature for IC6.1.6 ISR11 or newer version.
  export AMS_UNL=YES
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence QRC Extraction, Advanced Analysis & Modeling (EXT)
  #
  # Note: QRC must appear in the PATH before Assura executables
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export QRC_HOME=$CADHOME/QUANTUS211
  export PATH=$PATH:$QRC_HOME/bin
  export OA_HOME=$CADHOME/QUANTUS211/oa
  # Enhance precision of QRC for DFM MOS extraction
  export QRC_MOS_LW_PRECISION=Y
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence Assura (ASSURA) - DRC. LVS, parasitic extraction
  #
  # These executables should be on the PATH after DFII executables
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export ASSURAHOME=$CADHOME/ASSURA41
  export PATH=$PATH:$ASSURAHOME/tools/bin:$ASSURAHOME/tools/assura/bin
  
  # Setting this variable enables Assura to work with PVS licenses only without
  # attempts to check-out Assura licenses first and thus speeds up execution.
  export ASSURA_USE_PVS_LICENSE=1
  
  # Set up foundry DFM PATH for Assura - XXXXX/XXXXXXX process for current project
  #export TSMC_ASU_DFM_PATH=/home/tools/PDKs/tsmc/XXXXXX/Assura/lvs_rcx/DFM
  #export TSMC_ASU_DFM_PATH=/home/tools/PDKs/tsmc/XXXXXXX/Assura/lvs_rcx/DFM
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence Analog Simulators (MMSIM) - Spectre, SpectreRF, &
  # RelXpert (Reliability Simulator)
  #
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export MMSIMHOME=$CADHOME/MMSIM151
  export PATH=$PATH:$MMSIMHOME/bin:$MMSIMHOME/tools/relxpert/bin
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence Physical Verification System, MaskCompose, & QuickView (PVS)
  #
  # K2_VIEWER_HOME must be set before Quickview is invoked. LM_LICENSE_FILE
  # is required to run any K2 product.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export K2_HOME=$CADHOME/PVS151/tools/K2
  export K2_VIEWER_HOME=$K2_HOME/Viewer
  export K2_MASKCOMPOSE_HOME=$K2_HOME/MaskCompose
  export K2_MC_DATA=$HOME/Projects
  export LM_LICENSE_FILE=$CDS_LIC_FILE
  export PATH=$PATH:$CADHOME/PVS151/bin:$CADHOME/PVS151/tools/bin:$K2_MASKCOMPOSE_HOME/bin
  export XKEYSYMDB=$CDSDIR/tools/plot/etc/XKeysymDB
  
  # Commands on terminal to launch Quickview or MaskCompose
  #k2_viewer &
  #k2_mcs &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence Digital Flow - Innovus & Incisive
  #
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Innovus Implementation System (INNOVUS) - Synthesis and P&R
  export PATH=$PATH:$CADHOME/INNOVUS151/bin
  
  # Command on terminal to launch Innovus
  # innovus &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Encounter Conformal (CONFRML) - Constraint Designer, Low Power Designer,
  # & ECO Designer
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export PATH=$PATH:$CADHOME/CONFRML151/bin
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Command on terminal to launch Confirmal with license options:
  # -xl/-gxl/-rcv/-eco/-ecogxl/-lp/-lpxl/-ccd/-ccdxl/-lpgxl/-verify;
  #  default is set to -l if no option is given.
  # example:  "lec -lp -verify -gui &" for Low Power license and Verify license
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # lec -lpgxl -verify -gui &
  
  # Encounter Diagnostics & Test (ET)
  export PATH=$PATH:$CADHOME/ET151/bin
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Command on terminal to launch ET,  or with license options: -architect/-truetime/-diag
  # commands eta, ett and ediag are equivalent to et -architect, et -truetime and et -diag
  # which invokes Encounter Test Architect,  Encounter True_time Delay Test and
  # Encounter Diagnostics, respectively.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # et &
  # eta &
  # ett &
  # ediag &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Silicon Signoff & Verification (SSV) - including Tempus Timing Signoff
  # & Voltus IC Power Integrity
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export PATH=$PATH:$CADHOME/SSV201/tools/bin
  
  # Command on terminal to launch tempus or voltus
  # tempus &
  # voltus &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Incisive Verification Platform - Digital HDL simulators
  #
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export PATH=$PATH:$CADHOME/INCISIVE142/tools/bin:$CADHOME/INCISIVE142/tools/vtools/vfault/bin
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # For 3-step (ncvlog, ncelab, and ncsim) flow to run Virtuoso AMS Designer simulator,
  # the following library path environment variable has to be set.
  #
  # For single-step (irun) running AMS simulator, LD_LIBRARY_PATH is not required.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export LD_LIBRARY_PATH=$CADHOME/INCISIVE142/tools/lib/64bit:$CADHOME/INCISIVE142/tools/lib
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up Universal Verification Methodology (UVM) Environment Variables
  #
  # uvm_home defines the path to the UVM class library
  # ml_uvm defines the path to the ml_uvm code
  # ml_seq_dir defines the path to the SystemVerilog ml_uvm_seq package for using
  # sequencer stubs
  # The SystemVerilog package ml_uvm_seq is included in the Specman installation.
  # To use it, you must add the following command-line options to your compilation flow,
  # as additional command-line arguments to irun or ncvlog :
  # irun ... ${ML_SEQ_DIR}/ml_uvm_seq.sv -incdir ${ML_SEQ_DIR}
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export uvm_home=$CADHOME/INCISIVE142/tools/uvm
  export ml_uvm=$CADHOME/INCISIVE142/tools/uvm/uvm_lib/uvm_ml/sc/ml_uvm
  export ml_seq_dir=$CADHOME/INCISIVE142/specman/src
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up the HOME Environment Variable for Incisive Verification Kits
  # Source the appropriate environment setup file (Note: a space is required
  # between . and $SOCV_KIT_HOME/env.sh)
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export SOCV_KIT_HOME=$CADHOME/INCISIVE142/kits/VerificationKit
  . $SOCV_KIT_HOME/env.sh
  
  # Command on terminal to start up Incisive Verification Kits
  # start_kit &
  
  #***********************************************************************
  # Command on terminal to launch NClaunch
  #***********************************************************************
  # nclaunch &
  
  # Command on terminal to start up Specman & SimVision
  # specman -gui &
  
  # Command on terminal to invoke Desktop Manager
  # emanager -desktop &
  
  # vplanner &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Cadence C-to-Silicon Compiler (CTOS)
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export PATH=$PATH:$CADHOME/CTOS142/bin
  
  # Command on terminal to launch CTOS
  # ctosgui &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Verification IP Product Catalog (VIPCAT)
  #
  # VIP products are configured using a GUI called PureView.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export CDN_VIP_ROOT=$CADHOME/VIPCAT113
  export CADENCE_VIP_LIC_ORDER=newrev:soc:portfolio:alacarte
  export ABVIP_ISNT_DIR=$CDN_VIP_ROOT/tools/abvip
  # In e , set SPECMAN_PATH to the location of the specific UVC directory
  export SPECMAN_PATH=$PATH:$CDN_VIP_ROOT/utils:$CDN_VIP_ROOT/packages:$CDN_VIP_ROOT/vips/enet/vr_enet
  export DENALI=$CDN_VIP_ROOT/tools/denali_64bit
  export PATH=$PATH:$DENALI/bin
  # In SV, add the UVC by including the specific VIP SV directory in the irun command:
  #irun -incdir $CDN_VIP_ROOT/vips/enet/vr_enet/sv
  
  # Command on terminal to launch PureView to configure VIP products.
  # pureview &
  
  # Encounter RTL Compiler (RC)
  export PATH=$PATH:$CADHOME/RC142/tools.lnx86/bin
  
  # Command on terminal to launch RC
  # rc -gui &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Manufacturability and Variability Sign-Off (MVS) - Litho Analyzers,
  # CMP Predictor
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  #export PATH=$PATH:$CADHOME/MVS151/tools.lnx86/bin
  
  # Commands on terminal to launch Litho Analyzers, CMP Predictor
  #lpa &
  #lea &
  # need to figure out correct license keys in license.dat for CMP Predictor
  # (current ones don't work)
  #cmms -ccp &
  #cmms -ccpo &
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Library Characterizer (Liberate)
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  #export ALTOSHOME=$CADHOME/LIBERATE141
  #export PATH=$PATH:$ALTOSHOME/bin
  #export ALTOS_64=1
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up NCSU CDK
  #
  # This is optional for educational purpose; use foundry provided PDKs
  # instead for production projects by including foundry PDKs in cds.lib
  # in the working directory.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export CDK_DIR=/home/tools/PDKs/ncsu-cdk-1.6.0.beta
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Mentor Graphics Calibre
  #
  # MGC_HOME environment variable has been deprecated in favor
  # of CALIBRE_HOME. MGC_HOME here set to CALIBRE_HOME is used
  # for Calibre RealTime.
  #
  # Use absolute PATH to license.dat instead of port@hostname
  #
  # .cdsinit in the working directory should be modified for Calibre to
  # be integrated into Virtuoso menu bar.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export hostName=`hostname`
  export MGC_HOME=$CALIBRE_HOME
  export CALIBRE_HOME=/home/tools/mentor/aoi_cal_2017.1_34.33

  export MGLS_LICENSE_FILE=/home/tools/license/calibre/$hostName/${hostName}_cali_license.dat
  
  export PATH=$PATH:$CALIBRE_HOME/bin
  export MGC_LIB_PATH=$CALIBRE_HOME/lib
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Mentor Environment Checking
  #
  # CALIBRE_OS_MSG_LEVEL variable is deprecated with the Calibre 2013.1 release.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  
  #***********************************************************************
  # Enable Calibre RealTime with Cadence Virtuoso
  #***********************************************************************
  #export MGC_CALIBRE_REALTIME_VIRTUOSO_ENABLED=1
  #export OA_PLUGIN_PATH=$MGC_HOME/shared/pkgs/icv/tools/queryskl
  #export LD_LIBRARY_PATH=$MGC_HOME/shared/pkgs/icv/tools/calibre_client/lib/64:${LD_LIBRARY_PATH}
  #export MGC_CALIBRE_REALTIME_VIRTUOSO_SAVE_MESSENGER_CELL=1
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # This variable enables Calibre Interactive to save all GUI settings including default
  # values to a runset file for future re-run
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export MGC_CALIBRE_SAVE_ALL_RUNSET_VALUES=1
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up socket connection with Virtuoso schematic or layout viewer (using default ports
  # 9199 for schematic and 9189 for layout) in the form of host:port
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  export MGC_CALIBRE_SCHEMATIC_SERVER=$hostName:9199
  export MGC_CALIBRE_LAYOUT_SERVER=$hostName:9189
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Set up foundry DFM PATH for Calibre - XXXXXXX/XXXXXXXX process for current project
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  #export TSMC_CAL_DFM_PATH=/home/tools/PDKs/tsmc/XXXXXXX/Calibre/lvs/DFM
  export TSMC_CAL_DFM_PATH=/home/tools/PDKs/tsmc/XXXXXXX/Calibre/lvs/DFM
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # The license server is no longer needed once all features are set to uncounted or 0
  # (unlimited use) for the FEATURE lines in license.dat. file.  The SERVER, VENDOR and
  # USE_SERVER lines can be safely removed from license.dat file, i.e. license.dat here
  # contains FEATURE lines only.  DO NOT START UP LICENSE SERVER DAEMON!!!
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  
  #***********************************************************************
  # Set the name of the executable for displaying PDF documentation from Calibre Help
  # menu. The default is acroread if it exists.  Make sure evince has been installed before
  # setting up the following (on Ubuntu type command "sudo apt-get install evince").
  #***********************************************************************
  export MGC_PDF_READER=evince
  
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  # Command on terminal to launch Cadence Virtuoso tools
  #
  # Adding & runs the process in the background allowing to continue using
  # the current terminal.
  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  #virtuoso &
  
  export PATH=$PATH:$tmp_PATH
  
  
  
  cmdname=`basename $0`;
  #echo $cmdname
  #tt=`which $cmdname`;
  #echo $tt
  #echo $PATH
  exec $cmdname $@
  #echo "ttt"
  #
  exit 0

else

  #
  # 1).get CADTOOL <installed_dir>
  #
  #xrdb /home/temp/ic.lnx86/tools/dfII/cdsuser/.Xdefaults
    CADTOOL=IC614_int
    #CDS_INST_DIR=`dirname $0 | sed 's/\/[a-zA-Z0-9]*$//'`
    CENTRAL_EDA_DIR=/home/tools
  
    CDS_INST_DIR=$CENTRAL_EDA_DIR/IC/$CADTOOL
    CDS_Netlisting_Mode="Analog"
  
    # Commented by ydji 2003/11/26
  
    SHLIB_PATH=${CDS_INST_DIR}/tools/lib
    VERIBIN=$CDS_INST_DIR/tools/bin
    VENV_LD_LIB_PATH=${CDS_INST_DIR}/tools/lib
    LD_LIBRARY_PATH=${CDS_INST_DIR}/tools/lib:/usr/local/lib:/usr/lib:/usr/dt/lib:/usr/ucblib:/usr/openwin/lib:/usr/X11R6/lib:/usr/X11R6/lib64:/usr/lib:/usr/openwin/lib:/usr/dt/lib:${LD_LIBRARY_PATH}
  #  CLS_CDSD_COMPATIBILITY_LOCKING=NO
    
  
  hostName=`hostname`
  
  case `uname -s` in
      "SunOS" )
    CDSHOME=$CDS_INST_DIR.sun4v
    XKEYSYMDB=$CDS_INST_DIR.sun4v/share/cdssetup/tdmX11/XKeysymDB
    MGC_HOME=/afs/pub/mentor/calibre/ss6_cal_2002.2_4
    SE_TOOLS=$CDS_INST_DIR.sun4v/tools
  
    ASSURAHOME=$CENTRAL_EDA_DIR/assura/assura313.sun4v
    MMSIMHOME=$CENTRAL_EDA_DIR/mmsim/mmsim60.sun4v
    LDVHOME=$CENTRAL_EDA_DIR/ius/ius54.sun4v
    ACVHOME=$CENTRAL_EDA_DIR/vsde/vsde41.sun4v
    ACV_ROOT=$CENTRAL_EDA_DIR/vsde/vsde41.sun4v/tools/acv
    SEVHOME=$CENTRAL_EDA_DIR/sev/sev32.sun4v
    SPRHOME=$CENTRAL_EDA_DIR/soc/soc41.sun4v
  ####################################################
  ## Add by Yudong ji#################################
  ####################################################
  #LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ACV_ROOT/common/mainwin502/stingray/lib-sunos5_optimized:$ACV_ROOT/common/mainwin502/mw/lib-sunos5_optimized:$ACV_ROOT/lib/psf:$ACV_ROOT/lib/matlab/extern/lib
  ####################################################
  
  
  #	LM_LICENSE_FILE=1717@lichost:5280@lichost
          [ -r /etc/license/lm_license_file ] && LICENSE_HOST=`cat /etc/license/lm_license_file`
          [ -r $HOME/.lm_license_file ] && LICENSE_HOST=`cat $HOME/.lm_license_file`
          LM_LICENSE_FILE=1717@$LICENSE_HOST:5280@pearl
  	HLD_LICENSE_FILE=$LM_LICENSE_FILE
          ;;
      "Linux" )
    CDSHOME=$CDS_INST_DIR
    XKEYSYMDB=$CDS_INST_DIR/share/cdssetup/tdmX11/XKeysymDB
    MGC_HOME=/home/tools/calibre/latest
    ASSURAHOME=$CENTRAL_EDA_DIR/assura/latest
    MMSIMHOME=$CENTRAL_EDA_DIR/MMSIM/latest
    QRC_HOME=$CENTRAL_EDA_DIR/ext/latest
    LDVHOME=$CENTRAL_EDA_DIR/IUS/IUS82
    AMSHOME=$CENTRAL_EDA_DIR/IUS/IUS82
  #  ACVHOME=$CENTRAL_EDA_DIR/vsde/vsde41.lnx86
  #  ACV_ROOT=$CENTRAL_EDA_DIR/vsde/vsde41.lnx86/tools/acv
  #  SEVHOME=$CENTRAL_EDA_DIR/sev/sev32.lnx86
    SPRHOME=$CENTRAL_EDA_DIR/SOC/SOC52
    SE_TOOLS=$CDS_INST_DIR/tools
    CDS_ROOT=$CDS_INST_DIR
    alias openbook='CDS_INST_DIR/tools/bin/cdsdoc & '
  	LM_LICENSE_FILE=5280@$hostName:27000@$hostName:1717@$hostName
  	HLD_LICENSE_FILE=$LM_LICENSE_FILE
          ;;
      *)
          echo "No license on this platform : `uname -s`"
          exit 1
          ;;
  esac
  	LM_LICENSE_FILE=5280@$hostName:27000@$hostName:/home/tools/license/calibre/$hostName/${hostName}_cali_license.dat
       # export CDS_LIC_ONLY=1
  	HLD_LICENSE_FILE=$LM_LICENSE_FILE
  
    CDSPATH=$CDSHOME/tools/bin:$CDSHOME/tools/dfII/bin:$CDSHOME/tools/plot/bin
    ASSURAPATH=$ASSURAHOME/tools/assura/bin
    MMSIMPATH=$MMSIMHOME/tools/bin
    ACVPATH=$ACV_ROOT/bin
    LDVPATH=$LDVHOME/tools/bin
    AMSPATH=$AMSHOME/tools/bin
    SEVPATH=$SEVHOME/bin
    SPRPATH=$SPRHOME/bin
    QRCPATH=$QRC_HOME/bin:$QRC_HOME/tools/bin
  
  ############Added by Yudong Ji At:2006/Aug/08
  ############Fixed the vsde error about libgcc_s.so.1
  #if [ "$hostName" != "mhfhlgc04" ] && [ "$hostName" != "mhfhlgc08" ]; then
  if [ "$hostName" != "mhfhlgc04" ] &&
     [ "$hostName" != "mhfhckt15" ] &&
     [ "$hostName" != "mhfhlgc12" ] &&
     [ "$hostName" != "mhfhckt05" ] &&
     [ "$hostName" != "server09" ]; then
    LD_ASSUME_KERNEL=2.4.1
  fi
    LANG=C
    export LD_ASSUME_KERNEL LANG
  #  OA_HOME=/home/tools/oa
    OA_HOME=/home/tools/IC/IC614_int/oa_v22.04.073
  ###########################################
  #### set hspice ####
    installdir=/home/tools/synopsys/hspice/latest/hspice
    ARCH=`$installdir/bin/get_arch `
    HSP_HOME=$installdir
  ###########################################
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$CDSHOME/tools/lib:$MMSIMHOME/tools/bin:$MMSIMHOME/tools/lib/32bit:$MMSIMHOME/tools/lib/64bit:$ACVHOME/tools/lib:$ACV_ROOT/lib
    PATH=$MMSIMPATH:$SE_TOOLS/bin:$SE_TOOLS/dfII/bin:$CDSPATH:$QRCPATH:$ASSURAPATH:$MMSIMPATH:$ACVPATH:$LDVPATH:$SEVPATH:$SPRPATH:$ACVHOME/tools/acv/bin:$HSP_HOME/bin:$installdir/$ARCH:$HSP_HOME/$ARCH/veriloga_utils/veriloga/include:$PATH
  if [ "$hostName" = "server08" ]; then
  CDS_AUTO_64BIT=""
  fi
  if [ "$hostName" = "server09" ]; then
  CDS_AUTO_64BIT="all"
  fi
    export PATH LM_LICENSE_FILE HLD_LICENSE_FILE MGC_HOME ASSURAHOME CDS_ROOT QRC_HOME
    export SHLIB_PATH VERIBIN VENV_LD_LIB_PATH CDS_AUTO_64BIT
    export CLS_CDSD_COMPATIBILITY_LOCKING LD_LIBRARY_PATH CDS_Netlisting_Mode CDS_INST_DIR CENTRAL_EDA_DIR CDSHOME MMSIMHOME SPRHOME SEVHOME AMSHOME LDVHOME ACVHOME ACV_ROOT OA_HOME
    
  #CDS_TECH=1P4M
  #MIM_TECH=1fF
  #PDK_INST_DIR=/home/cktcad/MSPDK/GSMC_18IBG
  #CDS_SEARCHDIR=$PDK_INST_DIR/model_menus
  #  export CDS_TECH MIM_TECH PDK_INST_DIR CDS_SEARCHDIR
    
  #
  # 2).parsing user's command
  #
     cmdname=`basename $0`;
     SYS_PROG_NAME=$cmdname;
  #
  # 3).get platform
  #
  #  echo "platform=$NAME";
  #
  # 4).make new command
  #
  
  # 5).setup on-line-help : HyperHelp viwer(Bristol Technology Inc.)
  #
  # 6).exec Debussy product
  #
  #   if [ "$cmdname" = "pearl" ]; then
  #       exec "$newname" -license Silicon_Ensemble_DSM "$@"
  #   else
         exec $cmdname $@
  #   fi
  #
  # 7).exit Debussy
  #
     exit 0

fi

