Difference between revisions of "IOP16 16-bit I/O CPU Design"

From Land Boards Wiki
Jump to navigation Jump to search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Overview ==
+
= Overview =
  
This CPU is intended to be used as an I/O Processor. The CPU can be used as a Microcontroller replacement in many applications. It implemented in an FPGA. It is useful for offloading polled I/O or replacing CPUs in small applications. The majority of these applications deal with 8-bit data and that's where this CPU excels.
+
This CPU is intended to be used as an [https://www.brainkart.com/article/I-O-Processors_8637/ I/O Processor]. The CPU can be used as a Microcontroller replacement in many applications. It can be embedded into an FPGA with a separate Host Computer off-loading tedious I/O programming. It is useful for offloading polled I/O or replacing CPUs in small applications. The majority of these applications deal with 8-bit data and that's where this CPU excels.
  
 
<video type="youtube">ZtEJHF-pVU0</video>
 
<video type="youtube">ZtEJHF-pVU0</video>
Line 7: Line 7:
 
[https://www.youtube.com/watch?v=ZtEJHF-pVU0&list=PLn__0BqzWEWNspQ0xkG5h-oSJ21EAet8H Video PlayList]
 
[https://www.youtube.com/watch?v=ZtEJHF-pVU0&list=PLn__0BqzWEWNspQ0xkG5h-oSJ21EAet8H Video PlayList]
  
== Features Set ==
+
= Features Set =
  
* 16-bit CPU
+
* [https://github.com/douggilliland/IOP16/tree/main/IOP16_CPU 16-bit CPU]
 
* Simple/consistent [[IOP16 Opcodes|opcode bit fields]]
 
* Simple/consistent [[IOP16 Opcodes|opcode bit fields]]
 
** Instructions are always 16-bits wide
 
** Instructions are always 16-bits wide
Line 16: Line 16:
 
** 4-bit register field (shared with address/offset)
 
** 4-bit register field (shared with address/offset)
 
** 8-bit constant (shared with address/offset)
 
** 8-bit constant (shared with address/offset)
* High enough Performance - 12.5 MIPS
+
* High enough [[IOP-16 Performance]] - 12.5 MIPS
 
** 4 of 50 MHz FPGA clocks
 
** 4 of 50 MHz FPGA clocks
 
* [[IOP16 Register File|Register File]]
 
* [[IOP16 Register File|Register File]]
** 8 General Purpose registers
+
** 4, 8, or 13 General Purpose registers
 
** 3 constant value registers
 
** 3 constant value registers
 
** Registers are 8-bits
 
** Registers are 8-bits
 
* 12-bit of Program address (up to 4K instructions)
 
* 12-bit of Program address (up to 4K instructions)
* Return Stack
+
* [[Return Stack|IOP-16 Stack]]
 
** 0 (none)
 
** 0 (none)
** 1 deep (does not use SRAM)
+
** 1 deep
** Optionally deeper as build option
+
** Optionally deeper as build option (uses SRAM)
  
 
<video type="youtube">9mVS9uzOa8s</video>
 
<video type="youtube">9mVS9uzOa8s</video>
  
== IOP16 Block Diagram ==
+
= IOP16 Block Diagram =
  
 
[[file:IOP16_Block-Diagram.png]]
 
[[file:IOP16_Block-Diagram.png]]
  
== Instruction Set ==
+
= Instruction Set =
  
 
* [[IOP16 Instructions Detail]]
 
* [[IOP16 Instructions Detail]]
  
== Assembler ==
+
= Assembler =
  
 
* [[IOP16 Assembler|Table driven Assembler]]
 
* [[IOP16 Assembler|Table driven Assembler]]
Line 45: Line 45:
 
*** MIF (Memory Initialization File) is Altera ROM initialization File
 
*** MIF (Memory Initialization File) is Altera ROM initialization File
  
== Hardware Requirements ==
+
= Hardware Requirements =
  
 
* Targeted at an FPGA implementation
 
* Targeted at an FPGA implementation
Line 51: Line 51:
 
** Coded in VHDL
 
** Coded in VHDL
  
=== Resources ===
+
== Resources ==
  
 
* Very small LUT/Memory footprint in FPGA
 
* Very small LUT/Memory footprint in FPGA
** Uses 271 logic cells in an Altera EP4 FPGA
+
* Uses 271 logic cells in an Altera EP4 FPGA
** Requires a minimum 1 of 1K SRAM blocks (depends on program size)
+
* Uses 76 registers in an Altera EP4 FPGA
 +
* Requires a minimum 1 of 1K SRAM blocks (depends on program size)
 
*** Trade-off - SRAM could be replaced with logic cells (in theory)
 
*** Trade-off - SRAM could be replaced with logic cells (in theory)
  
=== Target Hardware ===
+
== Target Hardware ==
  
 
[[File:CycloneIV_Starter_Kit_P528-720px.jpg]]
 
[[File:CycloneIV_Starter_Kit_P528-720px.jpg]]
Line 71: Line 72:
 
<video type="youtube">02s5rlaEy4Q</video>
 
<video type="youtube">02s5rlaEy4Q</video>
  
== Peripheral Support ==
+
=== Build on Cyclone 10 FPGA ===
  
* Extensive [[IOP16 Peripheral Support|Peripheral Support]]
+
* [https://github.com/douggilliland/IOP16/tree/main/Higher_Level_Examples/TestIOP16_Max_Cy10 Cyclone 10 FPGA example]
 +
 
 +
=== Build into MultiComp in a Box ===
 +
 
 +
* [[Multicomp in a Box]]
 +
 
 +
= Peripheral Support =
 +
 
 +
* [[IOP16 Peripheral Support|Extensive Peripheral Support]]
 
* 8-bit address (controls up to 256 peripherals)
 
* 8-bit address (controls up to 256 peripherals)
 
* 8-bit data
 
* 8-bit data
Line 79: Line 88:
 
* Write strobe (a couple of clocks wide)
 
* Write strobe (a couple of clocks wide)
  
== Code Examples ==
+
= Code Examples =
  
 
Here are some Code and FPGA build example applications
 
Here are some Code and FPGA build example applications
Line 85: Line 94:
 
* [https://github.com/douggilliland/Design_A_CPU Design a CPU Base Code] - GitHub
 
* [https://github.com/douggilliland/Design_A_CPU Design a CPU Base Code] - GitHub
  
=== Blink LED ===
+
== Blink LED ==
  
 
Almost minimal design = CPU + Timer + LED
 
Almost minimal design = CPU + Timer + LED
Line 92: Line 101:
 
* [https://github.com/douggilliland/IOP16/blob/main/IOP16_Code/testTimer/testTimer.csv testTimer Code]
 
* [https://github.com/douggilliland/IOP16/blob/main/IOP16_Code/testTimer/testTimer.csv testTimer Code]
  
=== ANSI Terminal ===
+
== ANSI Terminal ==
  
 
* [https://github.com/douggilliland/IOP16/tree/main/Higher_Level_Examples/ANSITerm2 ANSITerm2 FPGA]
 
* [https://github.com/douggilliland/IOP16/tree/main/Higher_Level_Examples/ANSITerm2 ANSITerm2 FPGA]
 
* [https://github.com/douggilliland/Design_A_CPU/tree/main/CPU_Code/Application_Code/ANSITerm03 ANSITerm03 Code]
 
* [https://github.com/douggilliland/Design_A_CPU/tree/main/CPU_Code/Application_Code/ANSITerm03 ANSITerm03 Code]
 
* [https://hackaday.io/project/180415-ansi-terminal-in-an-fpga Hackaday ANSI Terminal in an FPGA]
 
* [https://hackaday.io/project/180415-ansi-terminal-in-an-fpga Hackaday ANSI Terminal in an FPGA]
 +
 +
== 6800 Microprocessor Front Panel ==
 +
 +
* [https://github.com/douggilliland/MultiComp/tree/master/MultiComp_On_RETRO-EP4CE15/M6800_MIKBUG_FrontPanel01 6800 CPU with Front Panel]
 +
* [[Front Panel for 8 Bit Computers V2]]
  
 
=== Front Panel Loopback ===
 
=== Front Panel Loopback ===
Line 104: Line 118:
 
* [https://hackaday.io/project/180199-8-bit-computer-front-panel Hackaday Front Panel]
 
* [https://hackaday.io/project/180199-8-bit-computer-front-panel Hackaday Front Panel]
  
== IOP16 Porting Guide ==
+
= IOP16 Extending/Embedding Guide =
  
* [[IOP16 Porting Guide]]
+
* [[Extend IOP16 minimal example|Extend IOP16 minimal example by adding peripherals]]
 +
* [[Embed IOP16|Embed IOP16 into another design]]
  
== External References ==
+
= External References =
  
 
* [https://hackaday.io/project/180452-small-cpu-in-vhdl Hackaday.io page].
 
* [https://hackaday.io/project/180452-small-cpu-in-vhdl Hackaday.io page].
 
* [https://www.youtube.com/watch?v=ZtEJHF-pVU0&list=PLn__0BqzWEWNspQ0xkG5h-oSJ21EAet8H YouTube Video Series].
 
* [https://www.youtube.com/watch?v=ZtEJHF-pVU0&list=PLn__0BqzWEWNspQ0xkG5h-oSJ21EAet8H YouTube Video Series].

Latest revision as of 17:45, 19 April 2022

Overview

This CPU is intended to be used as an I/O Processor. The CPU can be used as a Microcontroller replacement in many applications. It can be embedded into an FPGA with a separate Host Computer off-loading tedious I/O programming. It is useful for offloading polled I/O or replacing CPUs in small applications. The majority of these applications deal with 8-bit data and that's where this CPU excels.

Video PlayList

Features Set

  • 16-bit CPU
  • Simple/consistent opcode bit fields
    • Instructions are always 16-bits wide
    • 4-bit opcode
      • Some "sub-instructions" allow more than 16 instructions
    • 4-bit register field (shared with address/offset)
    • 8-bit constant (shared with address/offset)
  • High enough IOP-16 Performance - 12.5 MIPS
    • 4 of 50 MHz FPGA clocks
  • Register File
    • 4, 8, or 13 General Purpose registers
    • 3 constant value registers
    • Registers are 8-bits
  • 12-bit of Program address (up to 4K instructions)
  • IOP-16 Stack
    • 0 (none)
    • 1 deep
    • Optionally deeper as build option (uses SRAM)

IOP16 Block Diagram

IOP16 Block-Diagram.png

Instruction Set

Assembler

  • Table driven Assembler
    • Input comes from a CSV file
    • Outputs .MIF and Listing files
      • MIF (Memory Initialization File) is Altera ROM initialization File

Hardware Requirements

  • Targeted at an FPGA implementation
    • The CPU could easily be run on pretty much any FPGA
    • Coded in VHDL

Resources

  • Very small LUT/Memory footprint in FPGA
  • Uses 271 logic cells in an Altera EP4 FPGA
  • Uses 76 registers in an Altera EP4 FPGA
  • Requires a minimum 1 of 1K SRAM blocks (depends on program size)
      • Trade-off - SRAM could be replaced with logic cells (in theory)

Target Hardware

CycloneIV Starter Kit P528-720px.jpg

Build on Cyclone 10 FPGA

Build into MultiComp in a Box

Peripheral Support

  • Extensive Peripheral Support
  • 8-bit address (controls up to 256 peripherals)
  • 8-bit data
  • Read strobe (a couple of clocks wide)
  • Write strobe (a couple of clocks wide)

Code Examples

Here are some Code and FPGA build example applications

Blink LED

Almost minimal design = CPU + Timer + LED

ANSI Terminal

6800 Microprocessor Front Panel

Front Panel Loopback

IOP16 Extending/Embedding Guide

External References