31 lines
660 B
Makefile
31 lines
660 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 -kdb -top tb -l compile.log -timescale=1ns/1ps ./rtl/tb.sv
|
|
|
|
sim:
|
|
- ./simv -l sim.log
|
|
|
|
all: comp sim
|