Skip to content

Commit

Permalink
target: Update trace generation
Browse files Browse the repository at this point in the history
* target: Replace `LOGS_DIR` with `SIM_DIR`
  • Loading branch information
colluca committed Aug 31, 2024
1 parent 82ff0f4 commit 43fb1c1
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions target/sim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ TARGET = occamy_top
CVA6_TXT_TRACE = $(LOGS_DIR)/trace_hart_00000.txt
CVA6_PERF_DUMP = $(LOGS_DIR)/hart_00000_perf.json
CVA6_ANNOTATED_TRACE = $(LOGS_DIR)/trace_hart_00000.s
CVA6_BINARY ?= $(shell cat $(SIM_DIR)/.rtlbinary)
TXT_TRACES += $(CVA6_TXT_TRACE)
PERF_DUMPS += $(CVA6_PERF_DUMP)
ANNOTATED_TRACES += $(CVA6_ANNOTATED_TRACE)
Expand Down Expand Up @@ -469,28 +470,17 @@ $(PLATFORM_HEADERS_DIR)/occamy_base_addr.h: $(CFG)
# Traces #
##########

CVA6_BINARY ?= $(shell cat $(LOGS_DIR)/.rtlbinary)

CVA6_TXT_TRACE = $(LOGS_DIR)/trace_hart_00000.txt
CVA6_PERF_TRACE = $(LOGS_DIR)/hart_00000_perf.json
CVA6_ANNOTATED_TRACE = $(LOGS_DIR)/trace_hart_00000.s
CVA6_DIFF_TRACE = $(LOGS_DIR)/trace_hart_00000.diff

TXT_TRACES += $(CVA6_TXT_TRACE)
PERF_TRACES += $(CVA6_PERF_TRACE)
ANNOTATED_TRACES += $(CVA6_ANNOTATED_TRACE)
DIFF_TRACES += $(CVA6_DIFF_TRACE)

traces: $(CVA6_TXT_TRACE) $(CVA6_PERF_TRACE)
traces: $(CVA6_TXT_TRACE) $(CVA6_PERF_DUMP)
annotate: $(CVA6_ANNOTATED_TRACE)

$(CVA6_TXT_TRACE): $(SIM_DIR)/trace_hart_0.log
cp $< $@

# CVA6 traces require different handling
$(CVA6_PERF_TRACE): $(CVA6_TXT_TRACE) $(EVENTS_PY)
$(CVA6_PERF_DUMP): $(CVA6_TXT_TRACE) $(EVENTS_PY)
$(PYTHON) $(EVENTS_PY) -f cva6 $< -o $@
$(CVA6_ANNOTATED_TRACE): $(CVA6_TXT_TRACE) $(ANNOTATE_PY)
$(PYTHON) $(ANNOTATE_PY) $(ANNOTATE_FLAGS) -o $@ $(CVA6_BINARY) $<
$(CVA6_DIFF_TRACE): $(CVA6_TXT_TRACE) $(ANNOTATE_PY)
$(PYTHON) $(ANNOTATE_PY) $(ANNOTATE_FLAGS) -o $@ $(CVA6_BINARY) $< -d

############
# Questasim #
Expand Down

0 comments on commit 43fb1c1

Please sign in to comment.