Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Traces #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hw/ip/spatz_cc/src/spatz_cc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ module spatz_cc
// pragma translate_off
int f;
string fn;
logic [63:0] cycle;
logic [63:0] cycle= '0;

initial begin
// We need to schedule the assignment into a safe region, otherwise
Expand Down
12 changes: 6 additions & 6 deletions util/Makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ work-vcs/compile.sh: ${VSIM_SOURCES} ${TB_SRCS}
########

.PHONY: traces
traces: $(shell (ls bin/logs/trace_hart_*.dasm 2>/dev/null | sed 's/\.dasm/\.txt/') || echo "")
traces: $(shell (ls logs/trace_hart_*.dasm 2>/dev/null | sed 's/\.dasm/\.txt/') || echo "")

bin/logs/trace_hart_%.txt: bin/logs/trace_hart_%.dasm ${ROOT}/util/gen_trace.py
logs/trace_hart_%.txt: logs/trace_hart_%.dasm ${ROOT}/util/gen_trace.py
$(DASM) < $< | $(PYTHON) ${ROOT}/util/gen_trace.py > $@

# make annotate
# Generate source-code interleaved traces for all harts. Reads the binary from
# the bin/logs/.rtlbinary file that is written at start of simulation in the vsim script
bin/logs/trace_hart_%.s: bin/logs/trace_hart_%.txt ${ROOT}/util/trace/annotate.py
# the logs/.rtlbinary file that is written at start of simulation in the vsim script
logs/trace_hart_%.s: logs/trace_hart_%.txt ${ROOT}/util/trace/annotate.py
$(PYTHON) ${ROOT}/util/trace/annotate.py -q -o $@ $(BINARY) $<
BINARY ?= $(shell cat bin/logs/.rtlbinary)
annotate: $(shell (ls bin/logs/trace_hart_*.dasm 2>/dev/null | sed 's/\.dasm/\.s/') || echo "")
BINARY ?= $(shell cat logs/.rtlbinary)
annotate: $(shell (ls logs/trace_hart_*.dasm 2>/dev/null | sed 's/\.dasm/\.s/') || echo "")
Loading