GithubHelp home page GithubHelp logo

osresearch / risc8 Goto Github PK

View Code? Open in Web Editor NEW
24.0 8.0 2.0 285 KB

Mostly AVR compatible FPGA soft-core

Makefile 1.12% Verilog 93.13% C 5.05% Assembly 0.69%
fpga microcontroller up5k ice40 yosys softcore upduino

risc8's Introduction

RISC-8 softcore

The RISC-8 is a small 8-bit CPU that is mostly compatible with the AVR instruction set. It does not have 100% of the architecture implemented, although enough to run many avr-gcc compiled programs in the soft-core.

Sometimes you want all the power of a 32-bit RISC-V like Claire's picorv32, although sometimes the 8-bit CPU isn't a limitation and you prefer faster synthesis times (10 seconds vs 45 seconds) or using fewer FPGA resources (1200 LC vs 4500 LC), and the 8-bit CPU isn't a limitation.

CPU overview

The CPU has a two stage pipeline (instruction decode and register fetch, operation and register write) and can retire one instruction per clock. Most instructions are single cycle, with some complex instructions like IN/OUT, LD/ST and CALL/RET that require multiple cycles.

On an ice40up5k it uses approximately 1400 LC for the SOC with uart and gpio with nearly the full instruction set (which will synthesize around 15.5 MHz). By removing some of the instructions the design can run up to 18 MHz, and overclocking is also possible.

The ice40up5k's 64 KB of SPRAM can be used for the SOC's data memory, although the program memory has to be in DPRAM so that it can be stored in the bitstream.

The two stage pipeline allows the register file to be stored in block RAM, which greatly reducing the number of logic cells required. The register file has a forward-feed to support immediate use-after-write with no wait states.

Limitations

  • No interrupts
  • No SPM instruction support
  • Not very many built in peripherals
  • Probably full of bugs

Examples

Instruction set

risc8's People

Contributors

osresearch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

risc8's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.