diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-04-14 00:48:58 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-04-14 00:50:26 +0200 |
commit | c2c3978db25482f2be8b3e6330bbe234692f6b4b (patch) | |
tree | 247e538146543a551f93f5da42780eaca73c8fbe /dhrystone | |
parent | 63c28e4389149a4e45d9e41d8eebe7b55b926c22 (diff) | |
download | picorv32-c2c3978db25482f2be8b3e6330bbe234692f6b4b.tar.gz picorv32-c2c3978db25482f2be8b3e6330bbe234692f6b4b.zip |
Improvements in dhrystone "make timing"
Diffstat (limited to 'dhrystone')
-rw-r--r-- | dhrystone/Makefile | 7 | ||||
-rw-r--r-- | dhrystone/testbench.v | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/dhrystone/Makefile b/dhrystone/Makefile index a4622f0..707a94f 100644 --- a/dhrystone/Makefile +++ b/dhrystone/Makefile @@ -6,9 +6,12 @@ TOOLCHAIN_PREFIX = riscv32-unknown-elf- test: testbench.exe dhry.hex vvp -N testbench.exe -timing: timing.exe dhry.hex +timing: timing.txt + grep '^##' timing.txt | gawk 'x != "" {print x,$$3-y;} {x=$$2;y=$$3;}' | sort | uniq -c | \ + gawk '{printf("%03d-%-7s %2d %-8s (%d)\n",$$3,$$2,$$3,$$2,$$1);}' | sort | cut -c13- + +timing.txt: timing.exe dhry.hex vvp -N timing.exe > timing.txt - grep '^##' timing.txt | gawk 'x != "" {print x,$$3-y;} {x=$$2;y=$$3;}' | sort | uniq -c | sort -k3 -n testbench.exe: testbench.v ../picorv32.v iverilog -o testbench.exe testbench.v ../picorv32.v diff --git a/dhrystone/testbench.v b/dhrystone/testbench.v index aa32619..a00e8f4 100644 --- a/dhrystone/testbench.v +++ b/dhrystone/testbench.v @@ -92,8 +92,8 @@ module testbench; $finish; end always @(posedge clk) begin - if (uut.decoder_trigger_q && !uut.decoder_pseudo_trigger_q) - $display("## %-s %d", uut.dbg_ascii_instr ? uut.dbg_ascii_instr : "x", uut.count_cycle); + if (uut.dbg_next) + $display("## %-s %d", uut.dbg_ascii_instr ? uut.dbg_ascii_instr : "pcpi", uut.count_cycle); end `endif endmodule |