1 |
221 |
olivier.gi |
|
2 |
|
|
# (C) 2001-2014 Altera Corporation. All rights reserved.
|
3 |
|
|
# Your use of Altera Corporation's design tools, logic functions and
|
4 |
|
|
# other software and tools, and its AMPP partner logic functions, and
|
5 |
|
|
# any output files any of the foregoing (including device programming
|
6 |
|
|
# or simulation files), and any associated documentation or information
|
7 |
|
|
# are expressly subject to the terms and conditions of the Altera
|
8 |
|
|
# Program License Subscription Agreement, Altera MegaCore Function
|
9 |
|
|
# License Agreement, or other applicable license agreement, including,
|
10 |
|
|
# without limitation, that your use is for the sole purpose of
|
11 |
|
|
# programming logic devices manufactured by Altera and sold by Altera
|
12 |
|
|
# or its authorized distributors. Please refer to the applicable
|
13 |
|
|
# agreement for further details.
|
14 |
|
|
|
15 |
|
|
# ACDS 14.1 186 win32 2014.12.24.17:12:23
|
16 |
|
|
|
17 |
|
|
# ----------------------------------------
|
18 |
|
|
# ncsim - auto-generated simulation script
|
19 |
|
|
|
20 |
|
|
# ----------------------------------------
|
21 |
|
|
# initialize variables
|
22 |
|
|
TOP_LEVEL_NAME="pll"
|
23 |
|
|
QSYS_SIMDIR="./../"
|
24 |
|
|
QUARTUS_INSTALL_DIR="C:/altera/14.1/quartus/"
|
25 |
|
|
SKIP_FILE_COPY=0
|
26 |
|
|
SKIP_DEV_COM=0
|
27 |
|
|
SKIP_COM=0
|
28 |
|
|
SKIP_ELAB=0
|
29 |
|
|
SKIP_SIM=0
|
30 |
|
|
USER_DEFINED_ELAB_OPTIONS=""
|
31 |
|
|
USER_DEFINED_SIM_OPTIONS="-input \"@run 100; exit\""
|
32 |
|
|
|
33 |
|
|
# ----------------------------------------
|
34 |
|
|
# overwrite variables - DO NOT MODIFY!
|
35 |
|
|
# This block evaluates each command line argument, typically used for
|
36 |
|
|
# overwriting variables. An example usage:
|
37 |
|
|
# sh <simulator>_setup.sh SKIP_ELAB=1 SKIP_SIM=1
|
38 |
|
|
for expression in "$@"; do
|
39 |
|
|
eval $expression
|
40 |
|
|
if [ $? -ne 0 ]; then
|
41 |
|
|
echo "Error: This command line argument, \"$expression\", is/has an invalid expression." >&2
|
42 |
|
|
exit $?
|
43 |
|
|
fi
|
44 |
|
|
done
|
45 |
|
|
|
46 |
|
|
# ----------------------------------------
|
47 |
|
|
# initialize simulation properties - DO NOT MODIFY!
|
48 |
|
|
ELAB_OPTIONS=""
|
49 |
|
|
SIM_OPTIONS=""
|
50 |
|
|
if [[ `ncsim -version` != *"ncsim(64)"* ]]; then
|
51 |
|
|
:
|
52 |
|
|
else
|
53 |
|
|
:
|
54 |
|
|
fi
|
55 |
|
|
|
56 |
|
|
# ----------------------------------------
|
57 |
|
|
# create compilation libraries
|
58 |
|
|
mkdir -p ./libraries/work/
|
59 |
|
|
mkdir -p ./libraries/altera_ver/
|
60 |
|
|
mkdir -p ./libraries/lpm_ver/
|
61 |
|
|
mkdir -p ./libraries/sgate_ver/
|
62 |
|
|
mkdir -p ./libraries/altera_mf_ver/
|
63 |
|
|
mkdir -p ./libraries/altera_lnsim_ver/
|
64 |
|
|
mkdir -p ./libraries/cyclonev_ver/
|
65 |
|
|
mkdir -p ./libraries/cyclonev_hssi_ver/
|
66 |
|
|
mkdir -p ./libraries/cyclonev_pcie_hip_ver/
|
67 |
|
|
|
68 |
|
|
# ----------------------------------------
|
69 |
|
|
# copy RAM/ROM files to simulation directory
|
70 |
|
|
|
71 |
|
|
# ----------------------------------------
|
72 |
|
|
# compile device library files
|
73 |
|
|
if [ $SKIP_DEV_COM -eq 0 ]; then
|
74 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_primitives.v" -work altera_ver
|
75 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/220model.v" -work lpm_ver
|
76 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/sgate.v" -work sgate_ver
|
77 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_mf.v" -work altera_mf_ver
|
78 |
|
|
ncvlog -sv "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_lnsim.sv" -work altera_lnsim_ver
|
79 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cadence/cyclonev_atoms_ncrypt.v" -work cyclonev_ver
|
80 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cadence/cyclonev_hmi_atoms_ncrypt.v" -work cyclonev_ver
|
81 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cyclonev_atoms.v" -work cyclonev_ver
|
82 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cadence/cyclonev_hssi_atoms_ncrypt.v" -work cyclonev_hssi_ver
|
83 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cyclonev_hssi_atoms.v" -work cyclonev_hssi_ver
|
84 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cadence/cyclonev_pcie_hip_atoms_ncrypt.v" -work cyclonev_pcie_hip_ver
|
85 |
|
|
ncvlog "$QUARTUS_INSTALL_DIR/eda/sim_lib/cyclonev_pcie_hip_atoms.v" -work cyclonev_pcie_hip_ver
|
86 |
|
|
fi
|
87 |
|
|
|
88 |
|
|
# ----------------------------------------
|
89 |
|
|
# compile design files in correct order
|
90 |
|
|
if [ $SKIP_COM -eq 0 ]; then
|
91 |
|
|
ncvlog "$QSYS_SIMDIR/pll.vo"
|
92 |
|
|
fi
|
93 |
|
|
|
94 |
|
|
# ----------------------------------------
|
95 |
|
|
# elaborate top level design
|
96 |
|
|
if [ $SKIP_ELAB -eq 0 ]; then
|
97 |
|
|
ncelab -access +w+r+c -namemap_mixgen -relax $ELAB_OPTIONS $USER_DEFINED_ELAB_OPTIONS $TOP_LEVEL_NAME
|
98 |
|
|
fi
|
99 |
|
|
|
100 |
|
|
# ----------------------------------------
|
101 |
|
|
# simulate
|
102 |
|
|
if [ $SKIP_SIM -eq 0 ]; then
|
103 |
|
|
eval ncsim -licqueue $SIM_OPTIONS $USER_DEFINED_SIM_OPTIONS $TOP_LEVEL_NAME
|
104 |
|
|
fi
|