general test cleanup of comments and old files

This commit is contained in:
Kip Macsai-Goren 2022-04-29 19:55:29 +00:00
parent 7148429f4a
commit 208827502e
4 changed files with 32 additions and 2080 deletions

View File

@ -157,20 +157,20 @@ cause_s_soft_interrupt:
ret ret
cause_m_ext_interrupt: cause_m_ext_interrupt:
# ========== Configure PLIC ========== // ========== Configure PLIC ==========
# m priority threshold = 0 // m priority threshold = 0
li t3, 0xC200000 li t3, 0xC200000
li t4, 0 li t4, 0
sw t4, 0(t3) sw t4, 0(t3)
# s priority threshold = 7 // s priority threshold = 7
li t3, 0xC201000 li t3, 0xC201000
li t4, 7 li t4, 7
sw t4, 0(t3) sw t4, 0(t3)
# source 3 (GPIO) priority = 1 // source 3 (GPIO) priority = 1
li t3, 0xC000000 li t3, 0xC000000
li t4, 1 li t4, 1
sw t4, 0x0C(t3) sw t4, 0x0C(t3)
# enable source 3 in M Mode // enable source 3 in M Mode
li t3, 0x0C002000 li t3, 0x0C002000
li t4, 0b1000 li t4, 0b1000
sw t4, 0(t3) sw t4, 0(t3)
@ -194,20 +194,20 @@ m_ext_loop:
ret ret
cause_s_ext_interrupt_GPIO: cause_s_ext_interrupt_GPIO:
# ========== Configure PLIC ========== // ========== Configure PLIC ==========
# s priority threshold = 0 // s priority threshold = 0
li t3, 0xC201000 li t3, 0xC201000
li t4, 0 li t4, 0
sw t4, 0(t3) sw t4, 0(t3)
# m priority threshold = 7 // m priority threshold = 7
li t3, 0xC200000 li t3, 0xC200000
li t4, 7 li t4, 7
sw t4, 0(t3) sw t4, 0(t3)
# source 3 (GPIO) priority = 1 // source 3 (GPIO) priority = 1
li t3, 0xC000000 li t3, 0xC000000
li t4, 1 li t4, 1
sw t4, 0x0C(t3) sw t4, 0x0C(t3)
# enable source 3 in S mode // enable source 3 in S mode
li t3, 0x0C002080 li t3, 0x0C002080
li t4, 0b1000 li t4, 0b1000
sw t4, 0(t3) sw t4, 0(t3)
@ -552,24 +552,24 @@ ext_interrupt_\MODE\():
sw zero, 8(t3) // disable the first pin as an output sw zero, 8(t3) // disable the first pin as an output
sw zero, 40(t3) // write a 0 to the first output pin (reset interrupt) sw zero, 40(t3) // write a 0 to the first output pin (reset interrupt)
# reset PLIC to turn off external interrupts // reset PLIC to turn off external interrupts
# m priority threshold = 7 // m priority threshold = 7
li t3, 0xC200000 li t3, 0xC200000
li t0, 0x7 li t0, 0x7
sw t0, 0(t3) sw t0, 0(t3)
# s priority threshold = 7 // s priority threshold = 7
li t3, 0xC201000 li t3, 0xC201000
li t0, 0x7 li t0, 0x7
sw t0, 0(t3) sw t0, 0(t3)
# source 3 (GPIO) priority = 0 // source 3 (GPIO) priority = 0
li t3, 0xC000000 li t3, 0xC000000
li t0, 0 li t0, 0
sw t0, 0x0C(t3) sw t0, 0x0C(t3)
# disable source 3 in M mode // disable source 3 in M mode
li t3, 0x0C002000 li t3, 0x0C002000
li t0, 0b0000 li t0, 0b0000
sw t0, 0(t3) sw t0, 0(t3)
# enable source 3 in S mode // enable source 3 in S mode
li t3, 0x0C002080 li t3, 0x0C002080
li t4, 0b0000 li t4, 0b0000
sw t4, 0(t3) sw t4, 0(t3)

