Quick Synopsys Synthesis and Simulator Setup

Here is the step-by-step procedure to get Synopsys quickly to work:

0) This is located at http://bear.ces.cwru.edu/eecs_318/

1) Make a directory in your home directory. For example, SYNOPSYS
   mkdir ~/SYNOPSYS

2) Within this directory you must have a directory call WORK.
   This directory is used by Synopsys tools to hold temporary values.
   mkdir ~/SYNOPSYS/WORK

3) Now, the tools need two setup files within the SYNOPSYS directory

3.1) "~/SYNOPSYS/.synopsys_dc.setup" is required to run dc_shell
properly

----BEGIN-----------.synopsys_dc.setup--------------------------------
company = "Case Western Reserve University" ;
designer = "Francis G. Wolff";

/* ------------------------------------------------------------- */
/* Setup SEARCH_PATH to point to the library installation area   */
/* containing the appropriate symbol and synthesis libraries.    */
/* ------------------------------------------------------------- */

search_path = { . ./WORK /home2/synopsys/synthesis/libraries/syn }
/* analyze -lib WORK -format vhdl file.vhd */
/* The default for -lib is define_design_lib */
define_design_lib WORK -path ./WORK

target_library = { class.db }

/* file types end in db: .db and .sldb (=.sl + db) */
link_library = { class.db }

/* file types: .sdb (.s + db) */

/* symbol_library = { class.sdb } */
view_background = "blue";
symbol_library = { class.sdb generic.sdb }
net_name_layer.visible= false
pin_name_layer.visible= false
plot_command = "lpr -Polin404"
----END-----------.synopsys_dc.setup--------------------------------



3.2) "~/SYNOPSYS/.synopsys_vss.setup" is required to run
the simulation properly
----BEGIN-----------.synopsys_vss.setup--------------------------------
--Unix commands to show setup:
--       /home2/synsopsys/sparcOS5/sim/bin/show_vss_setup
--       /home2/synsopsys/sparcOS5/sim/bin/show_setup
--
WORK            > DEFAULT
DEFAULT         : ./WORK
TIMEBASE            = ns
----END-----------.synopsys_dc.setup--------------------------------

4) The Synopsys also requires a shell setup file. This setup
file requires that you use "cshell". If your shell is different
than shell then (a) either change your Unix shell by the "chsh"
command, or (b) Start another shell by typing "/usr/bin/csh".
Remember that .* files are hidden, to view them type "ls -a".

The following file is required in your home directory
----BEGIN-----------.cshrc--------------------------------

set history=300 savehist=300
set path=( . /usr/ucb /bin /usr/bin /usr/local/bin /usr/ccs/bin )
set path=( ${path} /usr/local/sbin /usr/sbin /sbin )
set path=( ${path} /usr/bin/X11 /usr/X/bin /usr/X/demo )
# solaris paths
set path=( ${path} /usr/dt/bin /usr/openwin/bin
/usr/dt/appconfig/netscape )

umask 077
set prompt="cshell-${user}@`hostname`:${cwd}> "
setenv TERM vt100
setenv PRINTER olin404

if( ${?prompt} ) then
      alias setprompt 'set prompt = "cshell-${user}@`hostname`:$cwd> "'
#     The following displays only the tail of the path
#     alias setprompt 'set prompt = "cshell-${user}@`hostname`:$cwd:t> "'
      alias cd 'cd \!* ; setprompt'
      alias pushd 'pushd \!* ; setprompt'
      alias popd 'popd \!* ; setprompt'
      setprompt
endif

# required by g++ compiler, runtime sharable libraries
setenv LD_LIBRARY_PATH
/usr/local/lib:/usr/local/X11/lib:/usr/local/lib/X11
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/dt/lib:/usr/openwin/lib

# require by make CC default
#setenv CC /usr/local/bin/gcc

setenv LM_LICENSE_FILE 27000@vlsi.ces.cwru.edu
setenv SYNOPSYS /home2/synopsys/synthesis

if -d $SYNOPSYS then
  #
  # Setup environment for Synopsys tools
  #
  # Solaris: ln -s /usr/openwin/lib /usr/lib/X11
  #          need /home/usrs/wolff/.Xdefaults
  #          need /home/users/wolff/.synopsys_vss.setup
  #          need /home/users/wolff/.synopsys_dc.setup
  #

  source $SYNOPSYS/admin/setup/environ.csh

  # Synopsys Online Documentation: sold
  set path = ( ${path} ${SYNOPSYS} )
  set path = ( ${path} ${SYNOPSYS}/${ARCH}/bin )
  set path = ( ${path} ${SYNOPSYS}/${ARCH}/license/bin )
  setenv MANPATH ${MANPATH}:${SYNOPSYS}/doc/license/man

  # design_analyzer, dc_shell, fpga_shell, bc_shell
  set    path = ( ${path} ${SYNOPSYS}/${ARCH}/syn/bin )
  setenv MANPATH ${MANPATH}:${SYNOPSYS}/doc/syn/man
  setenv MANPATH ${MANPATH}:${SYNOPSYS}/doc/pt/man

  # designware
  set    path = ( ${path} ${SYNOPSYS}/${ARCH}/dware/bin )

  set    path = ( ${path} ${SYNOPSYS}/${ARCH}/pc/bin )
  setenv MANPATH ${MANPATH}:${SYNOPSYS}/doc/pc/man

  setenv MANPATH ${MANPATH}:${SYNOPSYS}/doc/motif/man

  setenv SIMWAVEHOME ${SYNOPSYS}/${ARCH}/ssi
  set    path = ( ${path} ${SYNOPSYS}/${ARCH}/ssi/bin )

  set path = ( ${path} ${SYNOPSYS}/${ARCH}/vhmc/bin )

  #
  # Synopsys version 1999.10 includes gcc
  #      --> /home2/synopsys/sparcOS5/gcc/gcc-2.6.3/lib/gcc-lib/
  #
  #setenv GCC_EXEC_PREFIX /usr/local/bin/gcc

  echo ".cshrc information: $SYNOPSYS is mounted"
