OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [README.md] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 alfik
### Description
2
 
3
The ao486 is an x86 compatible Verilog core implementing all features of a 486 SX.
4
The core was modeled and tested based on the Bochs software x86 implementation.
5
Together with the 486 core, the ao486 project also contains a SoC capable of
6
booting the Linux kernel version 3.13 and Microsoft Windows 95.
7
 
8
### Features
9
 
10
The ao486 processor model has the following features:
11
- pipeline architecture with 4 main stages: decode, read, execute and write,
12
- all 486 instructions are implemented, together with CPUID,
13
- 16 kB instruction cache,
14
- 16 kB write-back data cache,
15
- TLB for 32 entries,
16
- Altera Avalon interfaces for memory and io access.
17
 
18
The ao486 SoC consists of the following components:
19
- ao486 processor,
20
- IDE hard drive that redirects to a HDL SD card driver,
21
- floppy controller that also redirects to the SD card driver,
22
- 8259 PIC,
23
- 8237 DMA,
24
- Sound Blaster 2.0 with DSP and OPL2 (FM synthesis not fully working).
25
  Sound output redirected to a WM8731 audio codec,
26
- 8254 PIT,
27
- 8042 keyboard and mouse controller,
28
- RTC
29
- standard VGA.
30
 
31
All components are modeled as Altera Qsys components. Altera Qsys connects all
32
parts together, and supplies the SDRAM controller.
33
 
34
The ao486 project is currently only running on the Terasic DE2-115 board.
35
 
36
### Resource usage
37
 
38
The project is synthesised for the Altera Cyclone IV E EP4CE115F29C7 device.
39
Resource utilization is as follows:
40
 
41
| Unit               | Logic cells | M9K memory blocks |
42
|--------------------|-------------|-------------------|
43
| ao486 processor    | 36517       | 47                |
44
| floppy             | 1514        | 2                 |
45
| hdd                | 2071        | 17                |
46
| nios2              | 1056        | 3                 |
47
| onchip for nios2   | 0           | 32                |
48
| pc_dma             | 848         | 0                 |
49
| pic                | 388         | 0                 |
50
| pit                | 667         | 0                 |
51
| ps2                | 742         | 2                 |
52
| rtc                | 783         | 1                 |
53
| sound              | 37131       | 29                |
54
| vga                | 2534        | 260               |
55
 
56
The fitter raport after compiling all components of the ao486 project is as
57
follows:
58
 
59
```
60
Fitter Status : Successful - Sun Mar 30 21:00:13 2014
61
Quartus II 64-Bit Version : 13.1.0 Build 162 10/23/2013 SJ Web Edition
62
Revision Name : soc
63
Top-level Entity Name : soc
64
Family : Cyclone IV E
65
Device : EP4CE115F29C7
66
Timing Models : Final
67
Total logic elements : 91,256 / 114,480 ( 80 % )
68
    Total combinational functions : 86,811 / 114,480 ( 76 % )
69
    Dedicated logic registers : 26,746 / 114,480 ( 23 % )
70
Total registers : 26865
71
Total pins : 108 / 529 ( 20 % )
72
Total virtual pins : 0
73
Total memory bits : 2,993,408 / 3,981,312 ( 75 % )
74
Embedded Multiplier 9-bit elements : 44 / 532 ( 8 % )
75
Total PLLs : 1 / 4 ( 25 % )
76
```
77
 
78
The maximum frequency is 39 MHz. The project uses a 30 MHz clock.
79
 
80
### Running software
81
 
82
The ao486 successfuly runs the following software:
83
- Microsoft MS-DOS version 6.22,
84
- Microsoft Windows for Workgroups 3.11,
85
- Microsoft Windows 95,
86
- Linux 3.13.1.
87
 
88
### BIOS
89
 
