1 |
5 |
robfinch |
# rf6809 Overview
|
2 |
|
|
|
3 |
|
|
rf6809 is a 6809 instruction set and programming model compatible core. The addressable memory range has been increased to 24-bits or three bytes.
|
4 |
|
|
There are minimal changes to the programming model and instruction set to support 24-bit addressing.
|
5 |
|
|
The core is configurable for either eight or twelve bit bytes. When configured for 12-bit bytes addressing is increased to 36-bits.
|
6 |
|
|
|
7 |
|
|
# Unusual Features
|
8 |
|
|
## 12-bit Bytes
|
9 |
|
|
The core may be configured to use 12-bit bytes. This increases the effective address range of the core.
|
10 |
|
|
|
11 |
|
|
## Instruction cache
|
12 |
|
|
There is a 4kB instruction cache. The cache can supply all the bytes of an instruction in one clock cycle improving performance.
|
13 |
|
|
|
14 |
|
|
## Asynchronous Readback Cycles
|
15 |
|
|
The core may be configured for asynchronous readback for instruction cache read cycles. With async. readback there may be multiple outstanding read requests made by the processor before any read data is returned to it. The read data may return out-of-order with respect to the read requests. Re-ordering is handled using a four-bit address tag returned along with the read data. Async readback offers higher performance than synchronous readback.
|
16 |
|
|
|
17 |
|
|
# Differences from the 6809
|
18 |
|
|
## Registers
|
19 |
|
|
There is an additional 16-bit register USPPG that allows the user stack pointer to be placed at any page of memory. The system stack pointer must remain within the lowest 16-bits of the address range.
|
20 |
|
|
The program counter is a full 24-bit register. The JMP and JSR instructions modify only the low order 16 bits of the program counter. To modify the full 24-bits use the JMP FAR and JSR FAR instructions. A return from a far subroutine may be done using the RTF instruction.
|
21 |
|
|
|
22 |
|
|
## Operations
|
23 |
|
|
During interrupt processing the entire 24-bit program counter is stacked. The RTI instruction also loads the entire 24-bit program counter.
|
24 |
|
|
Far addressing makes use of two previously unused codes in the indexing byte of an instruction.
|
25 |
|
|
No attempt was made to mimic the 6809 bus cycle activity. Some instructions execute in fewer clock cycles than they would for a 6809. For example branches only require two clock cycles.
|
26 |
|
|
Indirect addresses must reside within the first 64k bank of memory.
|
27 |
|
|
## Exception Vectors
|
28 |
|
|
The vectors are located beginning at $FFFFF0. It is possible to keep a set of vectors at the original address then perform an indirect jump to through the originally placed vectors from one of the vector processing routines.
|
29 |
|
|
## For the 12-bit Version
|
30 |
|
|
The PG2 and PG3 prefix bytes are not needed. The prefix is incorporated in extra bits available in the 12-bit opcode.
|
31 |
|
|
Prefix 10h becomes opcode 1xxh, prefix 11h becomes opcode 2xxh.
|
32 |
|
|
|
33 |
|
|
# Additional Instructions
|
34 |
|
|
|
35 |
|
|
Additional instructions and prefixes make use of previously unused opcodes.
|
36 |
|
|
|
37 |
|
|
**JMP FAR** – performs a jump using a 24-bit extended address.
|
38 |
|
|
Opcode: 0x8F
|
39 |
|
|
|
40 |
|
|
**JSR FAR** – performs a jump to subroutine using a 24-bit extended address. The full 24-bit program counter is stored on the stack.
|
41 |
|
|
Opcode: 0xCF
|
42 |
|
|
|
43 |
|
|
**RTF** – performs a far return from subroutine by loading a full 24-bit program counter from the stack.
|
44 |
|
|
Opcode: 0x38
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
## Instruction Prefixes
|
48 |
|
|
|
49 |
|
|
**FAR**
|
50 |
|
|
FAR when applied to extended addressing indicates to use a full 24-bit address rather than a 16 bit one.
|
51 |
|
|
When the FAR prefix is applied to indirect addressing the prefix indicates that the indirect address is 24-bit. This allows the use of a 24-bit indirect address to reach anywhere in memory.
|
52 |
|
|
The FAR prefix must be applied to a PUSH / PULL instruction to get the full 24-bit program counter pushed or pulled. Otherwise only the low order 16-bits of the PC are used.
|
53 |
|
|
Opcode: 0x15
|
54 |
|
|
|
55 |
|
|
**OUTER**
|
56 |
|
|
The OUTER prefix indicates that the index register is applied after retrieving an indirect address. Normally the index register is used in the calculation of the indirect address.
|
57 |
|
|
Opcode: 0x1B
|
58 |
|
|
For the twelve-bit byte version of the core the OUTER prefix is not used as there is room in the index postbyte to indicate outer indexing.
|
59 |
|
|
|
60 |
|
|
# Size
|
61 |
|
|
The core is approximately 4200 LUTs or 2100 slices and uses 4 block rams for the instruction cache.
|
62 |
|
|
Core size is approximately 6500 LUTs / 5 block rams for the 12-bit version.
|
63 |
|
|
|
64 |
|
|
# Software
|
65 |
|
|
Software is in the works along with hardware.
|
66 |
|
|
There is a modified version of the A09 assembler which supports twelve-bit bytes and far addressing.
|
67 |
|
|
There is a modified version of the hc12 VBCC compiler which also is for twelve bit-bytes.
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
# Test Project
|
71 |
|
|
The rf6809 is used in a test project. Multiple rf6809 cores are networked together in a ring topology using a parallel bus.
|