Commit Graph

425 Commits

Author SHA1 Message Date
Eddie Hung
ee2e6ed1c6 Simplify and use Arch::getNetinfoRouteDelay() for update_budget() 2018-07-23 18:58:57 -07:00
Eddie Hung
771edd1fda Merge branch 'master' into redist_slack 2018-07-23 07:16:39 -07:00
Clifford Wolf
e647604e2a Add Context::archcheck() and "nextpnr-ice40 --test"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-23 14:03:23 +02:00
Clifford Wolf
38962d0f02 clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-23 12:45:31 +02:00
Clifford Wolf
a436facfd0 Add fallback to estimateDelay() in getNetinfoRouteDelay()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-23 12:44:26 +02:00
Clifford Wolf
62b66e0208 Rename getWireBelPin to getBelPinWire
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-22 10:59:21 +02:00
Eddie Hung
e92698f32e Fix delay function used for update_budget() 2018-07-21 18:04:54 -07:00
Clifford Wolf
c6e4ad3227 Move common patterns from router1 to Context API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-22 02:16:03 +02:00
Clifford Wolf
1e96999863 clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-22 00:50:49 +02:00
Eddie Hung
5aa4cf2efb Call now-more-flexibile update_budget() during routing, but using any actual delays that we have 2018-07-21 13:59:48 -07:00
Eddie Hung
926c186ec7 Add Arch::getBudgetOverride() to eliminate hack for COUT 2018-07-21 13:05:09 -07:00
Eddie Hung
e44dc25f09 Uncomment out negative slack messages during update_budget(), make verbose 2018-07-21 12:47:09 -07:00
Clifford Wolf
9e6deed3b8 Merge branch 'q3k/lock-2-electric-boogaloo' into 'master'
Basic locking and threading for Arch/GUI

See merge request SymbioticEDA/nextpnr!10
2018-07-21 19:45:24 +00:00
Clifford Wolf
30e2f0e1e8 Add Loc constructors
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-21 21:40:06 +02:00
Eddie Hung
31c9fd28fe Merge remote-tracking branch 'origin/master' into redist_slack 2018-07-21 12:27:44 -07:00
Eddie Hung
1f6897733b Merge branch 'redist_slack' into 'redist_slack'
# Conflicts:
#   common/timing.cc
2018-07-21 19:03:23 +00:00
Sergiusz Bazanski
6588aafdb8 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/lock-2-electric-boogaloo 2018-07-21 20:00:42 +01:00
Clifford Wolf
39b843ecac Merge branch 'router1ng' into 'master'
Router1ng

