Skip to content
Snippets Groups Projects
Commit 0389701f authored by Roberto Hexsel's avatar Roberto Hexsel
Browse files

revised docs

parent b3c5d69b
Branches
No related tags found
No related merge requests found
No preview for this file type
...@@ -30,6 +30,31 @@ _exit: nop # flush pipeline ...@@ -30,6 +30,31 @@ _exit: nop # flush pipeline
nop nop
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 # exception vector_180 .org x_EXCEPTION_0180,0 # exception vector_180
.global _excp_180, excp_180 .global _excp_180, excp_180
.ent _excp_180 .ent _excp_180
...@@ -67,7 +92,21 @@ _excp_200: ...@@ -67,7 +92,21 @@ _excp_200:
eret eret
.end _excp_200 .end _excp_200
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##=================================================================
##
.org x_ENTRY_POINT # normal code start .org x_ENTRY_POINT # normal code start
main: la $15,x_IO_BASE_ADDR main: la $15,x_IO_BASE_ADDR
li $7,4 li $7,4
......
...@@ -28,6 +28,30 @@ _exit: nop # flush pipeline ...@@ -28,6 +28,30 @@ _exit: nop # flush pipeline
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 .org x_EXCEPTION_0180,0
.global excp_180 .global excp_180
.ent excp_180 .ent excp_180
...@@ -45,6 +69,31 @@ excp_180: ...@@ -45,6 +69,31 @@ excp_180:
.end excp_180 .end excp_180
_excp_0200:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x03
nop
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##=================================================================
##
.org x_ENTRY_POINT,0 .org x_ENTRY_POINT,0
.ent main .ent main
main: la $15,x_IO_BASE_ADDR # print $5=8 and count downwards main: la $15,x_IO_BASE_ADDR # print $5=8 and count downwards
......
...@@ -31,6 +31,29 @@ _exit: nop # flush pipeline ...@@ -31,6 +31,29 @@ _exit: nop # flush pipeline
nop nop
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 # exception vector_180 .org x_EXCEPTION_0180,0 # exception vector_180
.global _excp_180 .global _excp_180
.ent _excp_180 .ent _excp_180
...@@ -73,7 +96,33 @@ return: mtc0 $k1, cop0_EPC ...@@ -73,7 +96,33 @@ return: mtc0 $k1, cop0_EPC
.end _excp_180 .end _excp_180
#-----------------------------------------------------------------
_excp_0200:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x03
nop
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##----------------------------------------------------------------
##
.org x_ENTRY_POINT,0 # user code starts here .org x_ENTRY_POINT,0 # user code starts here
main: la $15, x_IO_BASE_ADDR main: la $15, x_IO_BASE_ADDR
la $16, x_IO_BASE_ADDR+x_IO_ADDR_RANGE la $16, x_IO_BASE_ADDR+x_IO_ADDR_RANGE
......
...@@ -31,6 +31,29 @@ _exit: nop # flush pipeline ...@@ -31,6 +31,29 @@ _exit: nop # flush pipeline
nop nop
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 # exception vector_180 .org x_EXCEPTION_0180,0 # exception vector_180
.ent _excp_180 .ent _excp_180
_excp_180: _excp_180:
...@@ -46,6 +69,31 @@ _excp_180: ...@@ -46,6 +69,31 @@ _excp_180:
.end _excp_180 .end _excp_180
_excp_0200:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x03
nop
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##===============================================================
##
.org x_ENTRY_POINT,0 # normal code start .org x_ENTRY_POINT,0 # normal code start
main: la $15, x_IO_BASE_ADDR main: la $15, x_IO_BASE_ADDR
li $7, 4 li $7, 4
......
...@@ -32,6 +32,28 @@ _exit: nop # flush pipeline ...@@ -32,6 +32,28 @@ _exit: nop # flush pipeline
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 # exception vector_180 .org x_EXCEPTION_0180,0 # exception vector_180
.ent _excp_180 .ent _excp_180
excp_180: excp_180:
...@@ -89,6 +111,21 @@ _excp_200: ...@@ -89,6 +111,21 @@ _excp_200:
.end _excp_200 .end _excp_200
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##================================================================
##
.org x_ENTRY_POINT,0 .org x_ENTRY_POINT,0
main: la $15, x_IO_BASE_ADDR # print out address (simulator's stdout) main: la $15, x_IO_BASE_ADDR # print out address (simulator's stdout)
## ##
......
...@@ -31,6 +31,30 @@ _exit: nop # flush pipeline ...@@ -31,6 +31,30 @@ _exit: nop # flush pipeline
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 # exception vector_180 .org x_EXCEPTION_0180,0 # exception vector_180
.ent _excp_180 .ent _excp_180
_excp_180: _excp_180:
...@@ -91,6 +115,19 @@ _excp_200: ...@@ -91,6 +115,19 @@ _excp_200:
.end _excp_200 .end _excp_200
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
.org x_ENTRY_POINT,0 .org x_ENTRY_POINT,0
main: la $15, x_IO_BASE_ADDR # print out address (simulator's stdout) main: la $15, x_IO_BASE_ADDR # print out address (simulator's stdout)
li $7, 3 li $7, 3
......
...@@ -36,6 +36,28 @@ _exit: nop # flush pipeline ...@@ -36,6 +36,28 @@ _exit: nop # flush pipeline
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
## ##
## print CAUSE, decrement iteration control ## print CAUSE, decrement iteration control
## ##
...@@ -90,8 +112,21 @@ _excp_200: ...@@ -90,8 +112,21 @@ _excp_200:
.end _excp_200 .end _excp_200
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##=======================================================
##
.org x_ENTRY_POINT,0 # normal code start .org x_ENTRY_POINT,0 # normal code start
main: la $15, x_IO_BASE_ADDR # simulator's stdout main: la $15, x_IO_BASE_ADDR # simulator's stdout
li $7, 4 # do loop 4 times li $7, 4 # do loop 4 times
......
...@@ -36,6 +36,29 @@ _exit: nop # flush pipeline ...@@ -36,6 +36,29 @@ _exit: nop # flush pipeline
nop nop
.end _start .end _start
.org x_EXCEPTION_0000,0
_excp_0000:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x01
nop
.org x_EXCEPTION_0100,0
_excp_0100:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x02
nop
.org x_EXCEPTION_0180,0 # exception vector_180 .org x_EXCEPTION_0180,0 # exception vector_180
.ent _excp_180 .ent _excp_180
## ##
...@@ -87,7 +110,20 @@ _excp_200: ...@@ -87,7 +110,20 @@ _excp_200:
.end _excp_200 .end _excp_200
.org x_EXCEPTION_BFC0,0
_excp_BFC0:
la $k0, x_IO_BASE_ADDR
mfc0 $k1, cop0_CAUSE
sw $k1, 0($k0) # print CAUSE, flush pipe and stop simulation
nop
nop
nop
wait 0x04
nop
##
##=======================================================
##
.org x_ENTRY_POINT,0 # normal code .org x_ENTRY_POINT,0 # normal code
main: la $15,x_IO_BASE_ADDR # simulator's stdout main: la $15,x_IO_BASE_ADDR # simulator's stdout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment