OpenCores
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.24/hwtests/ldtest
    from Rev 137 to Rev 211
    Reverse comparison

Rev 137 → Rev 211

/README
0,0 → 1,2
This is a test for load instructions. A dot ('.') is sent on serial
line 0 to indicate success, a question mark ('?') for failure.
/Makefile
0,0 → 1,26
#
# Makefile for ldtest ROM
#
 
BUILD = ../../build
 
.PHONY: all install run clean
 
all: ldtest.exo
 
install: ldtest.exo
 
ldtest.exo: ldtest.bin
$(BUILD)/bin/bin2exo -S2 0 ldtest.bin ldtest.exo
 
ldtest.bin: ldtest.o
$(BUILD)/bin/ld -h -rc 0xE0000000 -o ldtest.bin ldtest.o
 
ldtest.o: ldtest.s
$(BUILD)/bin/as -o ldtest.o ldtest.s
 
run: ldtest.bin
$(BUILD)/bin/sim -i -t 1 -r ldtest.bin
 
clean:
rm -f *~ ldtest.o ldtest.bin ldtest.exo
/ldtest.s
0,0 → 1,86
;
; ld.s -- test load instructions
;
 
.set io_base,0xF0300000
 
add $7,$0,'.'
add $3,$0,w1
 
t0:
ldw $2,$3,0
add $4,$0,0x68795E3C
beq $2,$4,t1
add $7,$0,'?'
 
t1:
ldw $2,$3,4
add $4,$0,0x6879DEBC
beq $2,$4,t2
add $7,$0,'?'
 
t2:
ldh $2,$3,2
add $4,$0,0x00005E3C
beq $2,$4,t3
add $7,$0,'?'
 
t3:
ldh $2,$3,6
add $4,$0,0xFFFFDEBC
beq $2,$4,t4
add $7,$0,'?'
 
t4:
ldhu $2,$3,2
add $4,$0,0x00005E3C
beq $2,$4,t5
add $7,$0,'?'
 
t5:
ldhu $2,$3,6
add $4,$0,0x0000DEBC
beq $2,$4,t6
add $7,$0,'?'
 
t6:
ldb $2,$3,3
add $4,$0,0x0000003C
beq $2,$4,t7
add $7,$0,'?'
 
t7:
ldb $2,$3,7
add $4,$0,0xFFFFFFBC
beq $2,$4,t8
add $7,$0,'?'
 
t8:
ldbu $2,$3,3
add $4,$0,0x0000003C
beq $2,$4,t9
add $7,$0,'?'
 
t9:
ldbu $2,$3,7
add $4,$0,0x000000BC
beq $2,$4,tx
add $7,$0,'?'
 
tx:
jal out
halt:
j halt
 
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
 
.align 4
w1: .word 0x68795E3C
w2: .word 0x6879DEBC

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.