From 23268d22e55ec36e288307065e7f4988ee17064e Mon Sep 17 00:00:00 2001 From: Kip Macsai-Goren Date: Thu, 3 Nov 2022 23:06:20 +0000 Subject: [PATCH] fixed broken instructions so make works. --- .../rv32i_m/privilege/src/WALLY-TEST-LIB-32.h | 14 ++++++++----- .../privilege/src/WALLY-uart-timeout-01.S | 20 +++++++++---------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-TEST-LIB-32.h b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-TEST-LIB-32.h index 1293d23a..454d05be 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-TEST-LIB-32.h +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-TEST-LIB-32.h @@ -1073,15 +1073,19 @@ uart_data_wait: li a4, 0x61 uart_read_LSR_IIR: lb t4, 0(t3) // save IIR before reading LSR mgith clear it -// check if t4 is the rxfifotime out interrupt if it is then read the fifo then go back and repeat this. - li t7, 6 - beq t4, t7, uart_rxfifo_timout + // check if IIR is the rxfifotimeout interrupt. if it is, then read the fifo then go back and repeat this. + li t5, 6 + beq t4, t5, uart_rxfifo_timout lb t5, 0(t2) // read LSR andi t6, t5, 0x61 // wait until all transmissions are done and data is ready bne a4, t6, uart_read_LSR_IIR + j uart_data_ready uart_rxfifo_timout: -//read the fifo until empty - j uart_read_LSR_IIR + li t4, 0x10000000 // read from the fifo + lb t5, 0(t4) + lb t5, 0(t4) + //read the fifo until empty + j uart_read_LSR_IIR uart_data_ready: diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-uart-timeout-01.S b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-uart-timeout-01.S index 1523b369..9e19ff20 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-uart-timeout-01.S +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-uart-timeout-01.S @@ -92,16 +92,16 @@ TEST_STACK_AND_DATA // claim and completed have the same address. // then you'll return by mret. -trap_handler: - // this will only get uart interrupts - li s0, plicBaseAddr - addi s0, s0, 0x200004 // claim offset - lw s1, 0(s0) +# trap_handler: +# // this will only get uart interrupts +# //li s0, plicBaseAddr +# addi s0, s0, 0x200004 // claim offset +# lw s1, 0(s0) - // check that s1 is 10 and not something else - // read uart rx fifo +# // check that s1 is 10 and not something else +# // read uart rx fifo - // completed - sw s1, 0(s0) // tells the plic the isr is done. - mret +# // completed +# sw s1, 0(s0) // tells the plic the isr is done. +# mret