FIX: found bug in Processor core
This commit is contained in:
parent
c46379c117
commit
63c900fc12
@ -1,4 +1,5 @@
|
|||||||
start:
|
start:
|
||||||
|
lui $30, 1
|
||||||
loa $1, 65520
|
loa $1, 65520
|
||||||
jmc print
|
jmc print
|
||||||
jmc wait
|
jmc wait
|
||||||
|
@ -102,7 +102,7 @@ begin
|
|||||||
|
|
||||||
scBaud <= to_integer(unsigned(srBaud));
|
scBaud <= to_integer(unsigned(srBaud));
|
||||||
|
|
||||||
odDebug <= srTransmit(7 downto 0);
|
odDebug <= scUARTRempty & srReceive(6 downto 0);
|
||||||
|
|
||||||
uart0: UART
|
uart0: UART
|
||||||
generic map(
|
generic map(
|
||||||
@ -165,7 +165,6 @@ begin
|
|||||||
current_state <= st_write;
|
current_state <= st_write;
|
||||||
|
|
||||||
else
|
else
|
||||||
tData <= srStatus;
|
|
||||||
|
|
||||||
scUARTsend <= '0';
|
scUARTsend <= '0';
|
||||||
scUartReadEnable <= '0';
|
scUartReadEnable <= '0';
|
||||||
|
41
src/RAM.vhd
41
src/RAM.vhd
@ -34,13 +34,13 @@ architecture arch of RAM is
|
|||||||
type MEMORY is ARRAY(0 to 255) of DATA; --! array of data words
|
type MEMORY is ARRAY(0 to 255) of DATA; --! array of data words
|
||||||
|
|
||||||
constant Prog1 : MEMORY := ( --! 4k * 32bit of RAM
|
constant Prog1 : MEMORY := ( --! 4k * 32bit of RAM
|
||||||
0 => B"00001100001000001111111111110000", --loa $1, 65520
|
0 => B"00111111110000000000000000000001", --lui $30, 1
|
||||||
1 => B"01000011111000000000000000000100", --jmc print
|
1 => B"00001100001000001111111111110000", --loa $1, 65520
|
||||||
2 => B"01000011111000000000000000100010", --jmc wait
|
2 => B"01000011111000000000000000000101", --jmc print
|
||||||
3 => B"00111000000000000000000000000000", --jmp start
|
3 => B"01000011111000000000000000100011", --jmc wait
|
||||||
4 => B"00010010100000010000000000000000", --add $20, $1, $0
|
4 => B"00111000000000000000000000000000", --jmp start
|
||||||
5 => B"00001000000101001111111111110001", --sto $20, 65521
|
5 => B"00010010100000010000000000000000", --add $20, $1, $0
|
||||||
6 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
6 => B"00001000000101001111111111110001", --sto $20, 65521
|
||||||
7 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
7 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
8 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
8 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
9 => 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
|
11 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
12 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
12 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
13 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
13 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
14 => B"00001000000101001111111111110001", --sto $20, 65521
|
14 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
15 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
15 => B"00001000000101001111111111110001", --sto $20, 65521
|
||||||
16 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
16 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
17 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
17 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
18 => 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
|
20 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
21 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
21 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
22 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
22 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
23 => B"00001000000101001111111111110001", --sto $20, 65521
|
23 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
24 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
24 => B"00001000000101001111111111110001", --sto $20, 65521
|
||||||
25 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
25 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
26 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
26 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
27 => 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
|
29 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
30 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
30 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
31 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
31 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
32 => B"00001000000101001111111111110001", --sto $20, 65521
|
32 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
33 => B"01000100000111110000000000000000", --ret
|
33 => B"00001000000101001111111111110001", --sto $20, 65521
|
||||||
34 => B"00111101010000000000001001011000", --lui $10, 600
|
34 => B"01000100000111110000000000000000", --ret
|
||||||
35 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
35 => B"00111101010000000000001001011000", --lui $10, 600
|
||||||
36 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
36 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
||||||
37 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
37 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
||||||
38 => 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
|
47 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
||||||
48 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
48 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
||||||
49 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
49 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
||||||
50 => B"00111101011000000000000000000001", --lui $11, 1
|
50 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
||||||
51 => B"00010101010010100101100000000000", --sub $10, $10, $11
|
51 => B"00111101011000000000000000000001", --lui $11, 1
|
||||||
52 => B"00110000000000000000000000110110", --jpz endloop
|
52 => B"00010101010010100101100000000000", --sub $10, $10, $11
|
||||||
53 => B"00111000000000000000000000110011", --jmp loop
|
53 => B"00110000000000000000000000110111", --jpz endloop
|
||||||
54 => B"01000100000111110000000000000000", --ret
|
54 => B"00111000000000000000000000110100", --jmp loop
|
||||||
|
55 => B"01000100000111110000000000000000", --ret
|
||||||
|
|
||||||
|
|
||||||
others => (others => '0')
|
others => (others => '0')
|
||||||
|
Loading…
Reference in New Issue
Block a user