Commit Graph

40 Commits

Author SHA1 Message Date
David Shah
4f4aa53120
Merge pull request #460 from whitequark/better-embed
Simplify and improve chipdb embedding/loading
2020-06-26 11:32:13 +01:00
whitequark
89e0cc8078 Simplify and improve chipdb embedding/loading. 2020-06-26 08:36:07 +00:00
whitequark
19a3095ecb Fix typo 2020-06-25 17:26:57 +00:00
whitequark
1dc1164dce CMake: rewrite chipdb handling from ground up. 2020-06-25 14:03:37 +00: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
Miodrag Milanovic
96c14abd1f Add TRELLIS_PROGRAM_PREFIX 2020-04-11 22:05:30 +02:00
Sylvain Munaut
054be6fb67 build: Default the ECP5 and iCE40 roots to the install prefix
If the user specifies a custom install prefix, chances are icestrom/trellis
are also in that prefix rather than the hardcoded /usr/local

Fixes #351

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-03-03 15:32:10 +01:00
Sebastian Birke
2c938e0e8b Rename cmake path variable TRELLIS_ROOT to TRELLIS_INSTALL_PREFIX 2020-02-04 18:19:45 +01:00
Jared Boone
1b560ae44c CMake: Changing the definition of TRELLIS_ROOT to point to root of lib, share containing trellis libs and data
two other commit message of squashed commits:
CMake: Search for user lib inside trellis instead of libtrellis

CMake: Fix missing path component for share contents
2020-02-04 18:19:45 +01:00
Larry Doolittle
eba6ea53f8 More adjustments to .bba file locations
Follows PM discussion with Marcus Comstedt.
Extend changes in .bba file location (made in commit b6a7b60) to ice40 and MSVC cases,
  so all cases become compatible with read-only access to git tree.
Only known down-side is inefficiency when building out-of-tree for multiple architectures;
  people following that use case should consider using PREGENERATED_BBA_PATH.
It would be nice if there were less copy-paste in MSVC vs. non-MSVC content in family.cmake,
  but that would have to be addressed by someone more skilled in Cmake and MSVC.
2020-01-14 12:28:40 -08:00
Larry Doolittle
b6a7b607fd Remove barrier to out-of-tree builds
With this change, nextpnr can build successfully (and run correctly) using the git tree as a read-only reference.
No change in behavior observed for in-tree builds.
2020-01-12 21:11:56 -08:00
Miodrag Milanovic
796d648995 Merge remote-tracking branch 'origin/master' into mmicko/ecp5_gui 2019-12-28 13:54:06 +01:00
David Shah
b582ba810c ecp5: Make database build depend on constids.inc
Signed-off-by: David Shah <dave@ds0.me>
2019-10-20 10:29:07 +01:00
Miodrag Milanovic
f7a6d4dc06 Start adding visible wires 2019-10-20 09:41:48 +02:00
David Shah
8351ae275e Merge branch 'precompiled-bba' of https://github.com/xobs/nextpnr into xobs-precompiled-bba 2019-09-19 16:02:10 +01:00
Sean Cross
062091e9e4 ecp5: add support for PREGENERATED_BBA_PATH
Support pre-generated bba files to speed up compiling on Windows
and get it compiling on Darwin.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-17 11:32:44 +08:00
Marcus Comstedt
2f9b04fd56 CMake: Generate chipdbs in build tree when building out-of-tree
Signed-off-by: Marcus Comstedt <marcus@mc.pp.se>
2019-09-15 13:42:17 +02:00
Marcus Comstedt
3d9ce8836c bba: Require explicit endianness flag, and supply it
Signed-off-by: Marcus Comstedt <marcus@mc.pp.se>
2019-09-15 12:30:03 +02:00
Sean Cross
f98960b936 ecp5: use $PYTHON_EXECUTABLE for python path
Sometimes the python executable might have a different name.  Cmake
sets the $PYTHON_EXECUTABLE variable to point to the binary path,
so use this variable.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-09 22:10:51 +08:00
whitequark
1b3c8ea9c1 CMake: serialize chipdb generation by default.
Fixes #296.
2019-06-26 21:31:24 +00:00
whitequark
640285755e CMake: formatting. NFC. 2019-06-26 21:27:57 +00:00
Tobias Müller
ea91ea163e Use cmake's find_library to search for pytrellis. 2019-05-11 12:39:50 +02:00
Miodrag Milanović
c52202233a
Merge branch 'master' into mmaped_chipdb 2019-02-12 18:53:20 +01:00
Gabriel L. Somlo
1b28bdd121 ecp5: cmake: Search for pytrellis.so in multiple locations
If a distro-specific "trellis-devel" package is used, the
pytrellis.so library might be located in a dedicated directory,
rather than under TRELLIS_ROOT.

Search for pytrellis.so in a list of directories, then subsequently
use the first match as part of PYTHONPATH.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2019-02-10 06:42:38 -05: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
David Shah
b8bff6b8b5
Merge pull request #210 from twam/master
Search for trellis in /usr/local/share/trellis if not specified with …
2019-01-27 14:56:42 +00:00
Miodrag Milanovic
dbaae51159 Make cross compile possible for mingw 2019-01-27 10:10:37 +01:00
Tobias Müller
95ed84fd91 Search for trellis in /usr/local/share/trellis if not specified with -DTRELLIS_ROOT 2019-01-13 17:15:28 +01:00
David Shah
18813f2056 ecp5: Adding real timing data to database
Signed-off-by: David Shah <dave@ds0.me>
2018-11-16 13:26:28 +00:00
William D. Jones
14ad19e064 Use native PATH environment-variable separator on Windows for PYTHONPATH. Fixes 'Bad address' error in cmake.
Signed-off-by: William D. Jones <thor0505@comcast.net>
2018-11-03 13:12:37 -04:00
David Shah
a3ae3f9791 ecp5: Update to use const IdStrings in place of PortPin/BelType
Signed-off-by: David Shah <davey1576@gmail.com>
2018-08-08 19:08:43 +02:00
David Shah
0658759495 ecp5: Remove libtrellis link for bitstream gen
Signed-off-by: David Shah <davey1576@gmail.com>
2018-08-01 15:58:38 +02:00
David Shah
4b6d78ebe7 ecp5: Update trellis_import to use new bbasm
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-25 14:15:39 +02:00
David Shah
e6725dcde4 ecp5: Build all chip types
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-17 12:46:25 +02:00
David Shah
d16d34736f ecp5/cmake: Improve error message when trellis/pytrellis not found
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-12 19:59:18 +02:00
David Shah
de82ecad59 ecp5: Make target device 45k on account of current hardware access
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:09 +02:00
David Shah
6cc6113d5a ecp5: Link libtrellis library to ecp5 binary
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:09 +02:00
David Shah
bb683d71d6 ecp5: Add 25k database
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:41:36 +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