Commit Graph

71 Commits

Author SHA1 Message Date
gatecat
43b8dde923 Use hashlib in placers
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-02 15:04:49 +01:00
gatecat
579b98c596 Use hashlib for core netlist structures
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-02 14:27:56 +01:00
gatecat
14863bc04e Update placers to use new cluster APIs
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-06 11:47:07 +01:00
Adam Greig
2fdf41ac01
HeAP: Skip high-strength cells in both cell loops.
Previously only the first loop skipped cells with high belStrength,
but they can't be processed by the second loop either, so skip them
there too.
2021-04-12 13:42:20 +01:00
Keith Rothman
351ca3b5ea Use NEXTPNR_NAMESPACE macro's now that headers are seperated.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-15 18:49:12 +00:00
gatecat
8a4bf3a780 timing: Integration tweaks
Signed-off-by: gatecat <gatecat@ds0.me>
2021-03-05 10:04:35 +00:00
gatecat
ebc2527368 timing: Use new engine for HeAP
Signed-off-by: gatecat <gatecat@ds0.me>
2021-03-04 10:29:36 +00:00
Keith Rothman
99a2262d61 Use scope in router1/2 and placer1.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-01 09:43:39 -08:00
Keith Rothman
77a5a60a66 Fix latent bug with context locking in placer HeAP.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-26 11:40:58 -08:00
Keith Rothman
7878561970 Add placement sanity check in placer_heap.
Also check return of placer1_refine.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-26 11:27:43 -08:00
gatecat
162793aa87 Refactor some common code to CellInfo methods
Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-23 13:11:10 +00:00
gatecat
72b7a2e107 HeAP: Document legalise_placement_strict better
Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-23 13:11:10 +00:00
Balint Cristian
456688a49d Expose ice40 arch placer-heap internal parameters. 2021-02-18 00:06:23 +02:00
gatecat
c7c13cd95f Remove isValidBelForCell
This Arch API dates from when we were first working out how to
implement placement validity checking, and in practice is little used by
the core parts of placer1/HeAP and the Arch implementation involves a
lot of duplication with isBelLocationValid.

In the short term; placement validity checking is better served by the
combination of checkBelAvail and isValidBelForCellType before placement;
followed by isBelLocationValid after placement (potentially after
moving/swapping multiple cells).

Longer term, removing this API makes things a bit cleaner for a new
validity checking API.

Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-16 13:31:36 +00:00
D. Shah
6d23461bcd ecp5: Proof-of-concept using IdStringList for bel names
This uses the new IdStringList API to store bel names for the ECP5. Note
that other arches and the GUI do not yet build with this
proof-of-concept patch.

getBelByName still uses the old implementation and could be more
efficiently implemented with further development.

Signed-off-by: D. Shah <dave@ds0.me>
2021-02-02 17:00:12 +00:00
Keith Rothman
da74a425d2 Run "make clangformat".
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:44:49 -08:00
Keith Rothman
1deab29b05 Moving missing empty check into initial placement loop.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:43:38 -08:00
Keith Rothman
9fe546f279 Rename Partition -> BelBucket.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:34:56 -08:00
Keith Rothman
8d9390fc46 Fix regression in use of FastBels.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:34:56 -08:00
Keith Rothman
16394d3158 Address some compiler warnings.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:34:56 -08:00
Keith Rothman
d03d9d839b Working compile of ECP5.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:34:56 -08:00
Keith Rothman
878fcdd22d Implement partitioning in placer_heap.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:34:56 -08:00
Keith Rothman
2285c8dbbd Initial refactoring of placer API.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-02 07:34:56 -08:00
D. Shah
94e8847d67 cleanup: Spelling fixes
Signed-off-by: D. Shah <dave@ds0.me>
2021-01-28 15:19:06 +00:00
D. Shah
6ecf7f86c8 cleanup: Remove dead/unused code
Note that some '#if 0' code that might still be useful for debugging in
the future has been retained.

Signed-off-by: D. Shah <dave@ds0.me>
2021-01-28 14:59:13 +00:00
Per Grön
60276e3447 C++17 compatibility: Don't use std::random_shuffle
std::random_shuffle deprecated in C++14 and was removed in C++17.
2020-12-30 18:53:32 +01:00
David Shah
1df8ac805a HeAP: Add timeout to IO placement
Signed-off-by: David Shah <dave@ds0.me>
2020-06-25 19:42:53 +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
David Shah
9125698cb0 HeAP: backport out-of-range fix
Signed-off-by: David Shah <dave@ds0.me>
2020-02-12 10:41:27 +00:00
David Shah
1cb0e3af03 HeAP: Add X and Y scaling factors for asymmetric arches
Signed-off-by: David Shah <dave@ds0.me>
2020-02-12 10:41:27 +00:00
David Shah
7db1484c75 HeAP: Make beta configurable
Signed-off-by: David Shah <dave@ds0.me>
2020-02-12 10:41:27 +00:00
David Shah
d1f5cdcb93 HeAP: Improve handling of heterogeneous slice arches
Signed-off-by: David Shah <dave@ds0.me>
2020-02-12 10:41:27 +00:00
David Shah
1ff060c5ad HeAP: Make solver tolerance arch-configurable
Signed-off-by: David Shah <dave@ds0.me>
2020-02-12 10:41:27 +00:00
David Shah
abfe31d5d2 HeAP: increase timeout
Signed-off-by: David Shah <dave@ds0.me>
2019-12-30 15:53:24 +00:00
David Shah
89e15d488a HeAP: fix region constraint handling
Signed-off-by: David Shah <dave@ds0.me>
2019-12-01 14:18:10 +00:00
David Shah
4916eb9bb1 HeAP: more realistic timeout threshold
Signed-off-by: David Shah <dave@ds0.me>
2019-11-26 21:45:46 +00:00
David Shah
523ed4cfb2 HeAP: improve error handling when stuck
Signed-off-by: David Shah <dave@ds0.me>
2019-11-26 10:16:27 +00:00
David Shah
75f403db60 HeAP: support for bel region constraints
Signed-off-by: David Shah <dave@ds0.me>
2019-11-26 10:01:33 +00:00
David Shah
1839a3a770 Major Property improvements for common and iCE40
Signed-off-by: David Shah <dave@ds0.me>
2019-08-05 14:52:15 +01:00
Miodrag Milanovic
bd694bda19 Switching from std to boost fix crash 2019-07-05 10:22:42 +02:00
Miodrag Milanovic
831c7f2ef1 Speedup critical path 2019-06-28 13:43:55 +02:00
Miodrag Milanovic
8d5724f4fd moved some context variables to settings 2019-06-15 15:23:51 +02:00
Miodrag Milanovic
95280060b8 No need for settings class 2019-06-15 13:09:49 +02:00
David Shah
db152b332b HeAP: Don't call Eigen if system is empty
Fixes #259

Signed-off-by: David Shah <dave@ds0.me>
2019-04-01 12:18:02 +01:00
David Shah
25e3350675 HeAP: Make log output more consistent
Signed-off-by: David Shah <dave@ds0.me>
2019-03-25 15:39:15 +00:00
David Shah
00b09fbb43 HeAP: Per-iteration output all on one line
Signed-off-by: David Shah <dave@ds0.me>
2019-03-24 11:18:38 +00:00
David Shah
bd12c0a486 HeAP: Add PlacerHeapCfg
Signed-off-by: David Shah <dave@ds0.me>
2019-03-22 10:31:54 +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
8e4e03d980 HeAP: Fix occupancy count
Signed-off-by: David Shah <davey1576@gmail.com>
2019-03-22 10:31:54 +00:00