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.22/hwtests/jalrtest
    from Rev 14 to Rev 21
    Reverse comparison

Rev 14 → Rev 21

/jalrtest.s
0,0 → 1,36
;
; jalrtest.s -- test the special case 'jalr $31'
;
 
; One of the following 4 possibilities is displayed:
; 0 = jump not executed, return address not stored in $31
; 1 = jump was executed, return address not stored in $31
; 2 = jump not executed, return address stored in $31
; 3 = jump was executed, return address stored in $31
 
.set io_base,0xF0300000
 
add $16,$0,x
add $31,$0,$16
jalr $31
add $4,$0,0
j y
x:
add $4,$0,1
y:
beq $31,$16,z
add $4,$4,2
z:
add $4,$4,0x30
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 $4,$8,12
jr $31
/Makefile
0,0 → 1,27
#
# Makefile for jalrtest ROM
#
 
BUILD = ../../build
 
.PHONY: all install run clean
 
all: jalrtest.exo
 
install: jalrtest.exo
 
jalrtest.exo: jalrtest.bin
$(BUILD)/bin/bin2exo 0 jalrtest.bin jalrtest.exo
 
jalrtest.bin: jalrtest.o
$(BUILD)/bin/ld -h -rc 0xE0000000 \
-o jalrtest.bin jalrtest.o
 
jalrtest.o: jalrtest.s
$(BUILD)/bin/as -o jalrtest.o jalrtest.s
 
run: jalrtest.bin
$(BUILD)/bin/sim -i -t 1 -r jalrtest.bin
 
clean:
rm -f *~ jalrtest.o jalrtest.bin jalrtest.exo

powered by: WebSVN 2.1.0

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