See merge request SymbioticEDA/nextpnr!13
2018-07-21 17:59:44 +00:00
Clifford Wolf
c796b301d3 Bugfix in router1: Also bind src_wire
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-21 19:36:48 +02:00
David Shah
b2452f4646 HACK: set carry budgets to zero 2018-07-21 19:33:42 +02:00
Clifford Wolf
2f996e6a30 Add final sanity check in router1
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-21 17:54:47 +02:00
Clifford Wolf
41194d934b Refactoring of router1
- Use source-sink pairs as jobs, not whole nets
- Route nets with smallest slack first
- Preserve routes for already routed source-sink pairs
- Add small incentive for re-using wires

Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-21 17:02:53 +02:00
David Shah
80097526ee Fix placement bug with VexRiscV reported by John McMaster
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-21 16:45:46 +02:00
Clifford Wolf
78f40ca0af Change DelayInfo semantics to what we actually need
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-21 13:52:59 +02:00
Clifford Wolf
c556242976 Add getWireDelay API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-21 13:38:44 +02:00
David Shah
bbb140c699 Quick hack to route nets with lowest budget first 2018-07-21 11:52:41 +02:00
Eddie Hung
d23cdd6c06 Avoid hysteresis preventing placer from stopping 2018-07-21 11:19:06 +02:00
Eddie Hung
241418dc25 Add update_budget() to timing.h header 2018-07-21 11:19:06 +02:00
Eddie Hung
1cd5c9dac8 Update comment 2018-07-21 11:19:06 +02:00
Eddie Hung
3eecccc6f7 Avoid hysteresis preventing placer from stopping 2018-07-21 01:59:16 -07:00
Eddie Hung
f89115c3e3 Add update_budget() to timing.h header 2018-07-21 01:55:46 -07:00
Eddie Hung
27a79a3a4f Update comment 2018-07-21 01:55:20 -07:00
Sergiusz Bazanski
0311a27a53 Use UI lock for yielding 2018-07-20 18:34:59 +01:00
Sergiusz Bazanski
76e5236fb3 Nuke IdStringDB 2018-07-20 18:24:16 +01:00
Sergiusz Bazanski
b5b956bd21 Remove dead code. 2018-07-20 17:57:16 +01:00
Clifford Wolf
fd8239e170 Add Location APIs to generic arch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-20 18:09:22 +02:00
Clifford Wolf
f6fa0300ae Improve iCE40 and common Loc code
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-20 17:33:57 +02:00
Clifford Wolf
e16b4a325e Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into gridapi 2018-07-20 17:13:26 +02:00
Sergiusz Bazanski
19f4b68f07 clang-format and uncomment debug 2018-07-20 13:19:56 +01:00
Sergiusz Bazanski
b4b111a053 Move pthread yield hack into BaseCtx 2018-07-20 13:15:22 +01:00
Sergiusz Bazanski
b84a446eef Mix-in Deterministic RNG at Context instead of BaseCtx 2018-07-20 11:04:54 +01:00
Sergiusz Bazanski
55d5f8f248 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/lock-2-electric-boogaloo 2018-07-20 10:59:33 +01:00
David Shah
6c38df7295 ice40: Adding cell definition for DSPs
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-19 13:22:46 +02:00
David Shah
d221e90706 Reducing performance cost of asserts
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-19 11:43:10 +02:00
Clifford Wolf
609794f9e6 Add Net/Cell "udata" field
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-18 13:29:58 +02:00
Serge Bazanski
03508faabf WIP. 2018-07-17 19:16:26 +01:00
Clifford Wolf
ddfc535df7 Add ArchNetInfo and ArchCellInfo
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-17 20:04:49 +02:00
Serge Bazanski
2f5b94fe30 Add basic external locking, lock from P&R 2018-07-17 16:27:50 +01:00
Serge Bazanski
498bef3f3e Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/lock-2-electric-boogaloo 2018-07-17 16:03:48 +01:00
Clifford Wolf
c0f1af87f6 Add Loc struct for x/y/z bel locations
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-17 17:03:44 +02:00
David Shah
924037129c Fix driver finder when net is undriven
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-17 11:00:18 +02:00
David Shah
56fa8cc669 refactor: Remove incorrect uses of the term 'wirelength'
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-16 17:13:40 +02:00
Serge Bazanski
91db413c60 Refactor RNG out to separate DeterministicRNG class
This well also allow for better lifecycle control over the state of the
RNG in the future.
2018-07-14 20:33:32 +01:00
Serge Bazanski
59a790cd00 Refactor IdString functionality into IdStringDB
This lets us more precisely control the lifetime of IdString databases
in contexts/arches.
2018-07-14 20:24:20 +01:00
Sergiusz Bazanski
57f75385b0 Revert "Make PnR use Unlocked methods"
This reverts commit 9e4f97290a.
2018-07-14 18:53:08 +01:00
Sergiusz Bazanski
447ed83638 Revert "Introduce proxies for locked access to ctx"
This reverts commit 89809a8b81.
2018-07-14 18:52:56 +01:00
Sergiusz Bazanski
36b4e3382d Revert "Make GUI nice and smooth."
This reverts commit a8c84e90a3.
2018-07-14 18:50:50 +01:00
Sergiusz Bazanski
b0c05c7f75 Revert "Refactor proxies to nextpnr."
This reverts commit 9b17fe385c.
2018-07-14 18:50:37 +01:00
Sergiusz Bazanski
d9c3c117a3 Revert "clang-format"
This reverts commit 8ca7a6da25.
2018-07-14 18:50:34 +01:00
Sergiusz Bazanski
ade67ecf21 Revert "Move read methods to ReadMethods, remove some legacy access to Arch"
This reverts commit 3352ff4abb.
2018-07-14 18:50:23 +01:00
Sergiusz Bazanski
3352ff4abb Move read methods to ReadMethods, remove some legacy access to Arch 2018-07-14 11:46:32 +01:00
Sergiusz Bazanski
8ca7a6da25 clang-format 2018-07-14 11:10:59 +01:00
Sergiusz Bazanski
9b17fe385c Refactor proxies to nextpnr. 2018-07-14 11:10:31 +01:00
Sergiusz Bazanski
a8c84e90a3 Make GUI nice and smooth. 2018-07-13 20:53:52 +01:00
Sergiusz Bazanski
89809a8b81 Introduce proxies for locked access to ctx 2018-07-13 18:58:59 +01:00
Sergiusz Bazanski
9e4f97290a Make PnR use Unlocked methods 2018-07-13 14:50:58 +01:00
Sergiusz Bazanski
499951cb65 Remove legacy graphics API
For now we do not optimize the OpenGL renderer against the new decal
API, but this can be done in the future.
2018-07-12 21:30:36 +01:00
Clifford Wolf
b8a42ff53b Updates from clang-format
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-12 22:04:13 +02:00
Clifford Wolf
13e7cd8681 Add GraphicElement style enum
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-12 21:04:47 +02:00
Clifford Wolf
a436035424 Add Groups API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-12 17:22:29 +02:00
Clifford Wolf
7daa8524c8 Add ctx->place() API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-11 18:15:08 +02:00
Clifford Wolf
7df67c91b3 Add ctx->route() API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-11 18:04:09 +02:00
Clifford Wolf
2a01b5e4d3 New refreshUi API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-11 17:02:13 +02:00
Miodrag Milanovic
09735694b2 Fixed MSVC build 2018-07-11 14:39:42 +02:00
Clifford Wolf
ce6afb5f7f Merge branch 'ice40gfx' into 'master'
Ice40gfx

