31 lines
757 B
Makefile
31 lines
757 B
Makefile
|
|
LSB_RELEASE = $(shell lsb_release -is)
|
|
LSB_VERSION = $(shell lsb_release -rs)
|
|
ifeq (${LSB_RELEASE}, Ubuntu)
|
|
ifeq ($(shell echo "${LSB_VERSION}>18.04" | bc), 1)
|
|
CC = gcc-4.8
|
|
CPP = g++-4.8
|
|
else
|
|
CC = gcc
|
|
CPP = g++
|
|
endif
|
|
else
|
|
CC = gcc
|
|
CPP = g++
|
|
endif
|
|
VCC = vcs -full64 +v2k -sverilog -LDFLAGS -Wl,--no-as-needed -cc $(CC) -cpp $(CPP)\
|
|
-P ${VERDI_HOME}/share/PLI/VCS/LINUX64/novas.tab ${VERDI_HOME}/share/PLI/VCS/LINUX64/pli.a
|
|
|
|
.PHONY: clean comp all
|
|
|
|
clean:
|
|
- rm -rf csrc simv.daidir ucli.key *.log simv
|
|
|
|
comp:
|
|
$(VCC) -debug_access+all -debug_region=cell+lib -kdb -top testbench -l compile.log -timescale=1ns/1ps -f filelist.f
|
|
|
|
sim:
|
|
- ./simv -l sim.log +fsdb+all=on +fsdb+delta +fsdbfile+./wave.fsdb -ucli -i fsdb.tcl
|
|
|
|
all: comp sim
|