90
The ao486 project uses the BIOS from the Bochs project
91
(http://bochs.sourceforge.net, version 2.6.2). Some minor changes
92
were required to support the hard drive.
93
 
94
The VGA BIOS is from the VGABIOS project (http://www.nongnu.org/vgabios,
95
version 0.7a). No changes were required. The VGA model does not have VBE
96
extensions, so the extensions were disabled.
97
 
98
### NIOS2 controller
99
 
100
The ao486 SoC uses a Altera NIOS2 processor for managing all components and
101
displaying the contents of the On Screen Display.
102
 
103
The OSD allows the user to insert and remove floppy disks.
104
 
105
### License
106
 
107
All files in the following directories:
108
- rtl,
109
- ao486_tool,
110
- sim
111
 
112
are licensed under the BSD license:
113
 
114
All files in the following directories:
115
- bochs486,
116
- bochsDevs
117
 
118
are taken from the Bochs Project and are licensed under the LGPL license.
119
 
120
The binary file sd/fd_1_44m/fdboot.img is taken from the FreeDOS project.
121
 
122
The binary file sd/bios/bochs_legacy is a compiled BIOS from the Bochs project.
123
 
124
The binary file sd/vgabios/vgabios-lgpl is a compiled VGA BIOS from the vgabios
125
project.
126
 
127
### Compiling
128
To compile the SoC, which contains the NIOS II microcontroller,  Altera Quartus II software is required.
129
The Verilog components of the SoC, in particular the ao486 processor, should be possible to compile
130
in any Verilog compiler. Currently synthesis project files are prepared only for Altera Quartus II.
131
 
132
NOTE: In the current version some synthesis project files -- especially the paths in those files, could be
133
broken.
134
 
135
#### ao486 processor
136
To compile the ao486 processor load the project file from syn/components/ao486/ao486.qpf.
137
 
138
#### SoC
139
To compile the ao486 SoC load the project file from syn/soc/soc.qpf.
140
 
141 5 alfik
Before compiling in Altera Quartus II, the Qsys system must be generated.
142
 
143 3 alfik
#### BIOS
144
To compile the BIOS do the following:
145
- extract the bochs-2.6.2 source archive,
146
- apply the patch from the directory bios/bochs-2.6.2 by running in the extracted directory:
147
  patch -p1 < (path to patch file)
148
- run ./configure in bochs
149
- run make in bochs
150
- cd bios
151
- make
152
- the binary file BIOS-bochs-legacy works with ao486 SoC.
153
 
154
#### VGABIOS
155
To compile the VGABIOS do the following:
156
- extract the vgabios-0.7a source archive,
157
- apply the patch form the directory bios/vgabios-0.7a by running in the extracted directory:
158
  patch -p1 < (path to patch file)
159
- run make in vgabios,
160
- the binary file VGABIOS-lgpl-latest.bin works with ao486 SoC.
161
 
162
### Running the SoC on Terasic DE2-115
163
 
164
- compile the soc Altera Quartus II project in syn/soc/soc.qpf
165
- compile the firmware for the NIOS II by:
166
    - opening the Nios II Software Build Tools for Eclipse,
167
    - creating a workspace in the directory syn/soc/firmware,
168
    - importing the two projects 'exe' and 'exe_bsp',
169
    - genrating BSP on the 'exe_bsp' project,
170
    - compiling the 'exe' project.
171 5 alfik
- compile the BIOS and copy the binary to the directory sd/bios,
172
- compile the VGABIOS and copy the binary to the directory sd/vgabios,
173
- compile the ao486_tool by running 'ant jar' in the directory ao486_tool,
174 3 alfik
- edit the files in the directory sd/hdd. They contain the position of the virtual hard disk located on
175
  the SD card. The start entry must be a multiplicity of 512. The values are in bytes from the begining
176
  of the SD card,
177
- run 'java -cp ./dist/ao486_tool.jar ao486.SDGenerator' in the directory ao486_tool,
178
- copy the file ao486_tool/sd.dat to the first sectors of the SD card by using 'dd if=sd.dat of=/dev/sdXXX'.
179 5 alfik
- insert the SD card to the Terasic DE2-115 board,
180 3 alfik
- program the FPGA using the SOF file,
181
- load and run the firmware of the NIOS II controller,
182
- select the BIOS file on the On Screen Display by using KEY0 for down, KEY1 for up and KEY2 for select,
183
- select the VGABIOS file on the OSD,
184
- select the hard drive on the OSD,
185
- select the floppy on the OSD. Use the KEYs to select the floppy image. Use KEY3 to cancel.
186
- after selecting the floppy or pressing cancel, ao486 boots,
187
- to activate the OSD press KEY2.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.