See merge request SymbioticEDA/nextpnr!7
2018-07-11 12:04:53 +00:00
Clifford Wolf
7081cca016 Add GUI Decals API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-11 14:03:23 +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
b397dd8071 ecp5: Adding bitstream gen for slice config
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-11 10:42:09 +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
2ad355ebeb Renamed dummy->generic for tests, also fix warning 2018-07-11 08:05:42 +02:00
Eddie Hung
18c93104be NPNR_ASSERT not to implicitly construct strings 2018-07-08 15:48:54 -07:00
Miodrag Milanovic
fcff203c23 typeof to decltype 2018-07-05 10:13:29 +02:00
David Shah
11fb625195 python: Renaming and fixing 'generic' build
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
f1bddc2852 common: Remove deprecated global IdStrings
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
46db500123 python: More design-related bindings, dump_design.py working again
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
79e91368f9 python: Update wrapper for non-unique_ptr maps
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
f6432aa88e python: Adding more wrapped bindings for ice40
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
f8ad2b31a9 python: Translate NPNR_ASSERTs to Python
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
3e8bdb5cbd python: New wrapper system working for unique_ptr maps
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
a382d906ef python: Developing context wrappers for maps
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
45ec502ded python: Adding more bindings
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
1e96d65ded python: Add context wrapper support for ranges
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
4bc12f2ead Progress on new wrapper system
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
65195513eb python: Restructuring wrapper system
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 14:55:24 +02:00
David Shah
2e8c0c872f Add NPNR_ASSERT_FALSE, use in bitstream.cc
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 13:04:31 +02:00
Miodrag Milanovic
6eaae6196c Fixed debug msvc build and fixed inaccessible base 2018-07-04 12:23:55 +02:00
David Shah
e0a851976f refactor: Replace assert with NPNR_ASSERT
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 12:15:23 +02:00
David Shah
c9d1bce859 common: Adding NPNR_ASSERT
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-04 12:04:26 +02:00
Miodrag Milanovic
1cf8293019 Fixed macros and includes for MSVC 2018-07-03 08:53:44 +02:00
David Shah
fe1ad5b086 python: Tweaking how the new wrappers will work
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-02 14:14:08 +02:00
David Shah
b720a7fddc Starting to develop a new Python wrapper system
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-01 16:40:40 +02:00
Clifford Wolf
e6dc9ce77d Add implementations for generic arch db API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-30 17:31:24 +02:00
Clifford Wolf
25f07549a1 Refactor IdString::global_ctx
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-30 07:47:04 +02:00
Clifford Wolf
c73759f9f1 Split "arch.h" in "arch.h" and "archdefs.h"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-29 20:36:34 +02:00
David Shah
302ccc14cf ice40: UltraPlus SPRAM working
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 19:58:08 +02:00
David Shah
27e7bc3b4b Improving the SA+legalisation flow
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 17:04:22 +02:00
David Shah
d908928b56 Tidying up the SA placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 15:47:56 +02:00
David Shah
23789b7569 Increase temp and diameter after legalisation
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 15:30:00 +02:00
David Shah
4977b35d2f Start legalisation at a much lower SA temperature
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 15:18:44 +02:00
David Shah
1aa4be770c Make single-cell placer less likely to get stuck
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 13:28:06 +02:00
David Shah
b5f473cd7a Integrating SA placer and legaliser
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 13:12:44 +02:00
David Shah
c18b7b3f6e ice40: Reworking placement legalisation to allow integration with SA placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 12:02:34 +02:00
Miodrag Milanovic
2037fff742 remove emb.cc 2018-06-28 17:57:26 +02:00
David Shah
92ddc31003 Improving debugability
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 15:08:37 +02:00
David Shah
b0b16a344a Improving post-ripup placement in the legaliser
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 12:18:52 +02:00
David Shah
87a5b72126 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-27 12:00:37 +02:00
David Shah
2cc7ade05b Refactor common placement functions out of SA placer for use in legaliser
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 12:00:13 +02:00
Miodrag Milanovic
bafb4702c7 reinit python tab 2018-06-27 11:45:19 +02:00
Miodrag Milanovic
0bd73c1977 Make GUI use recreated context 2018-06-26 15:47:43 +02:00
David Shah
6f12f2b7e8 Working on debugging the carry legaliser
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 15:06:59 +02:00
David Shah
962c566ffb Fixing Python bindings bugs
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 14:21:54 +02:00
David Shah
103dde79de Fixing Python bindings after adding unique_ptr
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 14:13:52 +02:00
Miodrag Milanovic
db890d3a81 nets and cells are unique_ptr's 2018-06-25 21:33:48 +02:00
David Shah
6d154cfa13 ice40: Creating a carry chain splitter function
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-25 15:39:46 +02:00
Miodrag Milanovic
fb5fb497b5 Fix some memory leaks 2018-06-25 14:34:08 +02:00
David Shah
bdd54a6847 Refactor: remove PlacementValidityChecker and move methods to Arch
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-25 11:43:59 +02:00
David Shah
37bad1f99e Fixing the Python bindings following Context/Arch refactoring
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-23 19:51:22 +02:00
Clifford Wolf
0ccd9febeb Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-23 16:14:39 +02:00
David Shah
1e8840b0f9 Update from increased clangformat line length
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-23 16:12:52 +02:00
Miodrag Milanovic
4b78ae15df clangformat cleanup 2018-06-23 16:06:49 +02:00
Clifford Wolf
a40d9dc514 Improve router ripup handling
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-23 15:58:24 +02:00
Clifford Wolf
a1681560a3 Updates from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-23 15:28:09 +02:00
Clifford Wolf
b5efe3ecbc Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-23 15:16:37 +02:00
Clifford Wolf
746d63f9fa Refactoring bind/unbind API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-23 15:16:24 +02:00
Miodrag Milanovic
550866620a removed all deprecated unused api calls 2018-06-23 15:01:49 +02:00
Miodrag Milanovic
82ec1be31f Added BUILD_GUI, BUILD_PYTHON and BUILD_TESTS cmake options, 2018-06-23 14:32:49 +02:00
David Shah
d72fe0c230 place_sa: Add option to disable timing-driven placement
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-23 12:18:44 +02:00
Miodrag Milanovic
6f4e49bb47 cleaned some warnings 2018-06-23 08:01:36 +02:00
Clifford Wolf
aa81f9d648 Switched from clifford@clifford.at to clifford@symbioticeda.com for copyright headers
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-22 16:19:17 +02:00
Clifford Wolf
001c6ceb56 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-22 15:38:17 +02:00
David Shah
f86a0d6c8c place_sa: Tweak weighting given to timing
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 15:17:00 +02:00
David Shah
d7939f96e6 place_sa: Fix temp printing
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 15:03:33 +02:00
David Shah
ce4ad44fd1 Print quasi-TNS statistic during placement
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 14:58:27 +02:00
David Shah
63baa10032 ice40: Make the packer deterministic
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 12:57:22 +02:00
David Shah
71176ac538 Fixing 5k bitstream gen and place heuristics
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 12:34:42 +02:00
Clifford Wolf
9b98a7175b Add total visit counts to router log output
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-21 20:41:20 +02:00
Clifford Wolf
2c98231f88 Updates from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-21 19:36:20 +02:00
Clifford Wolf
bfae4663fc Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
# Conflicts:
#	common/route.cc
2018-06-21 19:31:50 +02:00
Clifford Wolf
38dc1cc550 Work "overtime" to find better solutions in routing search algorithm
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-21 19:17:04 +02:00
Miodrag Milanovic
8fac26c2b7 Fixed return codes for packer, placer and router 2018-06-21 17:56:45 +02:00