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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sim/] [bin/] [Makefile] - Diff between revs 58 and 63

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 58 Rev 63
Line 581... Line 581...
VLT_SYSC_DEBUG_DEFINE = VLT_DEBUG=1
VLT_SYSC_DEBUG_DEFINE = VLT_DEBUG=1
endif
endif
 
 
# If set on the command line we build the cycle accurate model which will generate verilator-specific profiling information. This is useful for checking the efficiency of the model - not really useful for checking code or the function of the model.
# If set on the command line we build the cycle accurate model which will generate verilator-specific profiling information. This is useful for checking the efficiency of the model - not really useful for checking code or the function of the model.
ifdef VLT_ORPSOC_PROFILING
ifdef VLT_ORPSOC_PROFILING
VLT_CPPFLAGS=-g -pg
VLT_CPPFLAGS +=-pg
VLT_DEBUG_OPTIONS +=-profile-cfuncs
VLT_DEBUG_OPTIONS +=-profile-cfuncs
else
else
VLT_CPPFLAGS=-fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer -O3
#VLT_CPPFLAGS +=-fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer -O3
 
VLT_CPPFLAGS +=-fprofile-use -Wcoverage-mismatch
#VLT_CPPFLAGS=-Wall
#VLT_CPPFLAGS=-Wall
endif
endif
 
 
 
# Set VLT_IN_GDB=1 when making if going to run the cycle accurate model executable in GDB to check suspect behavior. This also removes optimisation.
 
ifdef VLT_IN_GDB
 
VLT_CPPFLAGS +=-g -O0
 
else
 
# The default optimisation flag applied to all of the cycle accurate model files
 
VLT_CPPFLAGS +=-O3
 
endif
 
 
ifdef VLT_DO_PROFILING
ifdef VLT_DO_PROFILING
VLT_CPPFLAGS=-O3 -ftest-coverage -fprofile-generate
VLT_CPPFLAGS +=-ftest-coverage -fprofile-arcs -fprofile-generate
endif
endif
 
 
# VCD Enabled by default when building, enable it at runtime
# VCD Enabled by default when building, enable it at runtime
#ifdef VCD
#ifdef VCD
VLT_FLAGS +=-trace
VLT_FLAGS +=-trace
Line 607... Line 616...
 
 
# This is the list of extra models we'll issue make commands for
# This is the list of extra models we'll issue make commands for
# Included is the SystemPerl trace model
# Included is the SystemPerl trace model
SYSC_MODELS_BUILD=$(SYSC_MODELS) $(VLT_TRACEOBJ)
SYSC_MODELS_BUILD=$(SYSC_MODELS) $(VLT_TRACEOBJ)
 
 
prepare-vlt: prepare-rtl vlt_model_links $(SIM_VLT_DIR)/Vorpsoc_top
prepare-vlt: prepare-rtl vlt-model-links $(SIM_VLT_DIR)/Vorpsoc_top
        @echo;echo "\tCycle-accurate model compiled successfully"
        @echo;echo "\tCycle-accurate model compiled successfully"
        @echo;echo "\tRun the executable with the -h option for usage instructions:";echo
        @echo;echo "\tRun the executable with the -h option for usage instructions:";echo
        $(SIM_VLT_DIR)/Vorpsoc_top -h
        $(SIM_VLT_DIR)/Vorpsoc_top -h
        @echo;echo
        @echo;echo
 
 
Line 686... Line 695...
                -e s!\$$BENCH_DIR!$(BENCH_VERILOG_DIR)!              \
                -e s!\$$BENCH_DIR!$(BENCH_VERILOG_DIR)!              \
                -e s!\$$RTL_DIR!$(RTL_VERILOG_DIR)!                  \
                -e s!\$$RTL_DIR!$(RTL_VERILOG_DIR)!                  \
                -e s!\$$BACKEND_DIR!$(BACKEND_DIR)!                  \
                -e s!\$$BACKEND_DIR!$(BACKEND_DIR)!                  \
                -e \\!^//.*\$$!d -e \\!^\$$!d;
                -e \\!^//.*\$$!d -e \\!^\$$!d;
 
 
.PHONY: vlt_model_links
.PHONY: vlt-model-links
vlt_model_links:
vlt-model-links:
# Link all the required system C model files into the verilator work dir
# Link all the required system C model files into the verilator work dir
        @echo; echo "\tLinking SystemC model source to verilator build path"; echo
        @echo; echo "\tLinking SystemC model source to verilator build path"; echo
        @if [ ! -d $(SIM_VLT_DIR) ]; then mkdir $(SIM_VLT_DIR); fi
        @if [ ! -d $(SIM_VLT_DIR) ]; then mkdir $(SIM_VLT_DIR); fi
        $(Q)cd $(SIM_VLT_DIR) && \
        $(Q)cd $(SIM_VLT_DIR) && \
        for SYSCMODEL in $(SYSC_MODELS); do \
        for SYSCMODEL in $(SYSC_MODELS); do \
Line 740... Line 749...
# To run this, first run a "make prepare-vlt VLT_DO_PROFILING=1" then do a
# To run this, first run a "make prepare-vlt VLT_DO_PROFILING=1" then do a
# "make clean" and then a "make prepare-vlt_profiled"
# "make clean" and then a "make prepare-vlt_profiled"
# This new make target copies athe results of the profiling back to the right
# This new make target copies athe results of the profiling back to the right
# paths before we create everything again
# paths before we create everything again
###############################################################################
###############################################################################
prepare-vlt-profiled: vlt_restore-profileoutput prepare-rtl vlt-model-links $(SIM_VLT_DIR)/Vorpsoc_top
.PHONY: prepare-vlt-profiled
 
prepare-vlt-profiled: $(SIM_VLT_DIR)/OrpsocMain.gcda clean vlt-restore-profileoutput prepare-rtl vlt-model-links $(SIM_VLT_DIR)/Vorpsoc_top
 
 
 
$(SIM_VLT_DIR)/OrpsocMain.gcda: $(SIM_VLT_DIR)/Vorpsoc_top-for-profiling prepare-sw-uart-printf
 
        $(MAKE) -C $(SW_DIR)/dhry dhry-nocache-O2 NUM_RUNS=200
 
        $(SIM_VLT_DIR)/Vorpsoc_top -f $(SW_DIR)/dhry/dhry-nocache-O2.or32 -v -l sim.log --crash-monitor
 
 
 
.PHONY: $(SIM_VLT_DIR)/Vorpsoc_top-for-profiling
 
$(SIM_VLT_DIR)/Vorpsoc_top-for-profiling:
 
        $(MAKE) prepare-vlt VLT_DO_PROFILING=1
 
 
 
.PHONY: vlt-restore-profileoutput
vlt-restore-profileoutput:
vlt-restore-profileoutput:
        @echo;echo "\tRestoring profiling outputs"; echo
        @echo;echo "\tRestoring profiling outputs"; echo
        $(Q)mkdir -p ../vlt
        $(Q)mkdir -p ../vlt
        $(Q)cp /tmp/*.gc* $(SIM_VLT_DIR)
        $(Q)cp /tmp/*.gc* $(SIM_VLT_DIR)
        $(Q)cp /tmp/*.gc* $(BENCH_SYSC_SRC_DIR)
        $(Q)cp /tmp/*.gc* $(BENCH_SYSC_SRC_DIR)

powered by: WebSVN 2.1.0

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