View File

@ -158,20 +158,20 @@ cause_s_soft_interrupt:
ret ret
cause_m_ext_interrupt: cause_m_ext_interrupt:
# ========== Configure PLIC ========== // ========== Configure PLIC ==========
# m priority threshold = 0 // m priority threshold = 0
li t3, 0xC200000 li t3, 0xC200000
li t4, 0 li t4, 0
sw t4, 0(t3) sw t4, 0(t3)
# s priority threshold = 7 // s priority threshold = 7
li t3, 0xC201000 li t3, 0xC201000
li t4, 7 li t4, 7
sw t4, 0(t3) sw t4, 0(t3)
# source 3 (GPIO) priority = 1 // source 3 (GPIO) priority = 1
li t3, 0xC000000 li t3, 0xC000000
li t4, 1 li t4, 1
sw t4, 0x0C(t3) sw t4, 0x0C(t3)
# enable source 3 in M Mode // enable source 3 in M Mode
li t3, 0x0C002000 li t3, 0x0C002000
li t4, 0b1000 li t4, 0b1000
sw t4, 0(t3) sw t4, 0(t3)
@ -194,20 +194,20 @@ m_ext_loop:
ret ret
cause_s_ext_interrupt_GPIO: cause_s_ext_interrupt_GPIO:
# ========== Configure PLIC ========== // ========== Configure PLIC ==========
# s priority threshold = 0 // s priority threshold = 0
li t3, 0xC201000 li t3, 0xC201000
li t4, 0 li t4, 0
sw t4, 0(t3) sw t4, 0(t3)
# m priority threshold = 7 // m priority threshold = 7
li t3, 0xC200000 li t3, 0xC200000
li t4, 7 li t4, 7
sw t4, 0(t3) sw t4, 0(t3)
# source 3 (GPIO) priority = 1 // source 3 (GPIO) priority = 1
li t3, 0xC000000 li t3, 0xC000000
li t4, 1 li t4, 1
sw t4, 0x0C(t3) sw t4, 0x0C(t3)
# enable source 3 in S mode // enable source 3 in S mode
li t3, 0x0C002080 li t3, 0x0C002080
li t4, 0b1000 li t4, 0b1000
sw t4, 0(t3) sw t4, 0(t3)
@ -553,24 +553,24 @@ ext_interrupt_\MODE\():
sw zero, 8(t3) // disable the first pin as an output sw zero, 8(t3) // disable the first pin as an output
sw zero, 40(t3) // write a 0 to the first output pin (reset interrupt) sw zero, 40(t3) // write a 0 to the first output pin (reset interrupt)
# reset PLIC to turn off external interrupts // reset PLIC to turn off external interrupts
# m priority threshold = 7 // m priority threshold = 7
li t3, 0xC200000 li t3, 0xC200000
li t0, 0x7 li t0, 0x7
sw t0, 0(t3) sw t0, 0(t3)
# s priority threshold = 7 // s priority threshold = 7
li t3, 0xC201000 li t3, 0xC201000
li t0, 0x7 li t0, 0x7
sw t0, 0(t3) sw t0, 0(t3)
# source 3 (GPIO) priority = 0 // source 3 (GPIO) priority = 0
li t3, 0xC000000 li t3, 0xC000000
li t0, 0 li t0, 0
sw t0, 0x0C(t3) sw t0, 0x0C(t3)
# disable source 3 in M mode // disable source 3 in M mode
li t3, 0x0C002000 li t3, 0x0C002000
li t0, 0b0000 li t0, 0b0000
sw t0, 0(t3) sw t0, 0(t3)
# enable source 3 in S mode // enable source 3 in S mode
li t3, 0x0C002080 li t3, 0x0C002080
li t4, 0b0000 li t4, 0b0000
sw t4, 0(t3) sw t4, 0(t3)