else
  echo ".cshrc warning:     $SYNOPSYS is not mounted"
endif

setenv SYNOPSYS_SIM /home2/synopsys/simulation
if -d $SYNOPSYS_SIM then
  # vhdlan, vhdldbx, vhdlsim (event-based simulators)
  source $SYNOPSYS_SIM/admin/setup/environ.csh
  echo ".cshrc information: $SYNOPSYS_SIM is mounted"

  # Setup environment for Cyclone RTL cycle-based simulator
  #
  #source $SYNOPSYS/admin/setup/snps_cy.setup
else
  echo ".cshrc warning:     $SYNOPSYS_SIM is not mounted"
endif

alias  ls ls -aF
alias  m  more
----END-----------.cshrc--------------------------------

5) To run and test dc_shell copy the following
into ~/SYNOPSYS/generic_mux.vhd

----BEGIN-----------generic_mux.vhd--------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;

-- General format Dest, Src1, Src2, ...

entity generic_mux is
  generic (n:     integer   := 8 -- number of normal inputs -- highest
index
          );


  port (F:    out std_logic_vector(n-1 downto 0);
        X0:   in  std_logic_vector(n-1 downto 0);
        X1:   in  std_logic_vector(n-1 downto 0);
        S:    in  std_logic_vector(0 downto 0)
  );
end;

architecture generic_mux_arch of generic_mux is

begin
     WITH S SELECT
     F <= X1 WHEN "1",
          X0 WHEN OTHERS;

end;

configuration generic_mux_cfg of generic_mux is
  for generic_mux_arch 
  end for;
end generic_mux_cfg;
----END-----------generic_mux.vhd--------------------------------

6) SYNTHESIS (script based)
   (a) First open up a cshell window using the .cshrc script
   (b) All design must done in the SYNOPSYS directory and
       NOT outside.

   (c) cd ~/SYNOPSYS
   (d) dc_shell
   (e) analyze -f vhdl generic_mux.vhd
   (f) elaborate generic_mux -arch generic_mux_arch -update

       Note: elaborate works on the entity name of the file
       read in in step (e). The -arch is the name of the
       architecture declared in the file.
   (g) uniquify
   (h) compile
   (i) write -hierarchy
   (j) quit

7) VIEWING LOGIC (GUI based synthesis)
   (a) cd ~/SYNOPSYS
   (b) design_analyzer
   (c) read => generic_mux.db
   (d) double click on icon until logic is displayed

8) SIMULATION (script based)
   Simulation is separate of synthesis. It is not required to do
   synthesis to do simulation.
   (a) cd ~/SYNOPSYS

   (b) vhdlan -NOEVENT generic_mux.vhd

   (c) vhdlsim generic_mux_cfg
       Note: generic_mux_cfg is NOT a filename but the name
       of the configuration file declared in the file in step (b)

   (d) ls
       Note: display vhdl objects

   (e) cd GENERIC_MUX
       Note: go inside generic_mux object

   (f) ls -t
       Note: display the port and signals and their types
       of generic_mux

   (g) ls -v
       Note: display their current values

   (h) help ls
       Note: display help information for the ls command

   (i) assign "0" S
       Note: assign std_logic_vector of 1 bit to signal S

   (j) assign "00100100" X0

   (k) assign "00001111" X1

   (l) ls -v
         N               8
         F               X"??"
         X0              X"24"
         X1              X"0F"
         S               X"0"  
         _P0             (no value)

   (m) run
   (n) ls -v
         N               8
         F               X"24"
         X0              X"24"
         X1              X"0F"
         S               X"0"  
         _P0             (no value)

       NOTE: which is what we expect for a 8-bit datapath mux
             with S=0 and X0==>F
   (o) quit

9) SIMULATION (GUI based)
   (a) cd ~/SYNOPSYS

   (b) vhdlan -NOEVENT generic_mux.vhd

   (c) vhdldbx generic_mux_cfg
       Note: generic_mux_cfg is NOT a filename but the name
       of the configuration file declared in the file in step (b)

   (d-n) Can do all the same steps as script based vhdlsim.

   (o) quit

10) For further Synopsys notes see
    (a) CWRU EECS VLSI CAD Group
    (b) EECS 318 CAD Design Class

Best Wishes. Francis G. Wolff, fxw12@po.cwru.edu