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
Miodrag Milanovic
f1cf449c09
compile QtPropertyBrowser
2018-06-11 21:30:22 +02:00
David Shah
c16a971c0f
python: Fixing builds as importable module
...
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-08 11:17:04 +02:00
ZipCPU
0dbfa4662f
Preliminary placer changes to main
2018-06-07 07:52:05 -04:00
ZipCPU
16b9a2f1b5
Attempt to add JSON parser--not working yet w/ build system
2018-06-06 14:44:54 -04:00
David Shah
d3f19cc27e
cmake: Fix Boost::Python finder on Gentoo
...
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-06 11:27:02 +02:00
Miodrag Milanovic
7cb42f4368
Initial GUI work
2018-06-05 21:03:06 +02:00
Clifford Wolf
d41936ecbf
Update clangformat make target and config
...
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-03 12:42:06 +02:00
Clifford Wolf
8b854a9e28
Add "clangformat" make target and .clang-format (for now with std LLVM style)
...
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-03 00:31:29 +02:00
David Shah
efcf4412ee
Improve documentation in CMakeLists.txt
...
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-02 13:48:28 +02:00
David Shah
d62f7abd95
Creating an empty Python module
...
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-02 13:48:28 +02:00
David Shah
ee0a5374d8
Add a CMake based build system
...
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-02 13:48:28 +02:00