Build optimizations
Coauthor: Antigravity
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
LOG_REDIR = >&
|
LOG_REDIR = >&
|
||||||
TIME=/usr/bin/time --format "Elapsed: %E, Memory: %M KB [Swaps %W]"
|
TIME=/usr/bin/time --format "Elapsed: %E, Memory: %M KB [Swaps %W]"
|
||||||
|
|
||||||
|
# Enable ccache for Verilator compilation
|
||||||
|
export OBJCACHE = ccache
|
||||||
|
export CXX = clang++
|
||||||
|
export CC = clang
|
||||||
|
export OPT_FAST = -O1
|
||||||
|
export OPT_SLOW = -O0
|
||||||
|
|
||||||
# Makefile variables
|
# Makefile variables
|
||||||
# Use as many threads as possible while keeping 2 for IO, browsing, etc.
|
# Use as many threads as possible while keeping 2 for IO, browsing, etc.
|
||||||
# USE_PROCS = $(( $(shell nproc --all) - 2 ))
|
# USE_PROCS = $(( $(shell nproc --all) - 2 ))
|
||||||
@@ -82,7 +89,7 @@ prepare_area:
|
|||||||
@if [ ! -d $(PROJ_BASE)/logs ]; then mkdir -p $(PROJ_BASE)/logs; fi
|
@if [ ! -d $(PROJ_BASE)/logs ]; then mkdir -p $(PROJ_BASE)/logs; fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# C code generation from SystemVerilog
|
# C code generation from SystemVerilog (optional translation/lint)
|
||||||
#
|
#
|
||||||
build_sv: prepare_area $(SV_OUT)
|
build_sv: prepare_area $(SV_OUT)
|
||||||
|
|
||||||
@@ -98,9 +105,9 @@ $(SV_OUT): $(PROJ_BASE)/logs $(SV_DEPS)
|
|||||||
#
|
#
|
||||||
# C code build to generate testbench executable
|
# C code build to generate testbench executable
|
||||||
#
|
#
|
||||||
build_cpp: build_sv $(CPP_OUT)
|
build_cpp: prepare_area $(CPP_OUT)
|
||||||
|
|
||||||
$(CPP_OUT): $(SV_OUT)
|
$(CPP_OUT): $(SV_DEPS)
|
||||||
$(info #-------------------------)
|
$(info #-------------------------)
|
||||||
$(info # Building CPP ($(USE_PROCS) threads))
|
$(info # Building CPP ($(USE_PROCS) threads))
|
||||||
$(info #-------------------------)
|
$(info #-------------------------)
|
||||||
|
|||||||
Reference in New Issue
Block a user