FIX: fixed some bugs
This commit is contained in:
parent
ea4ab47f79
commit
f2da12bbfe
17
asm/fib.s
Normal file
17
asm/fib.s
Normal file
@ -0,0 +1,17 @@
|
||||
lui $1, 1 # for sub 1
|
||||
lui $2, 1 # a
|
||||
lui $3, 1 # b
|
||||
lui $4, 1 # c
|
||||
lui $5, 33 # i
|
||||
lui $6, 2
|
||||
sub $5,$5,$6
|
||||
loop:
|
||||
add $3,$0,$2 # b=a
|
||||
add $2,$0,$4 # a=c
|
||||
add $4,$2,$3 # c=a+b
|
||||
sto $4, 5000
|
||||
sub $5,$5,$1 # $i--
|
||||
jpz end
|
||||
jmp loop
|
||||
end:
|
||||
hlt
|
@ -9,4 +9,5 @@ sub $5, $5, $4
|
||||
jpz end
|
||||
jmp loop
|
||||
end:
|
||||
sto $3, 5000
|
||||
hlt
|
||||
|
@ -387,7 +387,10 @@ for my $i (@instructions) {
|
||||
for my $i (@instructions) {
|
||||
if ($ARGV[1] eq "-vhdl") {
|
||||
printf("%4s \t => B\"%.32b\", --%s\n ",$i->{addr}, $i->{opc}, $i->{comment});
|
||||
} else {
|
||||
}
|
||||
elsif($ARGV[1] eq "-raw") {
|
||||
printf("%.32b\n",$i->{opc});
|
||||
}else {
|
||||
printf( "%4s %.32b #%s\n", $i->{addr}, $i->{opc}, $i->{comment} );
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ architecture arch of top is
|
||||
signal scReset : std_logic;
|
||||
begin
|
||||
|
||||
scReset <= not icReset;
|
||||
scReset <= not icReset_n;
|
||||
|
||||
soc0:entity work.SOC
|
||||
generic map(
|
||||
|
Loading…
Reference in New Issue
Block a user