Skip to content
Snippets Groups Projects
Commit 087c80be authored by Pavel Pisa's avatar Pavel Pisa
Browse files

seminaries/qtrvsim/uart-echo-irq: minor update to build by internal assembler


Signed-off-by: default avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
parent 92d521c1
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,8 @@ skip:
loop:
csrrs t1, mepc, zero // check
sw t1, SPILED_REG_LED_LINE_o(a0)
srl t2, t0, 31
sll t0, t0, 1
srli t2, t0, 31
slli t0, t0, 1
or t0, t0, t2
lw t2, SPILED_REG_KNOBS_8BIT_o(a0)
sw t2, SPILED_REG_LED_RGB1_o(a0)
......@@ -117,11 +117,11 @@ ret_from_exception:
handle_irq: // t0 mcause
slli t0, t0, 2 // shift out sign, left sources * 4
/* the t0 would be used to point into irq handlers table */
/* check only for UART RX interupt for simplicity 8 */
// the t0 would be used to point into irq handlers table
// check only for UART RX interupt for simplicity
addi a0, zero, 16 * 4 // UART RX is the first platform irq
beq t0, a0, handle_uart_rx_irq // it is UART RX
/* mask out unknown sources */
// mask out unknown sources
srli t0, t0, 2 // make t0 back simple source index
addi a0, zero, 1
sll a0, a0, t0 // generate bit mask for source
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment