diff --git a/kernels/Makefile.kernels b/kernels/Makefile.kernels index 9bd4146e..d69268ba 100644 --- a/kernels/Makefile.kernels +++ b/kernels/Makefile.kernels @@ -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_% diff --git a/snitch/Makefile.rules b/snitch/Makefile.rules index e35a1b2d..536c39e2 100644 --- a/snitch/Makefile.rules +++ b/snitch/Makefile.rules @@ -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