Git Product home page Git Product logo

mantle's Introduction

Mantle

Build Status

Mantle is part of the Magma ecosystem of python programming tools for FPGAs.

Magma is a programming model for building hardware. The main abstraction in Magma is a Circuit. Circuits are created and then wired together. Magma circuits can be saved as structural verilog files.

Mantle is a library of useful circuits. Examples of mantle circuits are logic operators, arithmetic operators, comparison operators, multiplexers, decoders and encoders, registers, counters, shift regiseters and memory.

Loam is used to model FPGAs, peripherals, parts (ICs) and boards. Loam makes it easy to build applications on a variety of different FPGA demonstration boards.

Currently, Mantle supports generic verilog and the Lattice ice40 (and its open source icestorm toolchain). A Xilinx (spartan3, spartan6, zynq) backends will be released soon. An Altera backend is in the works.

Documentation

There also exist libraries for low-level FPGA-specific primitives.

Configuring Mantle

By default Mantle is configured to use the CoreIR implementation, equivalent to:

import magma as m
m.set_mantle_target("coreir")

Other options include: verilog and lattice.

Mantle can also be configured to synthesize low-level primitives for a particular FPGA.

For example, to use mantle with the Lattice ice40, set the MANTLE_TARGET environment variable.

m.set_mantle_target("ice40")

Setup

$ git clone https://github.com/phanrahan/mantle
$ cd mantle
$ pip install pytest
$ pip install -e .
$ pytest

You should see something like

==================================== test session starts =====================================
platform darwin -- Python 3.6.2, pytest-3.1.3, py-1.4.34, pluggy-0.4.0
rootdir: .../mantle, inifile:
collected 7 items

tests/ice40/test_ff.py .
tests/mantle40/test_mux.py ..
tests/verilog/test_dff.py .
tests/verilog/test_gates.py ...

================================== 7 passed in 2.78 seconds ==================================

mantle's People

Contributors

leonardt avatar phanrahan avatar david-durst avatar shacklettbp avatar rdaly525 avatar adamdai avatar makaimann avatar

Watchers

James Cloos 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.