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

Subversion Repositories hd44780_driver

[/] [hd44780_driver/] [trunk/] [tb_lcd_driver_hd44780_module.do] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jodb
# Filename:     tb_lcd_driver_hd44780_module.do
2
# Filetype:     Modelsim Script File
3
# Date:         66 oct 2012
4
# Update:       -
5
# Description:  Script File For Automatic Simulation
6
# Author:       J. op den Brouw
7
# State:        Demo
8
# Error:        -
9
# Version:      1.1alpha
10
# Copyright:    (c)2012, De Haagse Hogeschool
11
 
12
# This ModelSim command file houses all commands for tracing
13
# the LCD Module Driver.
14
 
15
# Set transcript on
16
transcript on
17
 
18
# Recreate the work directory and map to work
19
if {[file exists rtl_work]} {
20
        vdel -lib rtl_work -all
21
}
22
vlib rtl_work
23
vmap work rtl_work
24
 
25
# Find out if we're started through Quartus or by hand
26
# (or by using an exec in the Tcl window in Quartus).
27
# Quartus has the annoying property that it will start
28
# Modelsim from a directory called "simulation/modelsim".
29
# The design and the testbench are located in the project
30
# root, so we've to compensate for that.
31
if [ string match "*simulation/modelsim" [pwd] ] {
32
        set prefix "../../"
33
        puts "Running Modelsim from Quartus..."
34
} else {
35
        set prefix ""
36
        puts "Running Modelsim..."
37
}
38
 
39
# Compile the LCD VHDL description and testbench,
40
# please note that the design and its testbench is located
41
# in the project root, but the simulator start in directory
42
# /simulation/modelsim, so we have to compensate
43
# for that.
44
vcom -2008 -work work ${prefix}lcd_driver_hd44780_module.vhd
45
vcom -2008 -work work ${prefix}tb_lcd_driver_hd44780_module.vhd
46
 
47
# Start the simulator with 1 ns time resolution
48
vsim -t 1ns -L rtl_work -L work -voptargs="+acc" tb_lcd_driver_hd44780_module
49
 
50
# Log all signals in the design, good if the number
51
# of signals is small.
52
add log -r *
53
 
54
# Add all toplevel signals
55
# Add a number of signals of the simulated design
56
#add list *
57
 
58
# Add all toplevel signals
59
# Add a number of signals of the simulated design
60
add wave -divider "SYSTEM"
61
add wave clk
62
add wave areset
63
add wave -divider "Inputs"
64
add wave init
65
add wave cls
66
add wave home
67
add wave goto10
68
add wave goto20
69
add wave goto30
70
add wave wr
71
add wave data
72
add wave -divider "Internals"
73
add wave lcdm/current_state
74
add wave lcdm/return_state
75
add wave lcdm/delay_counter
76
add wave lcdm/use_bf_int
77
add wave trace
78
add wave -divider "Outputs"
79
add wave busy
80
add wave LCD_E
81
add wave LCD_RW
82
add wave LCD_RS
83
add wave LCD_DB
84
 
85
# Open Structure, Signals (waveform) and List window
86
view structure
87
#view list
88
view signals
89
view wave
90
 
91
# Run simulation for ...
92
# Note: 60 ms is sufficient using Busy Flag reading.
93
run 160 ms
94
 
95
# Fill up the waveform in the window
96
wave zoom full

powered by: WebSVN 2.1.0

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