Commit Graph

161 Commits

Author SHA1 Message Date
Keith Rothman f4dc67879e Fixup GUI link dependencies on headers from libraries.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-18 14:00:19 -07:00
whitequark bdf13ddcfb CMake: Don't include Abseil if it is not used. 2021-03-12 03:00:58 +00:00
whitequark 979e7b8709 Only depend on Abseil in threaded builds.
Abseil has a hard dependency on threads (not just in the build system
but in many places in the base libraries), so there is no way to use
it on WASI at the moment.
2021-03-10 06:18:42 +00:00
Keith Rothman 0afa0da19f Add absl::flat_hash_map.
This lowers the CPU cost of using the flat wire map in router2, and should
use less memory as well.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-01 09:55:54 -08:00
whitequark a0af4d8768
cmake: Don't enable any -Werror flags without opt-in. 2021-02-26 00:33:05 +00:00
gatecat 23413a4d12 Fix compiler warnings introduced by -Wextra
Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-25 15:15:25 +00:00
gatecat 17183fff05 cmake: Enable -Wextra, and -Werror in some cases
-Werror is not enabled by default, except on CI and for a few specific common traps, to avoid the inevitable breakages when new compiler versions add new diagnostics.

Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-25 11:05:26 +00:00
Keith Rothman 664407089b Add FPGA interchange frontend and backend.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-15 09:54:58 -08:00
gatecat 8417470276 machxo2: Add clang-format exception to machxo2 binary blob C sources. 2021-02-12 10:36:59 +00:00
gatecat 510969ab97 Create machxo2 backend (renamed from generic).
Signed-off-by: William D. Jones <thor0505@comcast.net>
2021-02-12 10:36:59 +00:00
Keith Rothman 561b519716 Initial FPGA interchange (which is just a cut-down xilinx arch).
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-04 16:38:32 -08:00
Keith Rothman a5472bc5c1 Default to Release, but allow other modes (e.g. Debug, RelWithDebInfo).
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-01-27 18:13:10 -08:00
Pepijn de Vos 3611f54902
Gowin target (#542)
* load wires

* add slice bels

* add IOB

* add aliases

* local aliases

* broken packing stuff

* working packer

* add constraints

* pnr runs1111

* add timing info

* constraints

* more constraint stuff

* add copyright

* remove generic reference

* remove parameters

* remove generic python api

* add newline to end of file

* some small refactoring

* warn on invalid constraints

* don't error on missing cell

* comment out debugging print

* typo

* avoid copy

* faster empty idstring

* remove intermediate variable

* no more deadnames

* fix cst warnings

* increase ripup and epsilon a bit

* take single device parameter

* add info to readme

* gui stubs

* Revert 4d03b681a8

* assign ff_used in assignArchInfo

* decrease beta for better routability

* try to fix CI
2020-12-30 14:59:55 +00:00
David Shah 0a54ffdd44 cmake: Disable building GUI by default
This should reduce the number of Qt5-related issues, which often prevent
even the basic command line flow from working.

Signed-off-by: David Shah <dave@ds0.me>
2020-12-08 10:01:23 +00:00
David Shah 2fe8bebc6c nexus: Update docs and CMake
Signed-off-by: David Shah <dave@ds0.me>
2020-11-30 08:59:04 +00:00
David Shah 9affda5626 nexus: Build and embed chipdb automatically
Signed-off-by: David Shah <dave@ds0.me>
2020-11-30 08:45:27 +00:00
David Shah 54e0ef9cf7 Adding archdefs and bba PODs
Signed-off-by: David Shah <dave@ds0.me>
2020-11-30 08:45:27 +00:00
Rob Landley 9e597e0dda Building nextpnr on Devuan ascii 2.0 needs the "C" language enabled.
See https://lists.j-core.org/pipermail/j-core/2020-September/000940.html
2020-09-16 03:02:12 -05:00
Miodrag Milanovic 8a7c3c9802 fix whitespace 2020-07-24 16:40:45 +02:00
Miodrag Milanovic 6bb457be69 Needed by python lib itself for static 2020-07-23 18:40:54 +02:00
Miodrag Milanovic 8f2b707d02 Initial conversion to pybind11 2020-07-23 18:35:18 +02:00
Miodrag Milanovic 7a95629aff Fix clangformat and execute it 2020-06-27 13:20:16 +02:00
whitequark bf8d4c428e CMake: require at least version 3.5 (Ubuntu 16.04). 2020-06-25 14:03:37 +00:00
whitequark 1dc1164dce CMake: rewrite chipdb handling from ground up. 2020-06-25 14:03:37 +00:00
whitequark 23d19a254d CMake: only request a CXX compiler. 2020-06-24 13:22:49 +00:00
whitequark 4c7aedcf4e CMake: promote bba to a true subproject. 2020-06-23 10:47:18 +00:00
David Shah f44498a530
Merge pull request #447 from whitequark/wasi
Port nextpnr-{ice40,ecp5} to WASI
2020-05-24 14:23:35 +01:00
whitequark e7bb04769d Port nextpnr-{ice40,ecp5} to WASI.
This involves very few changes, all typical to WASM ports:
  * WASM doesn't currently support threads or atomics so those are
    disabled.
  * WASM doesn't currently support exceptions so the exception
    machinery is stubbed out.
  * WASM doesn't (and can't) have mmap(), so an emulation library is
    used. That library currently doesn't support MAP_SHARED flags,
    so MAP_PRIVATE is used instead.

