CHG: changed initial Program to print Geraffel Processor
This commit is contained in:
parent
0be13ee269
commit
c0031f415c
99
src/RAM.vhd
99
src/RAM.vhd
@ -34,22 +34,22 @@ 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"00111111110000000000000000000001", --lui $30, 1
|
0 => B"00001100001000000000000011001000", --loa $1, 200
|
||||||
1 => B"00001100001000001111111111110000", --loa $1, 65520
|
1 => B"01000011111000000000000000001101", --jmc print
|
||||||
2 => B"01000011111000000000000000000101", --jmc print
|
2 => B"00001100001000000000000011001001", --loa $1, 201
|
||||||
3 => B"01000011111000000000000000100011", --jmc wait
|
3 => B"01000011111000000000000000001101", --jmc print
|
||||||
4 => B"00111000000000000000000000000000", --jmp start
|
4 => B"00001100001000000000000011001010", --loa $1, 202
|
||||||
5 => B"00010010100000010000000000000000", --add $20, $1, $0
|
5 => B"01000011111000000000000000001101", --jmc print
|
||||||
6 => B"00001000000101001111111111110001", --sto $20, 65521
|
6 => B"00001100001000000000000011001011", --loa $1, 203
|
||||||
7 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
7 => B"01000011111000000000000000001101", --jmc print
|
||||||
8 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
8 => B"00001100001000000000000011001100", --loa $1, 204
|
||||||
9 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
9 => B"01000011111000000000000000001101", --jmc print
|
||||||
10 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
10 => B"00111100001000000000001000000000", --lui $1, 512
|
||||||
11 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
11 => B"01000011111000000000000000011010", --jmc printAscii
|
||||||
12 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
12 => B"11111100000000000000000000000000", --hlt
|
||||||
13 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
13 => B"00010010100000010000000000000000", --add $20, $1, $0
|
||||||
14 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
14 => B"00001000000101001111111111110001", --sto $20, 65521
|
||||||
15 => B"00001000000101001111111111110001", --sto $20, 65521
|
15 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
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,42 +57,41 @@ 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"00000110100101000000000000000000", --shr $20, $20, $0
|
23 => B"00110000000000000000000000011001", --jpz endPrint
|
||||||
24 => B"00001000000101001111111111110001", --sto $20, 65521
|
24 => B"00111000000000000000000000001110", --jmp printLoop
|
||||||
25 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
25 => B"01000100000111110000000000000000", --ret
|
||||||
26 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
26 => B"00010010100000010000000000000000", --add $20, $1, $0
|
||||||
27 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
27 => B"00100110101101000111100000000000", --and $21, $20, 15
|
||||||
28 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
28 => B"00100010101101011000000000000000", --or $21, $21, 48
|
||||||
29 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
29 => B"00010110110101010101000000000000", --sub $22, $21, 10
|
||||||
30 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
30 => B"00110100000000000000000000100000", --jpc smaller
|
||||||
31 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
31 => B"00010010101101010011100000000000", --add $21, $21, 7
|
||||||
32 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
32 => B"00001000000101011111111111110001", --sto $21, 65521
|
||||||
33 => B"00001000000101001111111111110001", --sto $20, 65521
|
33 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
34 => B"01000100000111110000000000000000", --ret
|
34 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
35 => B"00111101010000000000001001011000", --lui $10, 600
|
35 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
36 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
36 => B"00000110100101000000000000000000", --shr $20, $20, $0
|
||||||
37 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
37 => B"00110000000000000000000000000000", --jpz asciloop:
|
||||||
38 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
38 => B"01000100000111110000000000000000", --ret
|
||||||
39 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
|
||||||
40 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
--
|
||||||
41 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
-- Some variables
|
||||||
42 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
--
|
||||||
43 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
|
||||||
44 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
-- Geraffel
|
||||||
45 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
200 => x"61726547",
|
||||||
46 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
201 => x"6c656666",
|
||||||
47 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
|
||||||
48 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
-- Processor
|
||||||
49 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
202 => x"6f725020",
|
||||||
50 => B"00000001010010100000000000000000", --shl $10, $10, $0
|
203 => x"73736563",
|
||||||
51 => B"00111101011000000000000000000001", --lui $11, 1
|
204 => x"0a20726f",
|
||||||
52 => B"00010101010010100101100000000000", --sub $10, $10, $11
|
|
||||||
53 => B"00110000000000000000000000110111", --jpz endloop
|
-- Return
|
||||||
54 => B"00111000000000000000000000110100", --jmp loop
|
205 => x"0a202020",
|
||||||
55 => B"01000100000111110000000000000000", --ret
|
|
||||||
|
|
||||||
|
|
||||||
others => (others => '0')
|
others => (others => '0')
|
||||||
);
|
);
|
||||||
|
|
||||||
signal sRam : MEMORY;
|
signal sRam : MEMORY;
|
||||||
|
Loading…
Reference in New Issue
Block a user