OpenCores
URL https://opencores.org/ocsvn/fixed-point-sqrt/fixed-point-sqrt/trunk

Subversion Repositories fixed-point-sqrt

[/] [fixed-point-sqrt/] [trunk/] [sim/] [simulation.tcl] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 djah
 
2
#default type
3
if { ! [info exists type] } {
4
        set type "functional";
5
}
6
 
7
#default arguments
8
if { ! [info exists infile] } {
9
        set infile "sim/vectors.txt";
10
}
11
if { ! [info exists outfile] } {
12
        set outfile "sim/results.txt";
13
}
14
if { ! [info exists sdffile] } {
15
        set sdffile "./rep/nom.sdf";
16
}
17
if { ! [info exists vcdfile] } {
18
        set vcdfile "./post_syn/nom.vcd";
19
}
20
 
21
puts "Modelsim starting $type simulation"
22
 
23
#functional simulation
24
if { ! [ string compare -nocase $type "FUNCTIONAL" ] } {
25
        vsim -gINFILE=${infile} -gOUTFILE=${outfile} -t ns -novopt work.tb(post_syn) -novopt
26
 
27
#timing simulation
28
} else {
29
        vsim -gINFILE=${infile} -gOUTFILE=${outfile} -sdfmax /tb/dut/=$sdffile -sdfnoerror -t ps -novopt work.tb(post_syn) +no_notifier
30
        vcd file $vcdfile
31
        vcd add -r /tb/dut/*
32
}
33
 
34
run -all;
35
quit -sim
36
exit
37
 

powered by: WebSVN 2.1.0

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