URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/eco32/tags/eco32-0.26/hwtests/tmrtest
- from Rev 245 to Rev 270
- ↔ Reverse comparison
Rev 245 → Rev 270
/Makefile
0,0 → 1,27
# |
# Makefile for tmrtest ROM |
# |
|
BUILD = ../../build |
|
.PHONY: all install run clean |
|
all: tmrtest.exo |
|
install: tmrtest.exo |
|
tmrtest.exo: tmrtest.bin |
$(BUILD)/bin/bin2exo -S2 0 tmrtest.bin tmrtest.exo |
|
tmrtest.bin: tmrtest.o |
$(BUILD)/bin/ld -h -rc 0xE0000000 \ |
-o tmrtest.bin tmrtest.o |
|
tmrtest.o: tmrtest.s |
$(BUILD)/bin/as -o tmrtest.o tmrtest.s |
|
run: tmrtest.bin |
$(BUILD)/bin/sim -i -s 1 -t 0 -r tmrtest.bin |
|
clean: |
rm -f *~ tmrtest.o tmrtest.bin tmrtest.exo |
/README
0,0 → 1,3
This is a test for the timer. Every second the next lower-case character |
of the character set is sent to serial line 0 , starting 10 characters |
below 'a' and repeating from 'a' as soon as 'z' is reached. |
/tmrtest.s
0,0 → 1,33
; |
; tmrtest.s -- test timer |
; |
|
.set tmr_base,0xF0000000 |
.set io_base,0xF0300000 |
|
add $8,$0,tmr_base |
add $9,$0,50000000 ; divisor for 1 sec |
stw $9,$8,4 |
add $7,$0,'a'-10 |
again: |
jal out |
wait: |
add $8,$0,tmr_base |
ldw $9,$8,0 |
and $9,$9,1 |
beq $9,$0,wait |
stw $0,$8,0 |
add $7,$7,1 |
add $9,$0,'z'+1 |
bne $7,$9,again |
add $7,$0,'a' |
j again |
|
out: |
add $8,$0,io_base |
out1: |
ldw $9,$8,8 |
and $9,$9,1 |
beq $9,$0,out1 |
stw $7,$8,12 |
jr $31 |