FIX: found bug in Processor core

This commit is contained in:
Dominik Meyer 2013-07-29 09:25:06 +02:00
parent c46379c117
commit 63c900fc12
3 changed files with 23 additions and 22 deletions

View File

@ -1,4 +1,5 @@
start:
lui $30, 1
loa $1, 65520
jmc print
jmc wait

View File

@ -102,7 +102,7 @@ begin
scBaud <= to_integer(unsigned(srBaud));
odDebug <= srTransmit(7 downto 0);
odDebug <= scUARTRempty & srReceive(6 downto 0);
uart0: UART
generic map(
@ -165,7 +165,6 @@ begin
current_state <= st_write;
else
tData <= srStatus;
scUARTsend <= '0';
scUartReadEnable <= '0';

View File

@ -34,13 +34,13 @@ architecture arch of RAM is
type MEMORY is ARRAY(0 to 255) of DATA; --! array of data words
constant Prog1 : MEMORY := ( --! 4k * 32bit of RAM
0 => B"00001100001000001111111111110000", --loa $1, 65520
1 => B"01000011111000000000000000000100", --jmc print
2 => B"01000011111000000000000000100010", --jmc wait
3 => B"00111000000000000000000000000000", --jmp start
4 => B"00010010100000010000000000000000", --add $20, $1, $0
5 => B"00001000000101001111111111110001", --sto $20, 65521
6 => B"00000110100101000000000000000000", --shr $20, $20, $0
0 => B"00111111110000000000000000000001", --lui $30, 1
1 => B"00001100001000001111111111110000", --loa $1, 65520
2 => B"01000011111000000000000000000101", --jmc print
3 => B"01000011111000000000000000100011", --jmc wait
4 => B"00111000000000000000000000000000", --jmp start
5 => B"00010010100000010000000000000000", --add $20, $1, $0
6 => B"00001000000101001111111111110001", --sto $20, 65521
7 => B"00000110100101000000000000000000", --shr $20, $20, $0
8 => B"00000110100101000000000000000000", --shr $20, $20, $0
9 => B"00000110100101000000000000000000", --shr $20, $20, $0
@ -48,8 +48,8 @@ architecture arch of RAM is
11 => B"00000110100101000000000000000000", --shr $20, $20, $0
12 => B"00000110100101000000000000000000", --shr $20, $20, $0
13 => B"00000110100101000000000000000000", --shr $20, $20, $0
14 => B"00001000000101001111111111110001", --sto $20, 65521
15 => B"00000110100101000000000000000000", --shr $20, $20, $0
14 => B"00000110100101000000000000000000", --shr $20, $20, $0
15 => B"00001000000101001111111111110001", --sto $20, 65521
16 => B"00000110100101000000000000000000", --shr $20, $20, $0
17 => B"00000110100101000000000000000000", --shr $20, $20, $0
18 => B"00000110100101000000000000000000", --shr $20, $20, $0
@ -57,8 +57,8 @@ architecture arch of RAM is
20 => B"00000110100101000000000000000000", --shr $20, $20, $0
21 => B"00000110100101000000000000000000", --shr $20, $20, $0
22 => B"00000110100101000000000000000000", --shr $20, $20, $0
23 => B"00001000000101001111111111110001", --sto $20, 65521
24 => B"00000110100101000000000000000000", --shr $20, $20, $0
23 => B"00000110100101000000000000000000", --shr $20, $20, $0
24 => B"00001000000101001111111111110001", --sto $20, 65521
25 => B"00000110100101000000000000000000", --shr $20, $20, $0
26 => B"00000110100101000000000000000000", --shr $20, $20, $0
27 => B"00000110100101000000000000000000", --shr $20, $20, $0
@ -66,10 +66,10 @@ architecture arch of RAM is
29 => B"00000110100101000000000000000000", --shr $20, $20, $0
30 => B"00000110100101000000000000000000", --shr $20, $20, $0
31 => B"00000110100101000000000000000000", --shr $20, $20, $0
32 => B"00001000000101001111111111110001", --sto $20, 65521
33 => B"01000100000111110000000000000000", --ret
34 => B"00111101010000000000001001011000", --lui $10, 600
35 => B"00000001010010100000000000000000", --shl $10, $10, $0
32 => B"00000110100101000000000000000000", --shr $20, $20, $0
33 => B"00001000000101001111111111110001", --sto $20, 65521
34 => B"01000100000111110000000000000000", --ret
35 => B"00111101010000000000001001011000", --lui $10, 600
36 => B"00000001010010100000000000000000", --shl $10, $10, $0
37 => B"00000001010010100000000000000000", --shl $10, $10, $0
38 => B"00000001010010100000000000000000", --shl $10, $10, $0
@ -84,11 +84,12 @@ architecture arch of RAM is
47 => B"00000001010010100000000000000000", --shl $10, $10, $0
48 => B"00000001010010100000000000000000", --shl $10, $10, $0
49 => B"00000001010010100000000000000000", --shl $10, $10, $0
50 => B"00111101011000000000000000000001", --lui $11, 1
51 => B"00010101010010100101100000000000", --sub $10, $10, $11
52 => B"00110000000000000000000000110110", --jpz endloop
53 => B"00111000000000000000000000110011", --jmp loop
54 => B"01000100000111110000000000000000", --ret
50 => B"00000001010010100000000000000000", --shl $10, $10, $0
51 => B"00111101011000000000000000000001", --lui $11, 1
52 => B"00010101010010100101100000000000", --sub $10, $10, $11
53 => B"00110000000000000000000000110111", --jpz endloop
54 => B"00111000000000000000000000110100", --jmp loop
55 => B"01000100000111110000000000000000", --ret
others => (others => '0')