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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [sim/] [top/] [sim_win.do] - Blame information for rev 67

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

Line No. Rev Author Line
1 59 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_sv
37
# step 3: generate ptp_drv_bfm_c.obj
38 62 ash_riple
exec gcc -c -I $::env(MODEL_TECH)/../include ptp_drv_bfm/ptp_drv_bfm.c
39 59 ash_riple
# step 4: generate ptp_drv_bfm_c.dll
40 62 ash_riple
exec gcc -shared -Bsymbolic -o ptp_drv_bfm_c.dll ptp_drv_bfm.o \
41 59 ash_riple
    ptp_drv_bfm_sv.obj -L $::env(MODEL_TECH) -lmtipli
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.