one place for all my love
[hwmod.git] / demo / sim / testcase1 / demo_tb_post.do
1 # compile technology libraries
2 # if you're using Quartus Web Edition combined with ModelSim-Altera you have
3 # to omit this step. ModelSim-Altera uses its own precompiled Altera technology
4 # libraries.
5
6 set SIM_LIBRARY_PATH /opt/altera8.1/quartus/eda/sim_lib
7
8 if {[file exists cyclonelib]} {
9   vdel -all -lib cyclonelib
10 }
11
12 vlib cyclonelib
13 vmap cycloneii cyclonelib
14
15 vcom -work cycloneii $SIM_LIBRARY_PATH/cycloneii_atoms.vhd
16 vcom -work cycloneii $SIM_LIBRARY_PATH/cycloneii_components.vhd
17
18 # end compile technology libraries
19
20
21 # create work library directory
22 vlib post_work
23
24 # map directory to library name "work"
25 vmap work post_work
26
27 # compile gate-level netlist
28 set NETLIST_PATH ../../quartus/simulation/modelsim
29
30 vcom -work work "$NETLIST_PATH/demo.vho"
31
32 # compile testbench
33 vcom -work work {../../src/demo_pkg.vhd}
34 vcom -work work demo_tb.vhd
35
36 # compile configuration file
37 vcom -work work config_post.vhd
38
39 # start simulation
40 vsim -t 1ps +transport_int_delays +transport_path_delays -sdftyp /uut=$NETLIST_PATH/demo_vhd.sdo -L cycloneii -L work work.conf
41
42 view -undock wave
43
44 # add signals to waveform
45 # add all testbench signals
46 add wave *
47
48 # auto-run simulation
49 run 50 us
50 wave zoomfull
51