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

Subversion Repositories ha1588

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

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 68 ash_riple
vlog -work altera ../../par/altera/ip/dcfifo_128b_16.v
12 59 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 59 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_sv
38
# step 3: generate ptp_drv_bfm_c.obj
39 62 ash_riple
exec gcc -c -I $::env(MODEL_TECH)/../include ptp_drv_bfm/ptp_drv_bfm.c
40 59 ash_riple
# step 4: generate ptp_drv_bfm_c.dll
41 62 ash_riple
exec gcc -shared -Bsymbolic -o ptp_drv_bfm_c.dll ptp_drv_bfm.o \
42 59 ash_riple
    ptp_drv_bfm_sv.obj -L $::env(MODEL_TECH) -lmtipli
43
 
44
vsim -novopt \
45
     -L altera \
46
     -sv_lib ptp_drv_bfm_c \
47
     -t ps \
48
     ha1588_tb
49
 
50
log -r */*
51
radix -hexadecimal
52
do wave.do
53
 
54
run 50000ns

powered by: WebSVN 2.1.0

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