Skip to content
Snippets Groups Projects
Commit 9782bdeb authored by Roberto Hexsel's avatar Roberto Hexsel
Browse files

fixed data allocation for UART_rx_irq handler

parent c67b6164
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#================================================================ #================================================================
# interrupt handler for external counter attached to IP5=HW3 # interrupt handler for external counter attached to IP5=HW3
# for extCounter address see vhdl/packageMemory.vhd # for extCounter address see vhdl/packageMemory.vhd
#
.bss .bss
.align 2 .align 2
.global _counter_val # accumulate number of interrupts .global _counter_val # accumulate number of interrupts
.comm _counter_val 4 _counter_val: .space 4
.comm _counter_saves 8*4 # area to save up to 8 registers _counter_saves: .space 8*4 # area to save up to 8 registers
# _counter_saves[0]=$a0, [1]=$a1, [2]=$a2, ... # _counter_saves[0]=$a0, [1]=$a1, [2]=$a2, [3]=$a3, ...
.set HW_counter_value,0xc00000c8 # Count 200 clock pulses & interr .set HW_counter_value,0xc00000c8 # Count 200 clock pulses & interr
...@@ -69,19 +69,22 @@ extCounter: ...@@ -69,19 +69,22 @@ extCounter:
#================================================================ #================================================================
# interrupt handler for UART attached to IP6=HW4 # interrupt handler for UART attached to IP6=HW4
# for UART's address see vhdl/packageMemory.vhd
#
.bss .bss
.align 2 .align 2
.global Ud .global Ud, _uart_buff
Ud: .comm rx_queue 16 # reception queue and pointers Ud:
.comm rx_hd 4 rx_hd: .space 4
.comm rx_tl 4 rx_tl: .space 4
.comm tx_queue 16 # transmission queue and pointers rx_q: .space 16 # reception queue and pointers
.comm tx_hd 4 tx_hd: .space 4
.comm tx_tl 4 tx_tl: .space 4
.comm nrx 4 # characters in RX_queue tx_q: .space 16 # transmission queue and pointers
.comm ntx 4 # spaces left in TX_queue nrx: .space 4 # characters in RX_queue
.comm _uart_buff 16*4 # up to 16 registers to be saved here ntx: .space 4 # spaces left in TX_queue
_uart_buff: .space 16*4 # up to 16 registers to be saved here
.set UART_rx_irq,0x08 .set UART_rx_irq,0x08
.set UART_tx_irq,0x10 .set UART_tx_irq,0x10
...@@ -451,11 +454,11 @@ cmips_delay: ...@@ -451,11 +454,11 @@ cmips_delay:
# void cmips_kmsg( $k1 ) # void cmips_kmsg( $k1 )
# this function preserves registers other than k0,k1 # this function preserves registers other than k0,k1
# #
.data .bss
.align 2 .align 2
.comm _kmsg_saves 4*4 # area to save 4 registers _kmsg_saves: .space 4*4 # area to save 4 registers
# _kmsg_saves[0]=$a0, [1]=$a1, [2]=$a2, [3]=$a3 # _kmsg_saves[0]=$a0, [1]=$a1, [2]=$a2, [3]=$a3
#
.text .text
.align 2 .align 2
.set noreorder .set noreorder
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment