URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 14 |
Rev 39 |
;
|
;
|
; tmrtest.s -- test timer
|
; tmrtest.s -- test timer
|
;
|
;
|
|
|
.set tmr_base,0xF0000000
|
.set tmr_base,0xF0000000
|
.set io_base,0xF0300000
|
.set io_base,0xF0300000
|
|
|
add $8,$0,tmr_base
|
add $8,$0,tmr_base
|
add $9,$0,1000
|
add $9,$0,50000000 ; divisor for 1 sec
|
stw $9,$8,4
|
stw $9,$8,4
|
add $7,$0,'a'-10
|
add $7,$0,'a'-10
|
again:
|
again:
|
jal out
|
jal out
|
wait:
|
wait:
|
add $8,$0,tmr_base
|
add $8,$0,tmr_base
|
ldw $9,$8,0
|
ldw $9,$8,0
|
and $9,$9,1
|
and $9,$9,1
|
beq $9,$0,wait
|
beq $9,$0,wait
|
stw $0,$8,0
|
stw $0,$8,0
|
add $7,$7,1
|
add $7,$7,1
|
add $9,$0,'z'+1
|
add $9,$0,'z'+1
|
bne $7,$9,again
|
bne $7,$9,again
|
add $7,$0,'a'
|
add $7,$0,'a'
|
j again
|
j again
|
|
|
out:
|
out:
|
add $8,$0,io_base
|
add $8,$0,io_base
|
out1:
|
out1:
|
ldw $9,$8,8
|
ldw $9,$8,8
|
and $9,$9,1
|
and $9,$9,1
|
beq $9,$0,out1
|
beq $9,$0,out1
|
stw $7,$8,12
|
stw $7,$8,12
|
jr $31
|
jr $31
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.