There is also an update to bring ECP5 bbasm CMake rules to parity
with iCE40 ones, since although it is possible to embed chipdb into
nextpnr on WASM, a 200 MB WASM file has very few practical uses.

The README is not updated and there is no included toolchain file
because at the moment it's not possible to build nextpnr with
upstream boost and wasi-libc. Boost requires a patch (merged, will
be available in boost 1.74.0), wasi-libc requires a few unmerged
patches.
2020-05-23 20:57:26 +00:00
Ed Bordin 7b84ed94b5 minor patch for MinGW build 2020-05-14 16:35:55 +10:00
Miodrag Milanovic bdea5d072d Support custom PROGRAM_PREFIX 2020-04-10 10:50:30 +02:00
Wladimir J. van der Laan d570163116 Correct BUILD_TESTS description in CMakeLists.txt 2020-02-12 13:44:22 +00:00
David Shah 85f4452b0a cmake: Python 3.9 support
Signed-off-by: David Shah <dave@ds0.me>
2020-01-29 17:12:07 +00:00
Tobias Müller 659c4fad56 Change version to git describe and make set-able from outside
Change version to use git describe instead of git log as this will also work
if tags are present and make the version string set-able from outside as a
parameter to cmake, so that package managers can set this if building outside
of a git working tree.
2020-01-11 11:38:45 +01:00
David Shah 240561c370 3rdparty: Add json11
Signed-off-by: David Shah <dave@ds0.me>
2019-12-27 10:44:29 +00:00
David Shah fffc3b8447 frontend/base: Top module handling
Signed-off-by: David Shah <dave@ds0.me>
2019-12-27 10:44:29 +00:00
David Shah caf7abdb8d cmake: Add boost system library
Signed-off-by: David Shah <dave@ds0.me>
2019-11-06 13:51:05 +00:00
Sean Cross 0db8995e81 cmake: don't link libutil on windows
libutil is only required to be linked on Linux.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-10-18 16:19:30 +08:00
David Shah e9cced57bf Apply Boost CMake fix to all OSs
Signed-off-by: David Shah <dave@ds0.me>
2019-10-09 10:46:30 +01:00
Miodrag Milanovic 7cd1e04951 Fix issue with latest boost on macOS, fixes #322 2019-09-28 12:33:45 +02:00
Sean Cross 0d0056a043 cmake: fix static build on Linux
When building Python, many extra libraries must be included, such
as expat and zlib.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-10 23:12:31 +08:00
Gabriel L. Somlo 2d66f8e6c9 cmake: add python38 to list of versions searched for boost components
Also, factor out actual search code (identical across versions).

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2019-08-21 10:57:43 -04:00
Sean Cross 8b63de9e55 cmake: static: add msvc check before adding msvc flags
When building with STATIC_BUILD=ON, different flags need to be specified
when using MSVC.  Check for this flag and only set them if necessary.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-15 16:28:03 +08:00
Sean Cross 0b5c0bd94e cmake: fix static build on windows
On Windows, we can make a static build by setting the triple to
x64-windows-static, but due to some issues with cmake we also need to
modify the linker flags and Python definitions.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-15 12:59:00 +08:00
Sean Cross 6e932f5a2d cmakelists: quote the last argument to REGEX REPLACE
With newer versions of cmake, an unquoted 6th argument gives the
following error:

    STRING sub-command REGEX, mode REPLACE needs at least 6 arguments
    total to command.

