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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [sim/] [top/] [sim_lin.do] - Blame information for rev 60

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

Line No. Rev Author Line
1 60 ash_riple
quit -sim
2
 
3
vlib altera
4
vdel -lib altera -all
5
vlib work
6
vdel -lib work -all
7
 
8
vlib altera
9
# compile vendor dependent files
10
vlog -work altera altera_mf.v
11
 
12
vlib work
13
# compile vendor independent files
14
vlog -work work ../../rtl/top/ha1588.v +initreg+0
15
vlog -work work ../../rtl/reg/reg.v +initreg+0
16
vlog -work work ../../rtl/rtc/rtc.v +initreg+0
17
vlog -work work ../../rtl/tsu/tsu.v +initreg+0
18
vlog -work work ../../rtl/tsu/ptp_queue.v +initreg+0
19
vlog -work work ../../rtl/tsu/ptp_parser.v +initreg+0
20
 
21
# compile testbench files
22
vlog -work work -sv ha1588_tb.v
23
 
24
# compile nic driver bfm files
25
vlog -work work -sv nic_drv_bfm/gmii_rx_bfm.v
26
vlog -work work -sv nic_drv_bfm/gmii_tx_bfm.v
27
 
28
# compile ptp driver bfm files
29
vlog -work work -sv ptp_drv_bfm/ptp_drv_bfm.v
30
 
31
# compile driver bfm files
32
# Sytemverilog DPI steps to combine sv and c
33
# step 1: generate dpiheader.h
34
vlog -work work -sv -dpiheader dpiheader.h ptp_drv_bfm/ptp_drv_bfm.v
35
## step 2: generate ptp_drv_bfm.obj
36
#vsim -dpiexportobj ptp_drv_bfm_sv ptp_drv_bfm
37
# step 3: generate ptp_drv_bfm_c.so
38
exec gcc -c -fPIC -I $::env(MODEL_TECH)/../include ptp_drv_bfm/ptp_drv_bfm.c
39
# step 4: generate ptp_drv_bfm_c.o
40
exec gcc -shared -Bsymbolic -o ptp_drv_bfm_c.so ptp_drv_bfm.o
41
 
42
vsim -novopt \
43
     -L altera \
44
     -sv_lib ptp_drv_bfm_c \
45
     -t ps \
46
     ha1588_tb
47
 
48
log -r */*
49
radix -hexadecimal
50
do wave.do
51
 
52
run 50000ns

powered by: WebSVN 2.1.0

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