Skip to content

Commit 2ed2055

Browse files
committed
Veecom new release: v1.1
1 parent d53a4ed commit 2ed2055

36 files changed

+47942
-2771
lines changed

README.md

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Veecom
22

3-
#### A Simple Yet Powerful RISC-V Computer
3+
#### Simple Yet Powerful RISC-V Computer
44

55
## Table of Contents
66
* [Introduction](#intro)<br />
@@ -11,14 +11,15 @@
1111
* [uBASIC](#ubasic)<br />
1212
* [Games](#games)<br />
1313
* [Memory Map](#mmap)<br />
14+
* [Benchmarks](#bench)<br />
1415

1516
Introduction <a name="intro"></a>
1617
---
1718

1819
Veecom is a 32-bit computer system that combines the simplicity of 8-bit home computers with modern RISC-V technology, offering users a unique and nostalgic computing experience. It features several notable improvements over the RISC-V Computer 2.0. These include a sleek new design, improved CPU microarchitecture, a new Multi-Cycle CPU version, simplified DMA design, a new replacement for the PIA and a simple BASIC interpreter for an engaging programming experience.
1920

2021
<figure align="center">
21-
<img src="screenshots/veecom.svg", alt="veecom">
22+
<img src="images/veecom.png", alt="veecom">
2223
</figure>
2324

2425
<br/>
@@ -30,7 +31,7 @@ Veecom's design follows a Memory-Mapped approach, utilizing an Address Decoder t
3031
The DMA Controller in Veecom is simpler in design and more compact, supporting up to 64KB of data transfer and addressing capability.
3132

3233
<figure align="center">
33-
<img src="screenshots/arch_orgi.svg", alt="arch_orgi">
34+
<img src="images/arch_orgi.svg", alt="arch_orgi">
3435
</figure>
3536

3637
<br/>
@@ -43,33 +44,61 @@ Veecom's CPUs are based on the RV32IM variant of the RISC-V ISA, implementing th
4344
#### Single-Cycle Version
4445

4546
<figure align="center">
46-
<img src="screenshots/cpu_single_cycle.svg", alt="cpu_sc">
47+
<img src="images/cpu_single_cycle.png", alt="cpu_sc">
4748
</figure>
4849
<br/>
4950

5051
#### Multi-Cycle Version
5152

5253
<figure align="center">
53-
<img src="screenshots/cpu_multi_cycle.svg", alt="cpu_mc">
54+
<img src="images/cpu_multi_cycle.png", alt="cpu_mc">
5455
</figure>
5556
<br/>
5657

5758
#### Pipelined Version
5859

5960
<figure align="center">
60-
<img src="screenshots/cpu_pipeline.svg", alt="cpu_5pl">
61+
<img src="images/cpu_pipelined.png", alt="cpu_5pl">
6162
</figure>
6263

6364
<br/>
6465

66+
#### Pipelined Version with Branch Prediction
67+
68+
<figure align="center">
69+
<img src="images/cpu_pipelined_bp.png", alt="cpu_5pl_bp">
70+
</figure>
71+
72+
<br/>
73+
74+
#### Branch Predictor
75+
76+
The design of this predictor is static branch prediction, featuring a 6-bit Branch History Register `BHSR` and 64-entry Branch Target Buffer `BTB`. It uses an indexing machanisim similar to `GShare predictors`, where the Program Counter `PC` value is XORed with the `BHSR`. This static predictor is a `Taken-Only` design, where only taken branches are stored in the `BTB`.
77+
78+
<figure align="center">
79+
<img src="images/branch_predictor.png", alt="via">
80+
</figure>
81+
82+
<br/>
83+
84+
85+
#### Theory vs. Implementation
86+
87+
<figure align="center">
88+
<img src="images/theory_vs_implementation.png", alt="impl">
89+
</figure>
90+
91+
<br/>
92+
93+
6594
Versatile Interface Adapter (VIA) <a name="via"></a>
6695
---
6796

6897
Inspired by the MOS 6522 VIA, Veecom's VIA features several enhancements and improvements over its predecessor, featuring three 8-bit I/O ports `Port A`, `Port B` and `Port C` that can be used for both input and output without the need for data direction register, allowing for more flexible I/O access (Please refer to [Memory Map](#mmap) section for supported operations).
6998
Additionally, the VIA features a new 8-bit timer similar to Timer-1 found in the MOS 6522 VIA. it supports multiple operation frequencies (up to `f/16`, with `f/2` set as default) and two operations modes, `One-Shot` and `Free-Run`.
7099

71100
<figure align="center">
72-
<img src="screenshots/via.svg", alt="via">
101+
<img src="images/via.png", alt="via">
73102
</figure>
74103

75104
#### Timer Operation
@@ -93,7 +122,7 @@ The Timer Expired Flag (TXP) indicates if a timer overflow has occurred. Once th
93122
This 8-bit register controls the operation of the timer, the following figure lists the functions of the command bits.
94123

95124
<figure align="center">
96-
<img src="screenshots/timer_ctrl.svg", alt="via">
125+
<img src="images/timer_ctrl.svg", alt="via">
97126
</figure>
98127

99128
<br/>
@@ -108,7 +137,7 @@ The DMA Controller in Veecom is simpler in design and more compact, supporting u
108137
The DMA Controller is designed for fast and efficient `memory-to-IO` data transfer. It features four 8-bit registers: `DSL`, `DSH`, `DAL` and `DAH`, which control the size and address of the data being transferred (Please refer to [Memory Map](#mmap) section for supported operations). The `DSL` and `DSH` registers determine the size of the data, allowing for 16-bit transfers. The `DAL` and `DAH` registers specify the memory location from which data is fetched. Once the `DAH` register is written, the DMA Controller asserts the `HRQ` (Hold Request) pin, signaling the CPU to halt if it's not currently using the system bus. In response, the CPU acknowledges the request by asserting `HLDA` (Hold Acknowledge) pin. The CPU remains halted until the transfer is completed.
109138

110139
<figure align="center">
111-
<img src="screenshots/dmac.svg", alt="dmac">
140+
<img src="images/dmac.png", alt="dmac">
112141
</figure>
113142

114143
<br/>
@@ -118,6 +147,11 @@ uBASIC <a name="ubasic"></a>
118147

119148
[Veecom uBASIC](https://github.com/MazinCE/Veecom-uBasic) is a derivative of the [uBASIC](https://dunkels.com/adam/ubasic/) interpreter originally authored by Adam Dunkels. This version of uBASIC has been improved to be made fully interactive, with the incorporation of additional commands and performance optimizations.
120149

150+
<figure align="center">
151+
<img src="images/ubasic.svg", alt="dmac">
152+
</figure>
153+
154+
<br/>
121155

122156
#### Key Features
123157

@@ -138,7 +172,7 @@ Veecom uBASIC added support for multiple new commands, these include `RUN`, `LIS
138172
50 GOTO 30
139173

140174
<figure align="center">
141-
<img src="screenshots/timer_example.svg", alt="timer_example">
175+
<img src="images/timer_example.svg", alt="timer_example">
142176
</figure>
143177
<br/>
144178

@@ -148,16 +182,16 @@ For more details, please visit [Veecom uBASIC](https://github.com/MazinCE/Veecom
148182

149183
### Games <a name="games"></a>
150184

151-
#### Lunar Lander (Apple 1 Version 1976)
185+
#### Lunar Lander (Apple 1 1976)
152186

153187
<figure align="center">
154-
<img src="screenshots/lunar_lander.png", alt="lander">
188+
<img src="images/lunar_lander.png", alt="lander">
155189
</figure>
156190
<br />
157191

158192
#### Hangman
159193
<figure align="center">
160-
<img src="screenshots/hangman.png", alt="hangman">
194+
<img src="images/hangman.png", alt="hangman">
161195
</figure>
162196

163197
<br/>
@@ -166,7 +200,7 @@ Memory Map <a name="mmap"></a>
166200
---
167201

168202
| Address | Symbol | Description | Supported Operations |
169-
| :----: | :---- | :---------------- | :--- |
203+
| :--- | :---- | :---------------- | :---: |
170204
| 0xFFFF | TXP | Timer Expired Flag | Read |
171205
| 0xFFFF | TCR | Timer Control Register| Write |
172206
| 0xFFFE | TVR | Timer Value Register | Read/Write |
@@ -182,3 +216,16 @@ Memory Map <a name="mmap"></a>
182216
| 0xFFF4 | DAL | DMA Block Address Lo | Write |
183217
|0x0000 - 0xFFF3 | RAM | Main Memory | Read/Write |
184218

219+
<br/>
220+
221+
Benchmarks <a name="bench"></a>
222+
---
223+
224+
The follwing benchmark results were obtained using `riscv64-unknown-elf-gcc (GCC) 10.1.0` with no compiler optimizations applied `-O0`. Each number represents the number of clock cycles taken for execution.
225+
226+
| CPU Model | Quick Sort (10 El) | Matrix Multiplication (4x4) | Memset (100-Integer Buffer) |
227+
| :--- | :---: | :---: | :---: |
228+
| Single-Cycle | 2322 | 6601 | 624 |
229+
| Multi-Cycle | 6298 | 19565 | 1881 |
230+
| Pipelined | 2426 | 6891 | 841 |
231+
| Pipelined w/BP | 2385 | 6770 | 643 |
File renamed without changes.

images/branch_predictor.png

11.6 KB
Loading

images/cpu_multi_cycle.png

35 KB
Loading

images/cpu_pipelined.png

71.6 KB
Loading

images/cpu_pipelined_bp.png

74.2 KB
Loading

images/cpu_single_cycle.png

30.8 KB
Loading

images/dmac.png

25.8 KB
Loading
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)