Quoting this fixes the issue.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-14 21:30:39 +08:00
whitequark 1b3c8ea9c1 CMake: serialize chipdb generation by default.
Fixes #296.
2019-06-26 21:31:24 +00:00
David Shah 7142db28a8 HeAP: Make HeAP placer optional
A CMake option 'BUILD_HEAP' (default on) configures building of the
HeAP placer and the associated Eigen3 dependency.

Default for the iCE40 is SA placer, with --heap-placer to use HeAP

Default for the ECP5 is HeAP placer, as SA placer can take 1hr+ for
large ECP5 designs and HeAP tends to give better QoR. --sa-placer can
be used to use SA instead, and auto-fallback to SA if HeAP not built.

Signed-off-by: David Shah <dave@ds0.me>
2019-03-22 10:31:54 +00:00
David Shah 1c824709e2 HeAP: Switching from TAUCS to Eigen
Signed-off-by: David Shah <davey1576@gmail.com>
2019-03-22 10:31:54 +00:00
David Shah ea56dc9d08 HeAP: Add TAUCS wrapper and integration
Signed-off-by: David Shah <dave@ds0.me>
2019-03-22 10:31:54 +00:00
Miodrag Milanovic 8b0af0e48d Fix according to comments on PR 2019-02-10 08:33:52 +01:00
Miodrag Milanovic 73f200fe74 Load chipdb from filesystem as option 2019-02-09 13:34:57 +01:00
Sylvain Munaut 99e1b6db47 build: Make use of the pipe option to avoid temporary files
This is really useful when building the ice40 with the gigantic .cc
files that generate multi gigabyte .s temporary files ... this way the
assembler just processed it in streaming way.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-12-04 20:20:50 +01:00
Eddie Hung 35b3aaf18f QUIET flag for cmake searches for boost python 2018-11-20 10:41:24 -08:00
Miodrag Milanovic e7fe046e57 On macOS -static flag not needed just list of .a files 2018-09-03 19:01:56 +02:00
Miodrag Milanovic 61b1a75490 ignore tests in report 2018-08-23 18:45:54 +02:00
Miodrag Milanovic 890fec2a1b Added test code coverage report 2018-08-23 18:38:34 +02:00
Miodrag Milanovic 8965922219 Added ability for static builds 2018-08-16 10:32:34 +02:00
David Shah b5f90d3814 cmake: Remove nextpnrpy so modules
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-30 15:20:50 +02:00
Miodrag Milanovic 1566e9afc3 python interpreter is mandatory in any case 2018-07-29 13:42:28 +02:00
Sergiusz Bazanski 30d481e321 gui: Add QuadTree and tests 2018-07-25 21:57:20 +01:00
David Shah 942c552e07 Add bbasm target, use as passthru in iCE40 builder
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-24 15:31:00 +02:00
Miodrag Milanovic 29df566a60 Fix MSVC build 2018-07-16 08:07:57 +02:00
Miodrag Milanovic 5216e48863 join python and info into one tab 2018-07-14 14:06:05 +02:00
David Shah a38b4fa173 cmake: Add missing pthread library
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-14 10:28:36 +02:00
Miodrag Milanovic 24618ee800 Added python37 as well, fixes latest msys2 build and macOS 2018-07-12 14:36:28 +02:00
David Shah 6601adf760 cmake: Post-rebase ecp5 fixes
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:44:06 +02:00
David Shah 1830c9372e ecp5: *** Blinky working ***
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:09 +02:00
David Shah 29d65bd368 ecp5: Working on bitstream gen
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:09 +02:00
David Shah 49f39b8d56 ecp5: Place design working, router now segfaults due to db issue
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:09 +02:00
David Shah 738b410bf8 cmake: Only add ECP5 target when TRELLIS_ROOT specified
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:08 +02:00
David Shah c4af52dd5b ecp5: Working on arch implementation
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:41:36 +02:00
Miodrag Milanovic d5be9ff584 Added cmake parameter ARCH to specify architecture to build 2018-07-11 10:23:23 +02:00
Miodrag Milanovic 2f5b5369ba Disable warning from qt5 and 2018-07-05 10:33:11 +02:00
Miodrag Milanovic 2fe13e7a07 make GUI compile on MSVC 2018-07-05 10:14:19 +02:00
Miodrag Milanovic 487299b564 cleanup for MSVC 2018-07-04 13:17:05 +02:00
Miodrag Milanovic 6eaae6196c Fixed debug msvc build and fixed inaccessible base 2018-07-04 12:23:55 +02:00
Miodrag Milanovic b96727549c Building using MSVC works 2018-07-04 12:08:16 +02:00
Miodrag Milanovic fd3c124f87 Add opetion to defie ICEBOX_ROOT, fix compile on other location 2018-07-03 20:46:05 +02:00
Miodrag Milanovic 19e9866013 Added suppression of python warnings and proper name for python boost lib for windows 2018-07-03 10:22:22 +02:00
Miodrag Milanovic 1cf8293019 Fixed macros and includes for MSVC 2018-07-03 08:53:44 +02:00
Miodrag Milanovic cd20284347 Fix link on windows 2018-07-02 10:59:25 +02:00
Clifford Wolf b908b02022 Rename "dummy" arch to "generic"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-29 20:40:55 +02:00
Miodrag Milanovic acda434c6e add sanitizer support 2018-06-24 19:32:39 +02:00
Clifford Wolf fe26ce4471 Move json parser from frontend/json/ to json/
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-23 16:20:31 +02:00
Miodrag Milanovic 82ec1be31f Added BUILD_GUI, BUILD_PYTHON and BUILD_TESTS cmake options, 2018-06-23 14:32:49 +02:00
Miodrag Milanovic e5bd4764b2 Added custom QApplication implementation 2018-06-22 16:49:15 +02:00
Miodrag Milanovic 9c03909eba Make arch specific main window 2018-06-21 13:41:33 +02:00
Miodrag Milanovic 15c5c9c425 put some files back and place generated files in special folder for deps 2018-06-20 16:23:07 +02:00
Miodrag Milanovic 36c16cd28e Cleanup of cmake files for easier development 2018-06-20 16:15:33 +02:00
Miodrag Milanovic e14b8bac66 put source changes for qtpropertybrowser back and make build simple 2018-06-20 16:15:33 +02:00
Clifford Wolf 10785bd1cc Better compiler flags, Release build per default
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-19 18:04:10 +02:00
David Shah bb4c703813 cmake: Set EXCLUDE_FROM_ALL on Python module and tests
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-18 13:11:53 +02:00
David Shah 9a2692039a cmake: Reenable -O3 for release builds
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-18 12:22:48 +02:00
David Shah a965b91321 Enable -Wall
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-18 11:45:54 +02:00
David Shah b88593ef7d cmake: Fixing the installer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-13 13:09:37 +02:00
Miodrag Milanovic 0bf54951cf Compile on windows again 2018-06-13 08:34:58 +02:00
Miodrag Milanovic 9953012154 reveresed logic for enabling main file, and made tests link arch files 2018-06-12 19:56:03 +02:00
Clifford Wolf 391d49c13e Add nextpnr namespace
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-12 14:24:59 +02:00
Miodrag Milanovic 102e10f2dd Clang format to ignore 3rdparty and fix one file 2018-06-11 21:36:54 +02:00
Miodrag Milanovic 9029ebde3b Added dummy tests per arch 2018-06-11 21:30:22 +02:00
Miodrag Milanovic 8c9ce776ec Added property editor for example 2018-06-11 21:30:22 +02:00