OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [altera_de0_nano_soc/] [doc/] [Terasic/] [DE0_NANO_SOC/] [Demonstrations/] [FPGA/] [my_first_fpga/] [pll_sim/] [mentor/] [msim_setup.tcl] - Blame information for rev 221

Details | Compare with Previous | View Log

Line No. Rev Author Line
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
# Auto-generated simulation script
19
 
20
# ----------------------------------------
21
# Initialize variables
22
if ![info exists SYSTEM_INSTANCE_NAME] {
23
  set SYSTEM_INSTANCE_NAME ""
24
} elseif { ![ string match "" $SYSTEM_INSTANCE_NAME ] } {
25
  set SYSTEM_INSTANCE_NAME "/$SYSTEM_INSTANCE_NAME"
26
}
27
 
28
if ![info exists TOP_LEVEL_NAME] {
29
  set TOP_LEVEL_NAME "pll"
30
}
31
 
32
if ![info exists QSYS_SIMDIR] {
33
  set QSYS_SIMDIR "./../"
34
}
35
 
36
if ![info exists QUARTUS_INSTALL_DIR] {
37
  set QUARTUS_INSTALL_DIR "C:/altera/14.1/quartus/"
38
}
39
 
40
# ----------------------------------------
41
# Initialize simulation properties - DO NOT MODIFY!
42
set ELAB_OPTIONS ""
43
set SIM_OPTIONS ""
44
if ![ string match "*-64 vsim*" [ vsim -version ] ] {
45
} else {
46
}
47
 
48
# ----------------------------------------
49
# Copy ROM/RAM files to simulation directory
50
alias file_copy {
51
  echo "\[exec\] file_copy"
52
}
53
 
54
# ----------------------------------------
55
# Create compilation libraries
56
proc ensure_lib { lib } { if ![file isdirectory $lib] { vlib $lib } }
57
ensure_lib          ./libraries/
58
ensure_lib          ./libraries/work/
59
vmap       work     ./libraries/work/
60
vmap       work_lib ./libraries/work/
61
if ![ string match "*ModelSim ALTERA*" [ vsim -version ] ] {
62
  ensure_lib                       ./libraries/altera_ver/
63
  vmap       altera_ver            ./libraries/altera_ver/
64
  ensure_lib                       ./libraries/lpm_ver/
65
  vmap       lpm_ver               ./libraries/lpm_ver/
66
  ensure_lib                       ./libraries/sgate_ver/
67
  vmap       sgate_ver             ./libraries/sgate_ver/
68
  ensure_lib                       ./libraries/altera_mf_ver/
69
  vmap       altera_mf_ver         ./libraries/altera_mf_ver/
70
  ensure_lib                       ./libraries/altera_lnsim_ver/
71
  vmap       altera_lnsim_ver      ./libraries/altera_lnsim_ver/
72
  ensure_lib                       ./libraries/cyclonev_ver/
73
  vmap       cyclonev_ver          ./libraries/cyclonev_ver/
74
  ensure_lib                       ./libraries/cyclonev_hssi_ver/
75
  vmap       cyclonev_hssi_ver     ./libraries/cyclonev_hssi_ver/
76
  ensure_lib                       ./libraries/cyclonev_pcie_hip_ver/
77
  vmap       cyclonev_pcie_hip_ver ./libraries/cyclonev_pcie_hip_ver/
78
}
79
 
80
 
81
# ----------------------------------------
82
# Compile device library files
83
alias dev_com {
84
  echo "\[exec\] dev_com"
85
  if ![ string match "*ModelSim ALTERA*" [ vsim -version ] ] {
86
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_primitives.v"                     -work altera_ver
87
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/220model.v"                              -work lpm_ver
88
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/sgate.v"                                 -work sgate_ver
89
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_mf.v"                             -work altera_mf_ver
90
    vlog -sv "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_lnsim.sv"                         -work altera_lnsim_ver
91
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/mentor/cyclonev_atoms_ncrypt.v"          -work cyclonev_ver
92
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/mentor/cyclonev_hmi_atoms_ncrypt.v"      -work cyclonev_ver
93
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/cyclonev_atoms.v"                        -work cyclonev_ver
94
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/mentor/cyclonev_hssi_atoms_ncrypt.v"     -work cyclonev_hssi_ver
95
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/cyclonev_hssi_atoms.v"                   -work cyclonev_hssi_ver
96
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/mentor/cyclonev_pcie_hip_atoms_ncrypt.v" -work cyclonev_pcie_hip_ver
97
    vlog     "$QUARTUS_INSTALL_DIR/eda/sim_lib/cyclonev_pcie_hip_atoms.v"               -work cyclonev_pcie_hip_ver
98
  }
99
}
100
 
101
# ----------------------------------------
102
# Compile the design files in correct order
103
alias com {
104
  echo "\[exec\] com"
105
  vlog "$QSYS_SIMDIR/pll.vo"
106
}
107
 
108
# ----------------------------------------
109
# Elaborate top level design
110
alias elab {
111
  echo "\[exec\] elab"
112
  eval vsim -t ps $ELAB_OPTIONS -L work -L work_lib -L altera_ver -L lpm_ver -L sgate_ver -L altera_mf_ver -L altera_lnsim_ver -L cyclonev_ver -L cyclonev_hssi_ver -L cyclonev_pcie_hip_ver $TOP_LEVEL_NAME
113
}
114
 
115
# ----------------------------------------
116
# Elaborate the top level design with novopt option
117
alias elab_debug {
118
  echo "\[exec\] elab_debug"
119
  eval vsim -novopt -t ps $ELAB_OPTIONS -L work -L work_lib -L altera_ver -L lpm_ver -L sgate_ver -L altera_mf_ver -L altera_lnsim_ver -L cyclonev_ver -L cyclonev_hssi_ver -L cyclonev_pcie_hip_ver $TOP_LEVEL_NAME
120
}
121
 
122
# ----------------------------------------
123
# Compile all the design files and elaborate the top level design
124
alias ld "
125
  dev_com
126
  com
127
  elab
128
"
129
 
130
# ----------------------------------------
131
# Compile all the design files and elaborate the top level design with -novopt
132
alias ld_debug "
133
  dev_com
134
  com
135
  elab_debug
136
"
137
 
138
# ----------------------------------------
139
# Print out user commmand line aliases
140
alias h {
141
  echo "List Of Command Line Aliases"
142
  echo
143
  echo "file_copy                     -- Copy ROM/RAM files to simulation directory"
144
  echo
145
  echo "dev_com                       -- Compile device library files"
146
  echo
147
  echo "com                           -- Compile the design files in correct order"
148
  echo
149
  echo "elab                          -- Elaborate top level design"
150
  echo
151
  echo "elab_debug                    -- Elaborate the top level design with novopt option"
152
  echo
153
  echo "ld                            -- Compile all the design files and elaborate the top level design"
154
  echo
155
  echo "ld_debug                      -- Compile all the design files and elaborate the top level design with -novopt"
156
  echo
157
  echo
158
  echo
159
  echo "List Of Variables"
160
  echo
161
  echo "TOP_LEVEL_NAME                -- Top level module name."
162
  echo
163
  echo "SYSTEM_INSTANCE_NAME          -- Instantiated system module name inside top level module."
164
  echo
165
  echo "QSYS_SIMDIR                   -- Qsys base simulation directory."
166
  echo
167
  echo "QUARTUS_INSTALL_DIR           -- Quartus installation directory."
168
}
169
file_copy
170
h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.