Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commelina/lambda-machine

Repository files navigation

lambda-machine

This is a VERY simple 32-bit MIPS CPU with 8 basic instructions (add, sub, and, or, lw, sw, beq and j), implemented in Clash, a language based on Haskell for hardware design.

Build

    $ stack build

Then you can read the document generated by Haddock:

    $ stack haddock --open lambda-machine

Generate HDL Model

The easiest way to generate HDL model from Clash is load a single file in clashi. A composed file is prepared at ./test/lambda-machine.hs. Run

    $ clashi

and then

    Clash.Prelude> :l lambda-machine.hs
    *Machine> :verilog
    *Machine> :systemverilog
    *Machine> :vhdl

Play with Clash

After loading source file in clashi, you can also try functions defined in Machine.Debug. And an initial system state is defined in Machine module.

About

A simple 5-stage pipelined CPU, implemented in Cλash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published