1 |
16 |
arif_endro |
# $Id: modelsim.do,v 1.2 2005-03-12 04:18:38 arif_endro Exp $
|
2 |
|
|
# -----------------------------------------------------------------------------
|
3 |
|
|
# Title : ModelSim do file
|
4 |
|
|
# Project : FM Receiver
|
5 |
|
|
# -----------------------------------------------------------------------------
|
6 |
|
|
# File : ModelSim do file
|
7 |
|
|
# Author : "Arif E. Nugroho"
|
8 |
|
|
# Created :
|
9 |
|
|
# Last update :
|
10 |
|
|
# Simulators : Modelsim 6.0
|
11 |
|
|
# Synthesizers:
|
12 |
|
|
# Target :
|
13 |
|
|
# -----------------------------------------------------------------------------
|
14 |
|
|
# Description : modelsim do file
|
15 |
|
|
# -----------------------------------------------------------------------------
|
16 |
|
|
# Copyright (C) 2005 Arif E. Nugroho
|
17 |
|
|
# -----------------------------------------------------------------------------
|
18 |
|
|
|
19 |
|
|
# -----------------------------------------------------------------------------
|
20 |
|
|
#
|
21 |
|
|
# THIS SOURCE FILE MAY BE USED AND DISTRIBUTED WITHOUT RESTRICTION
|
22 |
|
|
# PROVIDED THAT THIS COPYRIGHT STATEMENT IS NOT REMOVED FROM THE FILE AND THAT
|
23 |
|
|
# ANY DERIVATIVE WORK CONTAINS THE ORIGINAL COPYRIGHT NOTICE AND THE
|
24 |
|
|
# ASSOCIATED DISCLAIMER.
|
25 |
|
|
#
|
26 |
|
|
# -----------------------------------------------------------------------------
|
27 |
|
|
#
|
28 |
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
29 |
|
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
30 |
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
31 |
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
32 |
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
33 |
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
34 |
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
35 |
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
36 |
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
37 |
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
38 |
|
|
#
|
39 |
|
|
# -----------------------------------------------------------------------------
|
40 |
|
|
|
41 |
|
|
# Destroy output window
|
42 |
2 |
arif_endro |
destroy .wave;
|
43 |
|
|
destroy .list;
|
44 |
16 |
arif_endro |
|
45 |
|
|
# Create work library
|
46 |
2 |
arif_endro |
vlib work;
|
47 |
16 |
arif_endro |
|
48 |
|
|
# Compile all source
|
49 |
2 |
arif_endro |
vcom *.vhdl;
|
50 |
16 |
arif_endro |
|
51 |
|
|
# Simulate the design
|
52 |
2 |
arif_endro |
vsim bench;
|
53 |
16 |
arif_endro |
|
54 |
|
|
# Show the output signal to wave window
|
55 |
2 |
arif_endro |
add wave /bench/clock;
|
56 |
|
|
add wave /bench/reset;
|
57 |
|
|
add wave -height 80 -scale .1 -format Analog-Step /bench/myfm/fmin
|
58 |
|
|
add wave -height 80 -scale .1 -format Analog-Step /bench/myfm/output_nco
|
59 |
|
|
add wave -height 80 -scale 1. -format Analog-Step /bench/myfm/phase_output
|
60 |
|
|
add wave -height 80 -scale .0002 -format Analog-Step /bench/myfm/mynco/myaddacc/result
|
61 |
|
|
add wave -height 80 -scale .1 -format Analog-Step /bench/myfm/loop_out
|
62 |
16 |
arif_endro |
add wave -height 80 -scale 1. -format Analog-Step /bench/myfm/dmout
|
63 |
|
|
|
64 |
|
|
|
65 |
2 |
arif_endro |
# force -freeze sim:/bench/clock 1 0, 0 {50 ns} -r 100
|
66 |
|
|
# force -freeze sim:/bench/reset 0 0
|
67 |
|
|
# run -all
|
68 |
|
|
# run 102400ns
|