-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
212 lines (145 loc) · 6.78 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
================================================================================
= S3MO5 - a MO5 computer redesign for the Spartan 3 starter kit
================================================================================
Copyright (C) 2005 - Olivier Ringot <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
================================================================================
= RELEASE V1.0
================================================================================
================================================================================
= Directory structure
================================================================================
I) The behavioural C model of the S3MO5 is located in the ./model directory
o the model itself :
s3mo5.h S3MO5 model
s3mo5.c
memory.c
alu.c CPU6809 model
opcode.c
exec.c
disassemble.c CPU6809 disassembler
mtpack.h compression routine for cpu logging
mtpack.c
s19.h S19 file format routines
s19.c
o Some utilities :
bin2ram16.c convert .bin file to memory file suitable for testbench memory model
bintos19.c convert .bin file to .s19 file
dither.c convert a 16 true color .ppm picture to a dithered 8 color .ppm picture
genfs.c generate a file system suitable for the S3MO5 bios
genmire.c generate a test dithered picture
mtpack-cat.c uncompress cpu log file
s3_peek.c read a byte from the S3MO5 through the UART link
s3_poke.c write a byte to the S3MO5 though the UART link
s3_init upload monitor, s3bios and filesystem to the S3MO5 through the UART link
o the S3MO5 bios
s3bios.s
II) The synthesizable S3MO5 VHDL design is located into the ./fpga/hdl directory
o the processor opcode compatible with the 6809
cpu_package.vhd
cpu6809.vhd processor top
alu.vhd arithmetic and logic unit
datapath.vhd processor datapath
sequencer.vhd processor state machine
o the PS/2 keyboard controller
keyboard_package.vhd
keyboard.vhd
o the memory controller
memcntl_package.vhd
memcntl.vhd
o a minimum uart
uart.vhd
o a SVGA display controller
videocntl_package.vhd
videocntl.vhd
o the S3MO5 top
s3mo5_package.vhd
s3mo5.vhd
o configurations for RTL or GL simulation
s3mo5_rtl_conf.vhd
s3mo5_gate_conf.vhd
o testbenches
ram256kx16.vhd
testbench_alu.vhd
testbench_cpu6809.vhd
testbench_datapath.vhd
testbench_keyboard.vhd
testbench_memcntl.vhd
testbench_s3mo5.vhd
testbench_s3mo5_package.vhd
testbench_uart.vhd
testbench_videocntl.vhd
o the constraint file for PAR
s3mo5.ucf
================================================================================
= Terminal configuration
================================================================================
RS232: 115200 bauds, 8 bits, no parity, 1 start, 1 stop
stty -F $SERIAL_DEVICE 115200 -parenb -clocal -crtscts -cstopb -icrnl -ixon -ixoff \
-parmrk -onlcr -opost -isig -icanon -echo -echok -iexten -echoe -echok \
-echoctl -echoke
when $SERIAL_DEVICE can be /dev/ttyS0 , /dev/ttyS1 , etc...
================================================================================
= Model building
================================================================================
O) Required tools
o as6809 (http://nostalgies.thomsonistes.org/dev/asm-thomson.tar.gz)
o GNU development suit
o Perl
I) Monitor preparation
1)The MO5 monitor rom is not included in this package, you have first to download
it from the web.
2)Once downloaded, verify the file MD5 hash.
The expected signature is cb15b8d3423acc09edc2b2a08fda3824.
3)copy the monitor file into the ./model directory with the file name 'mo5monitor.bin'.
II) File system preparation
1) In ./model directory, edit the 'fs.txt' file to populate the filesystem with the .k7 images.
Each entry is described by a group of two lines, the first one indicating the .k7 file path,
and the second one defining the title entry displayed under the S3MO5 bios.
III) Model compilation
Once steps I) & II) done, type 'make' in the ./model directory. This will build the s3mo5 model
, the s3mo5 bios, all the related utilities and patch the monitor rom.
================================================================================
= Running the C model
================================================================================
In ./model, type 's3mo5 --s19=s3mo5.s19' to execute the C model.
The model options can be displayed by typing 's3mo5 --help'
================================================================================
= Programming the S3MO5 FPGA
================================================================================
Plug a SVGA screen, a PS/2 keyboard to the Spartan3 Starter Kit and a RS-232
cable in between the S3SK and the PC.
(At this time, a random pattern is displayed on the SVGA screen)
Once the terminal configured and the RS232 cable plugged, verify if the S3MO5
memory is accessible by performing some memory accesses :
ie:
'>s3_poke 0x0000 0xae'
'>s3_peek 0x0000' should return 0xae
The memory upload is performed with the 's3_init' command :
'>s3_init mo5rom_patch_bios.bin s3bios.bin fs.bin'
After the uploading completion, the S3MO5 is ready.
================================================================================
= Switches and buttons meaning
================================================================================
pbutton(3) : reset
switch(7) : irq_sel (timer 20 ms or vsync 13.3 ms)
switch(2) : time average for color display
switch(1) : 7 segments display (ps2=0;uart=1)
switch(0) : turbo (8.33 MHz or 1 MHz)
================================================================================
= TO DO
================================================================================
o Optical pen
o Improve s3mo5 bios in order to support write access to FS
o Keyboard support for multiple key pressed