phanrahan / magmathon Goto Github PK
View Code? Open in Web Editor NEWMagma Hackathon
License: MIT License
Magma Hackathon
License: MIT License
Docs for Counter circuit definition seem to be out of date. They describe the parameter has_r, but parameter name in actual definition is "has_reset" (https://github.com/phanrahan/mantle/blob/master/mantle/common/counter.py)
These should be removed/renamed since we're only having a one-day session
We should remove the following hackathon setup instructions in the Magma wiki.
https://github.com/phanrahan/magma/wiki/Magma-Hackathon-Setup
We should add the instructions about how to install jupyter to this site.
I moved the chisel_tutorial examples from magma/examples to tutorial/chisel_tutorial/src. We should update these examples.
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.
magma/doc
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.
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.
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
Here's an example from the mantle tests: https://github.com/phanrahan/mantle/blob/e96d340e07061dfd510b04fcc4f58aa4187c48b1/tests/test_coreir/test_util/test_pop.py#L14-L19
This tutorial appears to be broken on the version of Magma that's linked to this repo:
https://github.com/phanrahan/magmathon/blob/master/notebooks/tutorial/FullAdder.ipynb
In general, is there any automatic testing of the tutorials here?
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)
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?
Show the mappings between Verilog and magma features, discuss where things are similar or different.
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.
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
evaluate
, advance
and advance_cycle
, also cover the basics of the simulator semanticsHere's an example using the new @m.circuit.combinational
syntax to implement an FSM similar to the Verilog case statement style. We should add a notebook for this that discusses this in more detail.
https://github.com/phanrahan/mantle/tree/master/examples/example/fsm
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
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
ROM
SISO
SIPO
o siggen exercise
Part 2
Also include a note for future iterations that attendees should submit a PR with a link to a github repo containing their project
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.