2018-06-02 19:23:50 +08:00
|
|
|
nextpnr -- a portable FPGA place and route tool
|
|
|
|
===============================================
|
|
|
|
|
|
|
|
Supported Architectures
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
- iCE40
|
|
|
|
|
2018-06-02 19:57:08 +08:00
|
|
|
Prequisites
|
|
|
|
-----------
|
|
|
|
|
|
|
|
- CMake 3.3 or later
|
2018-06-12 23:36:19 +08:00
|
|
|
- Modern C++11 compiler (`clang-format` required for development)
|
2018-06-07 02:44:54 +08:00
|
|
|
- Qt5 or later (`qt5-default` for Ubuntu 16.04)
|
2018-06-02 19:57:08 +08:00
|
|
|
- Python 3.5 or later, including development libraries (`python3-dev` for Ubuntu)
|
2018-06-07 02:44:54 +08:00
|
|
|
- Boost libraries (`libboost-dev` or `libboost-all-dev` for Ubuntu)
|
2018-06-02 19:57:08 +08:00
|
|
|
- Icestorm, with chipdbs installed in `/usr/local/share/icebox`
|
2018-06-08 17:24:32 +08:00
|
|
|
- Latest git Yosys is required to synthesise the demo design
|
2018-06-02 19:57:08 +08:00
|
|
|
|
2018-06-02 19:23:50 +08:00
|
|
|
Building
|
|
|
|
--------
|
|
|
|
|
2018-06-02 19:57:08 +08:00
|
|
|
- Use CMake to generate the Makefiles (only needs to be done when `CMakeLists.txt` changes)
|
|
|
|
- For a debug build, run `cmake -DCMAKE_BUILD_TYPE=Debug .`
|
2018-06-07 19:20:16 +08:00
|
|
|
- For a debug build with HX1K support only, run ` cmake -DCMAKE_BUILD_TYPE=Debug -DICE40_HX1K_ONLY=1 .`
|
2018-06-02 19:57:08 +08:00
|
|
|
- For a release build, run `cmake .`
|
2018-06-13 19:14:51 +08:00
|
|
|
- Add `-DCMAKE_INSTALL_PREFIX=/your/install/prefix` to use a different install prefix to the default `/usr/local`
|
2018-06-02 19:57:08 +08:00
|
|
|
- Use Make to run the build itself
|
2018-06-22 19:22:14 +08:00
|
|
|
- For all binary targets, just run `make`
|
|
|
|
- For just the iCE40 CLI&GUI binary, run `make nextpnr-ice40`
|
2018-06-02 19:57:08 +08:00
|
|
|
- For just the iCE40 Python module, run `make nextpnrpy_ice40`
|
|
|
|
- Using too many parallel jobs may lead to out-of-memory issues due to the significant memory needed to build the chipdbs
|
2018-06-13 19:14:51 +08:00
|
|
|
- To install nextpnr, run `make install`
|
2018-06-02 19:57:08 +08:00
|
|
|
|
|
|
|
Running
|
|
|
|
--------
|
|
|
|
|
2018-06-08 17:24:32 +08:00
|
|
|
- To run the CLI binary, just run `./nextpnr-ice40` (you should see command line help)
|
|
|
|
- To start the UI, run `./nextpnr-ice40 --gui`
|
|
|
|
- The Python module is called `nextpnrpy_ice40.so`. To test it, run `PYTHONPATH=. python3 python/python_mod_test.py`
|
2018-06-12 23:36:19 +08:00
|
|
|
- Run `yosys blinky.ys` in `ice40/` to synthesise the blinky design and
|
|
|
|
produce `blinky.json`.
|
2018-06-13 19:14:51 +08:00
|
|
|
- To place-and-route the blinky using nextpnr, run `./nextpnr-ice40 --hx1k --json ice40/blinky.json --pcf ice40/blinky.pcf --asc blinky.asc`
|
2018-06-08 17:24:32 +08:00
|
|
|
|
|
|
|
Notes
|
|
|
|
-------
|
|
|
|
|
|
|
|
- All code is formatted using `clang-format` according to the style rules in `.clang-format` (LLVM based with
|
|
|
|
increased indent widths and brace wraps after classes).
|
|
|
|
- To automatically format all source code, run `make clangformat`.
|