From 628745226c23fa20379fdb36022b7b3886c7777a Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 15 Sep 2013 04:25:53 -0700 Subject: [PATCH] Use spike disassembler riscv-dis if it exists --- Makefrag | 6 ++++++ emulator/Makefile | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefrag b/Makefrag index b83f3c97..2afc2d7f 100644 --- a/Makefrag +++ b/Makefrag @@ -585,3 +585,9 @@ bs_matmul.riscv\ bs_vvadd.riscv\ bt_matmul.riscv\ bt_vvadd.riscv\ + +disasm := 2> +which_disasm := $(shell which riscv-dis) +ifneq ($(which_disasm),) + disasm := 3>&1 1>&2 2>&3 | $(which_disasm) > +endif diff --git a/emulator/Makefile b/emulator/Makefile index cf56a609..028a44e3 100644 --- a/emulator/Makefile +++ b/emulator/Makefile @@ -74,10 +74,10 @@ output: mkdir -p $@ output/%.run: output/%.hex emulator - ./emulator +dramsim +max-cycles=30000000 +loadmem=$< none 2> /dev/null + ./emulator +dramsim +max-cycles=30000000 +loadmem=$< none 2> /dev/null 2> $@ output/%.out: output/%.hex emulator - ./emulator +dramsim +max-cycles=30000000 +verbose +coremap-random +loadmem=$< none 2> $@ + ./emulator +dramsim +max-cycles=30000000 +verbose +coremap-random +loadmem=$< none $(disasm) $@ output/%.vpd: output/%.hex emulator-debug rm -rf $@.vcd && mkfifo $@.vcd