diff --git a/.gitignore b/.gitignore index c6cac56fd..fe21942d0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ testsBP/*/*/*.elf* testsBP/*/OBJ/* testsBP/*/*.a wally-pipelined/linux-testgen/linux-testvectors/* +wally-pipelined/linux-testgen/nohup* !wally-pipelined/linux-testgen/linux-testvectors/tvCopier.py !wally-pipelined/linux-testgen/linux-testvectors/tvLinker.sh wally-pipelined/regression/slack-notifier/slack-webhook-url.txt diff --git a/wally-pipelined/linux-testgen/logAllBuildroot.sh b/wally-pipelined/linux-testgen/logAllBuildroot.sh index df8b506a8..d045ee98c 100755 --- a/wally-pipelined/linux-testgen/logAllBuildroot.sh +++ b/wally-pipelined/linux-testgen/logAllBuildroot.sh @@ -24,4 +24,4 @@ # =========== Just Do the Thing ========== # Uncomment this version for the whole thing # - Logs info needed by buildroot testbench -(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2>&1 >/dev/null | pv -l | ./parse_qemu.py | ./parse_gdb_output.py "/courses/e190ax/buildroot_boot/") & riscv64-unknown-elf-gdb -x gdbinit_qemulog +(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2>&1 >/dev/null | ./parse_qemu.py | ./parse_gdb_output.py "/courses/e190ax/buildroot_boot_new/") & riscv64-unknown-elf-gdb -x gdbinit_qemulog diff --git a/wally-pipelined/linux-testgen/parse_gdb_output.py b/wally-pipelined/linux-testgen/parse_gdb_output.py index 739a97e31..7e48fa637 100755 --- a/wally-pipelined/linux-testgen/parse_gdb_output.py +++ b/wally-pipelined/linux-testgen/parse_gdb_output.py @@ -44,7 +44,7 @@ try: instrs += 1 storeAMO = '' if instrs % 10000 == 0: - print(instrs) + print(instrs,flush=True) # Instr in human assembly wPC.write('{} ***\n'.format(' '.join(l.split(':')[1].split()[0:2]))) if '\tld' in l or '\tlw' in l or '\tlh' in l or '\tlb' in l: @@ -63,6 +63,15 @@ try: storeLoc = readLoc storeReg = l.split()[-1].split(',')[1] storeAMO = l.split()[-2] + if '\tlr' in l: + currentRead = l.split()[-1].split(',')[0] + readOffset = "0" + readLoc = l.split()[-1].split('(')[1][:-1] + readType = "0" # *** I don't see that readType or lastReadType are ever used; we can probably get rid of them + if '\tsc' in l: + storeOffset = "0" + storeLoc = l.split()[-1].split('(')[1][:-1] + storeReg = l.split()[-1].split(',')[1] if '\tsd' in l or '\tsw' in l or '\tsh' in l or '\tsb' in l: s = l.split('#')[0].split()[-1] storeReg = s.split(',')[0]