Commit Graph

64 Commits

Author SHA1 Message Date
gatecat
62613cb266 router2: Dynamicly expand bounding box based on congestion
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-06 19:04:24 +01:00
Keith Rothman
a519341112 Fix bug in router2 where router may give up too early.
Was introduced in #612.  The logic before was intended to prevent the
router from terminating early when not using a bounding box, but the fix
in #612 simply removed that, meaning that the router might terminate
early incorrectly.  The solution here is to only use the toexplore
hysteric once a solution is found.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-06 10:22:47 -07:00
Keith Rothman
e7d81913a4 Add "checkPipAvailForNet" to Arch API.
This is important for distiguishing valid pseudo pips in the FPGA
interchange arch. This also avoids a double or triple lookup of
pip->net map.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-22 09:17:55 -07:00
Keith Rothman
965ba00e0f Moving hash map/set type selection to header.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-17 16:54:29 -07: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
Keith Rothman
a342ae56e0 Add support for partially routed nets from the placer in router2.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-12 09:53:15 -08:00
Keith Rothman
7168cf8657 Add diagnostic prints to debug lookahead performance.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-10 09:12:50 -08: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
gatecat
d1f44fe91a
Merge pull request #607 from litghost/add_absl_flat_hash_map
Add absl::flat_hash_map.
2021-03-09 08:48:25 +00:00
gatecat
326b34887c
Merge pull request #609 from YosysHQ/gatecat/sta-v2
Use new timing engine for criticality
2021-03-09 08:48:12 +00:00
gatecat
da88d3d825 router2: Fix vast perf drop when leaving bounding box
Signed-off-by: gatecat <gatecat@ds0.me>
2021-03-08 15:06:30 +00:00
gatecat
1ff2023f32 timing: Replace all users of criticality with new engine
Signed-off-by: gatecat <gatecat@ds0.me>
2021-03-04 11:29:11 +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
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
c64a910151 Allow router2 to use routed but not fixed arcs.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-25 15:55:29 -08: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
7c7d69e1d2 router2: Support for multiple bel pins per cell pin
Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-10 15:14:44 +00:00
gatecat
535723f414 Start making use of getBelPinsForCellPin API
This replaces getNetinfoSinkWire with 3 new functions for different use
cases.

At the moment all existing code has been moved to getNetinfoSinkWire
with phys_idx=0 so the build doesn't break; but this won't yet function
properly with more than one sink. But it provides a base on which to
work on refactoring the routers to support this case.

Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-10 14:18:12 +00: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
5fc3e8e4d2 cleanup: Fix compiler warnings
Signed-off-by: D. Shah <dave@ds0.me>
2021-01-28 15:02:08 +00:00
David Shah
402819c64b router2: Avoid ripup of critical path
Signed-off-by: David Shah <dave@ds0.me>
2020-12-01 09:54:19 +00:00
David Shah
3503f4e907 router2: Make splitting of wires thread-safe
Signed-off-by: David Shah <dave@ds0.me>
2020-12-01 09:38:52 +00:00
David Shah
b6c91d1621 router2: Add per-thread rng
Signed-off-by: David Shah <dave@ds0.me>
2020-12-01 09:21:44 +00:00
David Shah
5e90086d4f router2: Fix case where src and dst are the same
Signed-off-by: David Shah <dave@ds0.me>
2020-11-30 08:45:28 +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
David Shah
4b54253c24 router2: Prevent overflow
Signed-off-by: David Shah <dave@ds0.me>
2020-03-22 21:17:59 +00:00
David Shah
2248e07b66 router2: Improve flow and log output
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 13:46:05 +00:00
David Shah
a8206ed170 router2: Add a simple timing heuristic
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 13:33:20 +00:00
David Shah
ad1cc12df1 router2: Make magic numbers configurable
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
f82e133c7c router2: Fix case of undriven unsunk arcs
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
c27e7780d1 router2: Multi-thread in more cases
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
3b043432f5 router2: Flatten wire structure
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
2de98386a7 router2: Experiment with data structures
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
7ac43e5f00 router2: Profile nets by route time
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
72367e6cfd router2: Improvements
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
900fe98f0d router2: reduce bias cost factor
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
3b6d9c952a router2: special case improvement
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
a1c703729c router2: reduce memory footprint
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
37543ad003 router2: debugging
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
17256c680a router2: debugging
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
3d739b5916 router2: first pass at reserved wires
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
50b120528a router2: debugging some edge cases
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
bbc9c9b0ba router2: speedup
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
59c554b50a router2: Improve backwards routing of some cases
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
363d664f27 router2: tweaks
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
ffd679cd36 router2: Attempt to fix some stuck routing cases
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
3b28ba2f76 router2: Debugging
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
39b75244da router2: Working on multithreading
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
72f4721167 router2: Some simple partitioning
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:31 +00:00
David Shah
c21db8a0c1 router2: Congestion map generation
Signed-off-by: David Shah <dave@ds0.me>
2020-02-03 11:38:30 +00:00