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.25/hwtests/sregtest
    from Rev 245 to Rev 248
    Reverse comparison

Rev 245 → Rev 248

/Makefile
0,0 → 1,26
#
# Makefile for sregtest ROM
#
 
BUILD = ../../build
 
.PHONY: all install run clean
 
all: sregtest.exo
 
install: sregtest.exo
 
sregtest.exo: sregtest.bin
$(BUILD)/bin/bin2exo -S2 0 sregtest.bin sregtest.exo
 
sregtest.bin: sregtest.o
$(BUILD)/bin/ld -h -rc 0xE0000000 -o sregtest.bin sregtest.o
 
sregtest.o: sregtest.s
$(BUILD)/bin/as -o sregtest.o sregtest.s
 
run: sregtest.bin
$(BUILD)/bin/sim -i -s 1 -t 0 -r sregtest.bin
 
clean:
rm -f *~ sregtest.o sregtest.bin sregtest.exo
/sregtest.s
0,0 → 1,57
;
; sregtest.s -- test special register transfer instructions
;
 
.set io_base,0xF0300000
 
add $7,$0,'.'
 
add $11,$0,0x1E67C536
mvts $11,1
add $12,$0,0xB45FCC78
mvts $12,2
add $13,$0,0x1FCB0BC5
mvts $13,3
add $14,$0,0x3AE82DD4
mvts $14,4
 
mvfs $8,1
xor $9,$8,$11
and $9,$9,0x0000001F
beq $9,$0,lbl1
add $7,$0,'?'
lbl1:
 
mvfs $8,2
xor $9,$8,$12
and $9,$9,0xFFFFF000
beq $9,$0,lbl2
add $7,$0,'?'
lbl2:
 
mvfs $8,3
xor $9,$8,$13
and $9,$9,0x3FFFF003
beq $9,$0,lbl3
add $7,$0,'?'
lbl3:
 
mvfs $8,4
xor $9,$8,$14
and $9,$9,0xFFFFFFFF
beq $9,$0,lbl4
add $7,$0,'?'
lbl4:
 
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
/README
0,0 → 1,3
This is a test for data transfers to and from the special registers.
A dot ('.') is sent on serial line 0 to indicate success, a question
mark ('?') for failure.

powered by: WebSVN 2.1.0

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