Giter Site home page Giter Site logo

shdl6800's Introduction

shdl6800

This is a SpinalHDL reimplementation of Robert Baruch's 6800 processor implementation written in nMigen.

Robert also posts videos about the implementation, which you can find on his YouTube channel.

Why?

I am experimenting with several different hardware description languages, and nMigen (combined with the LiteX toolbox) looks really good. I also have some experience with SpinalHDL, and while watching his videos, it looked surprisingly similar to how you would implement it in SpinalHDL. This reimplementation is just to see how similar it can be to his implementation.

Status

The following instructions have been implemented:

  • ADC (with formal add)
  • ADD (with formal add)
  • AND (with formal and)
  • ASL (with formal sh_rot)
  • ASR (with formal sh_rot)
  • BCC (with formal br)
  • BCS (with formal br)
  • BEQ (with formal br)
  • BGE (with formal br)
  • BGT (with formal br)
  • BHI (with formal br)
  • BIT (with formal bit)
  • BLE (with formal br)
  • BLS (with formal br)
  • BLT (with formal br)
  • BMI (with formal br)
  • BNE (with formal br)
  • BPL (with formal br)
  • BRA (with formal br)
  • BSR (with formal br)
  • BVC (with formal br)
  • BVS (with formal br)
  • CLC (with formal flag)
  • CLI (with formal flag)
  • CLR (with formal clr)
  • CLV (with formal flag)
  • CMP (with formal cmp)
  • COM (with formal com)
  • DEC (with formal inc_dec)
  • DEX (with formal inc_dec_x)
  • EOR (with formal eor)
  • INC (with formal inc_dec)
  • INX (with formal inc_dec_x)
  • JMP (with formal jmp)
  • LDA (with formal lda)
  • LSR (with formal sh_rot)
  • NEG (with formal neg)
  • NOP
  • ORA (with formal ora)
  • ROL (with formal sh_rot)
  • ROR (with formal sh_rot)
  • SBC (with formal sub)
  • SEC (with formal flag)
  • SEI (with formal flag)
  • SEV (with formal flag)
  • STA (with formal sta)
  • SUB (with formal sub)
  • TAP (with formal tap)
  • TPA (with formal tpa)
  • TST (with formal tst)

Generating Verilog

Run the main function of the Core object:

sbt "runMain shdl6800.Core"

Running Simulation

To run simulation, you need Verilator. Once installed, run the main function of the Core object with sim as a parameter:

sbt "runMain shdl6800.Core sim"

This will generate Verilator code of the core and simulate the design as described in Core.scala. It will also generate a test.vcd trace file in the simWorkspace/Core folder, which you can view with GTKWave.

Formal Verification

Formal verification requires the free and open-source SymbiYosys and Boolector tools. Once installed, you can either formally verify all instructions, one by one:

make -s formal

Or verify them in parallel by specifying how many you want with the -j<number> flag. For example, to use all the cores of your CPU:

make -s formal -j$(nproc)

Or you can verify a single instruction by specifying the filename of the formal verification file of that instruction. For example, verifying the LDA instruction is done like this:

make -s Formal_LDA

License

shdl6800 is free and open hardware and is licensed under the ISC licence.

shdl6800's People

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

Forkers

fourks

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.