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

Subversion Repositories ha1588

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

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

powered by: WebSVN 2.1.0

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