Some work on DPI support
This commit is contained in:
parent
1486728ced
commit
cc619981f0
@ -3,28 +3,34 @@ TB ?= tb_top
|
|||||||
XVLOG ?= xvlog
|
XVLOG ?= xvlog
|
||||||
XELAB ?= xelab
|
XELAB ?= xelab
|
||||||
XSIM ?= xsim
|
XSIM ?= xsim
|
||||||
|
XSC ?= xsc
|
||||||
|
|
||||||
vpath %.sv $(PATH_SRC)
|
vpath %.sv $(PATH_SRC)
|
||||||
vpath %.svh $(PATH_SRC)
|
vpath %.svh $(PATH_SRC)
|
||||||
|
vpath %.c $(PATH_SRC)
|
||||||
|
|
||||||
INC_DIRS=$(patsubst %,-i %,$(subst :, ,$(PATH_SRC)))
|
INC_DIRS=$(patsubst %,-i %,$(subst :, ,$(PATH_SRC)))
|
||||||
DEFS=$(patsubst %,-d %,$(subst :, ,$(DEFINES)))
|
DEFS=$(patsubst %,-d %,$(subst :, ,$(DEFINES)))
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .sv .svh .sdb
|
.SUFFIXES: .sv .svh .sdb .c
|
||||||
|
|
||||||
.PHONY: all clean sim_build sim sim_gui
|
.PHONY: all clean sim_build sim sim_gui
|
||||||
|
|
||||||
all: sim
|
all: sim
|
||||||
|
|
||||||
OBJS=$(subst sv,sdb,$(SOURCES))
|
OBJS=$(subst sv,sdb,$(SOURCES))
|
||||||
|
DPI_OBJS=$(subst c,lnx64.o,$(DPI_SOURCES))
|
||||||
|
|
||||||
xsim.dir/work/%.sdb: %.sv $(INCLUDES)
|
xsim.dir/work/%.sdb: %.sv $(INCLUDES)
|
||||||
$(XVLOG) --sv --nolog $< $(INC_DIRS) $(DEFS)
|
$(XVLOG) --sv --nolog $< $(INC_DIRS) $(DEFS)
|
||||||
rm xvlog.pb
|
rm xvlog.pb
|
||||||
|
|
||||||
xsim.dir/work.$(TB)/xsim.dbg: $(addprefix xsim.dir/work/, $(OBJS))
|
xsim.dir/work/xsc/%.lnx64.o: %.c
|
||||||
$(XELAB) --nolog --debug all -Odisable_unused_removal $(TB)
|
$(XSC) --compile $<
|
||||||
|
|
||||||
|
xsim.dir/work.$(TB)/xsim.dbg: $(addprefix xsim.dir/work/, $(OBJS)) $(addprefix xsim.dir/work/xsc/, $(DPI_OBJS))
|
||||||
|
$(XELAB) --nolog --debug all -Odisable_unused_removal --sv_root xsim.dir/work/xsc/ --sv_lib $(DPI_OBJS) $(TB)
|
||||||
rm -f xelab.pb
|
rm -f xelab.pb
|
||||||
|
|
||||||
sim_build: xsim.dir/work.$(TB)/xsim.dbg
|
sim_build: xsim.dir/work.$(TB)/xsim.dbg
|
||||||
|
Loading…
Reference in New Issue
Block a user