From 77a56125b6eac54448b9577ecd8e784a74445b1f Mon Sep 17 00:00:00 2001 From: Shupei Fan Date: Thu, 31 Oct 2024 14:59:19 +0000 Subject: [PATCH] [profiler] add README.md --- profiler/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 profiler/README.md diff --git a/profiler/README.md b/profiler/README.md new file mode 100644 index 000000000..61d8e4274 --- /dev/null +++ b/profiler/README.md @@ -0,0 +1,32 @@ +# Usage + +## Prepare Prof Input Vcd + +This step is integrated into nix build flow. + +e.g., the following command will generate prof vcd for case 'codegen.vadd_vv' to directory 'result-prof-vcd' +``` +nix build --impure .#t1.blastoise.t1rocketemu.run.codegen.vadd_vv.vcs-prof-vcd -o result-prof-vcd +``` + +NOTE: only 't1rocketemu' is supported + +## Run profiler + +``` +nix run .#t1.profiler +``` + +e.g. run `nix run .#t1.profiler result-prof-vcd/*.vcd prof-result`, +the profiler will generate various analysis results in 'prof-result' directory. + +### Disassemble Support + +The profiler depends on `spike-dasm` to do disassemble and +you need to set path of 'spike-dasm' to environment variable `SPIKE_DASM` + +``` +export SPIKE_DASM=$(nix build --print-out-paths .#spike)/bin/spike-dasm +``` + +If `SPIKE_DASM` is not set, all disassembles in `inst_map.txt` become ''.