Giter Site home page Giter Site logo

magmathon's People

Contributors

edwardcwang avatar leonardt avatar phanrahan avatar rsetaluri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

magmathon's Issues

chisel_tutorial

I moved the chisel_tutorial examples from magma/examples to tutorial/chisel_tutorial/src. We should update these examples.

Working directory vs magmathon directory

We see this in cs107e as well, once users start editing notebooks/files in the magmathon repo, they can't easily pull changes/updates. Perhaps create a template working directory repo (starter project) and have magmathon as a supporting repo

Provide install script for icestorm tool chain?

We made one for the last hackathon: https://github.com/phanrahan/magma/blob/master/notebooks/icestick/install.py

The benefit is a one click solution for most people, the downside is that if it breaks, it can be more challenging to resolve the issue (compared to when a person is manually stepping through the install process for their specific system).

If we do plan to use this, we should test it both on macos and linux. We could also try it on a linux VM and see if we can get that working (for windows users)

Installation

We have two versions of the Install instructions. One is a jupyter notebook and the other is the top level README.md. I suggest we consolidate and just one version.

I vote for the README.md since this can all be done nicely with command line tools.

Note also that the tests directory contains only a single example blink.py

Prep for Facebook Magmathon

  • improve wiring error messages
  • unify error and warnings, depreciate print
  • improve coreir wrappers - phanrahan/mantle#105
  • editing pass through all notebooks
  • add fsm example (UART) using combinational functions
  • rerun notebooks
    • coreir-tutorial (was chisel-tutorial)
    • tutorial
    • advanced
    • signal-generator
    • advanced/verilator (blocked by fault issue)
  • order icesticks (Pat)
  • ship 4 icesticks to James (Pat)
  • solder headers
  • pass filename/lineno to coreir/verilog backends
  • Test notebooks w/ hardware
    • tutorial/popcount
    • advanced/lut
    • signal-generator solutions (using logic analyzer)
  • Add a fault notebook
  • migrate wiki to magma/doc

Installation issues with brew linking errors

I tried to run the install_icestorm.py script before I had read/write permission to /usr/local. The script tries to brew install, but fails at brew linking. After chmoding my /usr/local. rerunning the script does not work. I had to manually do:

brew link libftdi0
brew link libusb
brew link libusb-compat
brew install tcl-tk

to get the icestorm tools installed

Magmathon Plan

Part 0

o magmathon/README.md has installation instructions

Part 1

  • Getting Started - blink.py

  • Full Adder - combinational logic

  • Add - combinational logic

  • Register - sequential logic

  • Counter - synchronous

  • TFF

  • RIpple

  • Higher-order operators - braid

  • Register

    • col
    • join
  • ROM

    • fork
  • SISO

    • fold
  • SIPO

    • scan
      o Metaprogramming
    • popcount8
    • popcount

o siggen exercise

  • square
  • triangle
  • pwm
  • sawtooth
  • delta-sigma
  • sine
  • dds

Part 2

  • inspect - print repr
  • debugger
  • simulate
  • verilator
  • coreir
  • firrtl
  • verilog (from verilog)
  • lut

Question about IceStick programmer

Hello,

Is it possible to use Lattice Standalone Programmer (for Windows) for uploading bin files to IceStick, instead of setup passthrough USB to VM to use IceStorm tool? If that is possible I can avoid setting up my VM with USB passthrough which seems not easy. The tool looks free to download at www.latticesemi.com.

Thank you.

Dry run of installation on MacOS/Linux

We should do a dry run of the installation process on both MacOS and Linux to verify everything is in order. In particular, we should test the install_icestorm.py script.

Update magmathon

  • Cheat sheet/language spec (ala Chisel's cheat sheet https://inst.eecs.berkeley.edu/~cs250/sp17/handouts/chisel-cheatsheet3.pdf), Raj
  • Review documentation (read the docs), Raj
  • Document the various ways to write modules using the different syntaxes (base, combinational, sequential), Raj
  • Remove warnings when importing magma/mantle (Raj, Lenny)
  • Check types used as input and output to testing infrastructure and simulators (Lenny)
  • Rerun notebooks, Pat
  • Switch over from icestick to coreir, Pat
  • Review director organization and examples, All
  • Simulation and testing, PythonSimulator?, Lenny
  • Update setup instructions, Lenny
  • regfile notebook, Lenny
  • add note about combinational polymorphism to full adder notebook, Lenny
  • loop unrolling in Add notebook, Lenny
  • More text in comb/seq notebook, Lenny

Adder Simulator

I am trying to simulate an Add circuit with the following code:

from magma import *
set_mantle_target("ice40")
from mantle import*
from magma.simulator import PythonSimulator

Add = DefineAdd(8)
print(Add)
add_sim = PythonSimulator(Add)

high = uint(0x01,8)
low = uint(0x03,8)

add_sim.set_value(Add.I0, high)
add_sim.set_value(Add.I1, low)
print(add_sim.get_value(Add.O))

I expect to get 0x04 as output in bits form, but instead I get [False, False, False, False, False, False, False, False] (it seems python interprets the 1s as False). Am I doing something wrong here?

build vagrant and docker using CI

We ran into issues with the vagrant VM having out of date submodules. Ideally every time we check something into this repository (e.g. updating submodule commits) we should rebuild the docker and vagrant images and release them.

Simulate notebook improvements

  • Currently it only shows stepping and printing values, should also show how to set inputs/outputs
  • It should also clearly explain functions like evaluate, advance and advance_cycle, also cover the basics of the simulator semantics

MANTLE env var

Currently mantle defaults to the coreir backend since that has the most recent consistent usage. We should either update the default or make sure the users have this properly configured for the hackathon.

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.