nextpnr/machxo2
2021-02-12 10:36:59 +00:00
..
examples Add demo with RGB LED 2021-02-12 10:36:59 +00:00
arch.cc machxo2: Checkpoint commit for slice bitstream generation. 2021-02-12 10:36:59 +00:00
arch.h machxo2: clang format. 2021-02-12 10:36:59 +00:00
archdefs.h machxo2: Add/fix copyright banners. 2021-02-12 10:36:59 +00:00
bitstream.cc machxo2: Don't write out config bits for cells without location info. 2021-02-12 10:36:59 +00:00
bitstream.h machxo2: Add/fix copyright banners. 2021-02-12 10:36:59 +00:00
cells.cc machxo2: Fix packing when FF is driven by a constant; UART test core working on silicon, fails post-synth sim. 2021-02-12 10:36:59 +00:00
cells.h machxo2: Add packing logic to handle FFs fed with constant value; UART test core routes. 2021-02-12 10:36:59 +00:00
CMakeLists.txt Update machxo2 backend with build system changes. 2021-02-12 10:36:59 +00:00
config.cc machxo2: Add stub bitstream writer plus support files. 2021-02-12 10:36:59 +00:00
config.h machxo2: Add stub bitstream writer plus support files. 2021-02-12 10:36:59 +00:00
constids.inc machxo2: Fix REGMODE identifier (per slice, not per-FF). 2021-02-12 10:36:59 +00:00
facade_import.py machxo2: Convert facade_import to use pybind API from pytrellis. 2021-02-12 10:36:59 +00:00
family.cmake machxo2: Fail CMake configuration is BUILD_PYTHON is ON (not supported for now). 2021-02-12 10:36:59 +00:00
main.cc machxo2: clang format. 2021-02-12 10:36:59 +00:00
pack.cc machxo2: Fix packing when FF is driven by a constant; UART test core working on silicon, fails post-synth sim. 2021-02-12 10:36:59 +00:00
README.md machxo2: Add quickstart README.md. 2021-02-12 10:36:59 +00:00

nextpnr-machxo2

To be filled in w/ details later.

Quick Start

The following commands are known to work on a near-fresh Linux Mint system (thank you securelyfitz!):

Prerequisites

sudo apt install cmake clang-format libboost-all-dev build-essential
qt5-default libeigen3-dev build-essential clang bison flex libreadline-dev
gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3
libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
python3-setuptools python3-serial

Installation

Use an empty directory to hold all the cloned repositories.

git clone git@github.com:cr1901/prjtrellis.git
cd prjtrellis
git checkout facade
git submodule update --init --recursive
cd libtrellis
cmake -DCMAKE_INSTALL_PREFIX=/usr
make -j 8
sudo make install

cd ../../

git clone git@github.com:cr1901/yosys.git
cd yosys/
git checkout machxo2
make config-gcc
make
sudo make install

cd ../

git clone git@github.com:tinyfpga/TinyFPGA-A-Programmer.git
cd TinyFPGA-A-Programmer/
sudo python setup.py install

cd ../

git clone git@github.com:cr1901/nextpnr.git
cd nextpnr
git checkout machxo2
git submodule update --init --recursive
cmake . -DARCH=machxo2 -DBUILD_GUI=OFF  -DTRELLIS_INSTALL_PREFIX=/usr -DBUILD_PYTHON=OFF -DBUILD_HEAP=OFF
make

Demo

If you have a TinyFPGA Ax2 board with the TinyFPGA Programmer, the following script will build a blinky bitstream and load it onto the MachXO2; the gateware will flash the LED!

cd machxo2/examples/
sh demo.sh

The tinyfpga.v code used in demo.sh is slightly modified from the user's guide to accommodate (* LOC = "pin" *) constraints.