Try to use timer
This commit is contained in:
19
15test_jal.asm
Normal file
19
15test_jal.asm
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
lui $s0, 0x4000
|
||||||
|
addi $s0, $s0, 0x10
|
||||||
|
main_loop:
|
||||||
|
addi $s1, $zero, 0x15b
|
||||||
|
sw $s1, 0($s0)
|
||||||
|
jal wait_for_time
|
||||||
|
|
||||||
|
addi $s1, $zero, 0x177
|
||||||
|
sw $s1, 0($s0)
|
||||||
|
jal wait_for_time
|
||||||
|
j main_loop
|
||||||
|
|
||||||
|
wait_for_time:
|
||||||
|
lui $t0, 0xf
|
||||||
|
addi $t0, $t0, 0x7fff
|
||||||
|
wait_loop:
|
||||||
|
addi $t0, $t0, -1
|
||||||
|
bgtz $t0, wait_loop
|
||||||
|
jr $ra
|
||||||
14
15test_jal.txt
Normal file
14
15test_jal.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
20'd0: instruction <= 32'h3c104000;
|
||||||
|
20'd1: instruction <= 32'h22100010;
|
||||||
|
20'd2: instruction <= 32'h2011015b;
|
||||||
|
20'd3: instruction <= 32'hae110000;
|
||||||
|
20'd4: instruction <= 32'h0c000009;
|
||||||
|
20'd5: instruction <= 32'h20110177;
|
||||||
|
20'd6: instruction <= 32'hae110000;
|
||||||
|
20'd7: instruction <= 32'h0c000009;
|
||||||
|
20'd8: instruction <= 32'h08000002;
|
||||||
|
20'd9: instruction <= 32'h3c08000f;
|
||||||
|
20'd10: instruction <= 32'h21087fff;
|
||||||
|
20'd11: instruction <= 32'h2108ffff;
|
||||||
|
20'd12: instruction <= 32'h1d00fffe;
|
||||||
|
20'd13: instruction <= 32'h03e00008;
|
||||||
14
15test_jal_mars.txt
Normal file
14
15test_jal_mars.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
3c104000
|
||||||
|
22100010
|
||||||
|
2011015b
|
||||||
|
ae110000
|
||||||
|
0c000009
|
||||||
|
20110177
|
||||||
|
ae110000
|
||||||
|
0c000009
|
||||||
|
08000002
|
||||||
|
3c08000f
|
||||||
|
21087fff
|
||||||
|
2108ffff
|
||||||
|
1d00fffe
|
||||||
|
03e00008
|
||||||
Reference in New Issue
Block a user