Giter VIP home page Giter VIP logo

noobscpu-8bit's Introduction

NoobsCpu-8bit

Alt text

This is a simple TOY (barebones) 8bit cpu architecture for fun as a side project

Intent was to capture the entire frontend Design+Verif flow for educational purpose

this has a complete c-model/v-model/assembler/synthesis scripts for ice40 fpga

long term, I'd like to add simple peripherals around it such as uart/spi and treat it as simple mcu, running a simple game


Directory Structure:
NoobsCpu-8bit/
    |
    |---cmodel  : a cycle accurate c functional model for the cpu
    |
    |---Doc     : documentation/scratch work while working on the project. The start was with an xls file that briefly captures the ISA
    |
    |---vmodel  : verilog RTL for the processor.
    |
    |---tb      : verilog based testbench
    |
    |---utils   : A simple 2-pass assembler written in perl for the NoobsCpu-ISA. a bram based memory generator+initializer for ice40 FPGA
    |
    |---tests   : collection of tests, and scripts to run them on cmodel and RTL
    |
    |---blinky_soc  : a simple soc/uController implementation with NoobsCpu core and 1 LED as GPIO + UART TX


WHAT's required to run this?
this is completely based on opensource tools freely available.
Ensure you have the following installed in your system:
1. GCC toolchain: the cmodel is written in C. so in order to compile it you need gcc, or some other C compiler.
2. iverilog: for simulating the RTL, iverilog is used, so you'll need that
3. GTKWave: GTKWave is a opensource waveform viewer, which can be used to view/debug from vcd wavedumps, the tb produces for each test
4. perl: the assembler is written in perl, so you'll need that. + also used for a fpga_bram generator, for ice40 fpga
5. YOSYS: will be using YOSYS for synthesis

Basic Highlights

> 8 bit data path

> 3 stage pipeline

> Harvard Architecure (Separate Inst/Data memory)

> 2 KB addressable Instruction/Data Memory

> 4 General purpose registers

> Support for Direct/Indirect addressing modes

> Memory mapped IO

> has 8 user-configurable reserved opcodes (Can be used as a great teaching tool to implement interesting operations)

Running Test Suite

Alt text

Hello World over UART in FPGA

Alt text

noobscpu-8bit's People

Contributors

supratimdas avatar

Stargazers

Meyer Olanduil avatar  avatar  avatar Nawras Ahamed  avatar paperblue avatar  avatar  avatar Miguel Ángel López Fernández avatar  avatar Poludasu Sahaan avatar Batári Balázs László avatar Neelam Sharma avatar Ashwin Rajesh avatar Loester Franco avatar Teekam Chand Khandelwal avatar  avatar  avatar  avatar Sandeep Vankayala avatar Yashas Nagavane Dattatreya avatar Saaswath avatar Piyush Garyali avatar Ameya Vikram Singh avatar Pradeep Ramani avatar Srikrishna avatar

Watchers

 avatar

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.