Skip to content

Commit

Permalink
Merge pull request #37 from opencompl/christos/makefile-deps
Browse files Browse the repository at this point in the history
Add Makefile dependency to trace file generation
  • Loading branch information
compor authored Oct 20, 2023
2 parents ff482d9 + c8b5e84 commit f71adcc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 0 additions & 8 deletions kernels/Makefile.kernels
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ LOG_DIR = $<.logs
%.x: %.o main.o data.o
$(LD) $(LDFLAGS) $^ -o $@

sim_%: %
rm -rf $(LOG_DIR) && mkdir -p $(LOG_DIR)
cd $(LOG_DIR)
$(VLTSIM) ../$<
mv logs/* .
rm -rf logs
cd --

RUN = $(addprefix run_, $(TESTS))
$(RUN): run_%: sim_%

Expand Down
12 changes: 12 additions & 0 deletions snitch/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@ MLIROPTFLAGS += --reconcile-unrealized-casts

# Trace rules

sim_%: %.logs/trace_hart_00000000.dasm


.PRECIOUS: %.logs/trace_hart_00000000.dasm
%.logs/trace_hart_00000000.dasm: %
rm -rf $(LOG_DIR) && mkdir -p $(LOG_DIR)
cd $(LOG_DIR)
$(VLTSIM) ../$<
mv logs/* .
rm -rf logs
cd --

%.trace.txt %.trace.json: %.dasm
$(DASM) < $< | $(GENTRACE) --permissive -d $*.trace.json > $*.trace.txt

Expand Down

0 comments on commit f71adcc

Please sign in to comment.