Coder Social home page Coder Social logo

mrlxx / icez0mb1e Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abnoname/icez0mb1e

0.0 0.0 0.0 7.63 MB

FPGA 8-Bit TV80 SoC for Lattice iCE40 with complete open-source toolchain flow using yosys and SDCC

License: MIT License

Assembly 0.85% C 16.91% Makefile 3.58% Verilog 72.92% Python 5.74%

icez0mb1e's Introduction

iceZ0mb1e

iceZ0mb1e aims to build a TV80 based demonstration system-on-chip using complete open source FPGA toolchain flow (http://www.clifford.at/yosys/) including firmware compilation with SDCC.

This is a completely free microcontroller based on customizable open source components.

iceZ0mb1e consists of following parts

  • TV80 CPU (https://opencores.org/project,tv80,overview)
  • SoC RTL design, iceZ0mb1e consists of:
    • RAM and ROM (using BRAM or SPRAM)
    • UART 16450 compatible
    • Parallel IO
    • i2C Master
    • SPI Master (all CPOL/CPHA modes supported)
  • Top-Level designs for some iCE40 development boards (upduino, HX8K Breakout Board)
  • C based firmware, that is embedded into BRAM blocks during build
  • API Functions for all hardware interfaces
  • Complete make based flow, to be as clean as possible

Supported FPGAs

  • Lattice iCE40 HX8K
  • Lattice iCE40 UltraPlus 5K

No special blocks are used, so every comparable FPGA in size would fit.

Test Firmware

The included test firmware will check the RAM size and write some data to IO ports (blink LEDs). Simple UART access with 9600-8N1 is provided.

Address Map

  • ROM = 0x0000 - 0x1FFF (8192 Byte)
  • RAM = 0x8000 - 0x9FFF (8192 Byte)
  • 16450 UART Base IO = 0x18
  • Parallel Base IO = 0x40
  • i2C Master = 0x50
  • SPI Master = 060

Build for Target

  • UltraPlus 5K (default target): make firmware && make fpga && make flash
  • HX8K: make firmware TARGET=8k && make fpga TARGET=8k && make flash TARGET=8k

Simulate

  • make sim TARGET=8k
  • cocotb python tests - gpio loopback and spi test (introduced by jwrr)
    • cd cocotb; make -f makefile.firmware; make; gtkwaves iceZ0mb1e.fst

Running SoC

Installing yosys toolchain

Installation of essentials for running yosys, icestorm and nextpnr toolchain (Ubuntu 20.04):

sudo apt-get install make yosys nextpnr-ice40 fpga-icestorm

Installing verilog simulator

sudo apt-get install iverilog gtkwave

Installing SDCC toolchain

sudo apt-get install sdcc sdcc-doc sdcc-libraries sdcc-ucsim \
                     z80asm z80dasm srecord

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.