Commit Graph

1338 Commits

Author SHA1 Message Date
Miodrag Milanovic b5c1b09079 Small gui improvements and open json functionality 2018-06-19 15:17:34 +02:00
Clifford Wolf 3a505638a6 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
# Conflicts:
#	common/place_sa.cc
#	ice40/arch.h
2018-06-19 15:03:54 +02:00
Clifford Wolf d7f424b809 Improved log messages in SA placer, minor changes from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-19 15:00:24 +02:00
David Shah 9008669867 Major performance improvement to placement validity check
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 14:44:49 +02:00
Clifford Wolf 2603c6d805 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-19 14:34:45 +02:00
David Shah 786bd6b25a place_sa: Use context-wide rng
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 14:31:49 +02:00
Clifford Wolf fd40d6f58d Updates from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-19 14:10:42 +02:00
Clifford Wolf 5f37da9704 Add Context::force and "nextpnr-ice40 --force"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-19 14:10:42 +02:00
Clifford Wolf d2ff5fec08 Add rng to Context, start using ctx->verbose
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-19 12:49:40 +02:00
Clifford Wolf c910846c5c Refactor Arch/Context design hierarchy
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-19 12:08:37 +02:00
Clifford Wolf 79d1075345 Getting rid of old IdString API users, Add ctx to many internal APIs
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 17:08:35 +02:00
Clifford Wolf 58dfdfa9c8 Getting rid of users of old IdString API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 16:32:19 +02:00
Clifford Wolf 7ef4d0726b Getting rid of users of old IdString API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 16:08:19 +02:00
Clifford Wolf 0dd185a141 Getting rid of users of old IdString API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 15:53:18 +02:00
Clifford Wolf 71d07fd0bf Updates from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:57:38 +02:00
Clifford Wolf 3d7444ba9b Deprecate old IdString API with implizit global context
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:56:14 +02:00
Clifford Wolf babd5f39ab Towards IdString as per-context facility
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:53:01 +02:00
Clifford Wolf 3fe353ea03 Fixed include of "design.h" in "route.h"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:20:37 +02:00
Clifford Wolf ce2a9f2af1 Move contents of design.h to nextpnr.h
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:18:56 +02:00
Clifford Wolf cbcd2ea3ac Rename chip.h to arch.h
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:12:39 +02:00
Clifford Wolf 8ee149f4fc Rename Design to Context, derive from Arch instead of instantiating
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:06:37 +02:00
Clifford Wolf ad18cdb087 Rename Chip to Arch and ChipArgs to ArchArgs
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 13:35:25 +02:00
Clifford Wolf 2f5e9542c2 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-18 13:13:51 +02:00
David Shah ef2d0d2cb9 Fix hash specialisation for BelType and warnings in place_sa.cc
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-18 12:20:06 +02:00
Clifford Wolf e0aa5c969e Improvements in router
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 11:58:37 +02:00
David Shah fc7490370b Improving code style and fixing dummy
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-18 11:43:59 +02:00
Clifford Wolf b728cb71d1 Improve router log output
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-17 19:43:07 +02:00
Clifford Wolf 3cfd6841dc Improve router log messages
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-17 19:27:48 +02:00
David Shah 2f9810a346 Speed up placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 16:18:59 +02:00
David Shah f66999a883 Minor performance tweaks and fixes
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 16:03:16 +02:00
David Shah 748171dae2 place_sa: Adding seed option
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 15:04:53 +02:00
David Shah 681c9654d7 place_sa: Add a rip-up feature when initial placement fails
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 14:36:19 +02:00
David Shah 153b800f6a place_sa: Make placement independant of unordered_map ordering
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 13:24:42 +02:00
David Shah 1b077320dc General reformatting
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 12:53:39 +02:00
David Shah 6a937e0b45 Updating copyrights
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 11:49:57 +02:00
David Shah 3afce5ff5a Improving the placer output
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 11:45:41 +02:00
David Shah c604426341 place_sa: Ignore Bels locked by manual placement for SA swaps
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 11:33:31 +02:00
David Shah f9bfccf68e Add 'get or default' functions
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 11:14:49 +02:00
David Shah e95f38e88e place_sa: Run a validity check at the end of placement
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-17 10:55:19 +02:00
David Shah 0df9a11b1f Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-16 18:45:56 +02:00
David Shah e497575c8e place: Fix placer validity checks
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 18:45:48 +02:00
ZipCPU 218c4cd740 Renamed place.h to place_sa.h in place_sa.cc
Signed-off-by: ZipCPU <dgisselq@ieee.org>
2018-06-16 12:09:51 -04:00
ZipCPU 41156d188e Changed place.h place_sa.h 2018-06-16 12:03:25 -04:00
ZipCPU 6d68af1e62 Renamed placer to Simulated-Annealing placer 2018-06-16 11:59:42 -04:00
David Shah bb92dc09a8 ice40: Promote reset signal
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 17:09:41 +02:00
David Shah c4241db117 Tweaking placer and router
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 16:54:57 +02:00
Clifford Wolf ad0df6cea8 Update placer for new Chip API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-16 15:38:26 +02:00
Clifford Wolf 4d14bc2914 Merge remote-tracking branch 'origin/master' into chipdbng 2018-06-16 15:25:03 +02:00
Clifford Wolf 6acf23cf37 Some refactoring of Chip API (prep for chipdb refactoring)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-16 15:23:04 +02:00
David Shah ef2164708b router: Fixing loop issue
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:49:38 +02:00
David Shah c0a2627179 place: Tidying up the SA placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 71903e29d4 place: Reformat placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 2479b4ecbf Improve placement heuristic
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
Clifford Wolf 579455d1b0 Fix router for routing to the same dest wire twice
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-16 14:44:10 +02:00
David Shah 432fe52274 Remove dead code
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 47566cf5e9 Improving SA placer performance
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 2d993d8ee9 Very slow SA placer based on arachne-pnr
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 32dcf6b3fe Experimenting with more unplacing
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 104c2dad9b Adding randomness and changes metrics to placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 828c96f80b Updating placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 2f01ec5157 Update basic placer to use new API
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 3ef45d2a27 Another heuristic experiment
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah b1e08fa064 Playing about with placement heuristics
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
David Shah 6b74d326d4 experiment: Simple heuristic-based placer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-16 14:44:10 +02:00
Clifford Wolf 5d343a168b Fix router for routing to the same dest wire twice
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-15 20:56:40 +02:00
Clifford Wolf 8c46cc2fce Add output of estimated total wire delay to router (as metric for placement quality)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-14 19:13:14 +02:00
Clifford Wolf 66ced800d7 Increase ripup penalties over time
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-14 15:45:47 +02:00
Clifford Wolf 312699e590 Add route-ripup routing loop
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-14 15:09:13 +02:00
Clifford Wolf 7787ce5fd9 Refactor position/delay estimation API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-14 12:43:00 +02:00
David Shah b1cbae1293 python: Clear SIGINT handler after Python loads
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-14 10:08:54 +02:00
Clifford Wolf 9b3af68e44 Improve router error reporting
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-13 18:28:02 +02:00
Clifford Wolf 3d5954f997 Improve router error messages
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-13 18:10:09 +02:00
Clifford Wolf 794fc6df60 Add support for CellInfo->pins in router
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-13 17:52:18 +02:00
Clifford Wolf 9eb4943bd5 Fix router error handling for unplaced cells
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-13 17:26:03 +02:00
Clifford Wolf aa4fedfd54 Add A*-like optimizations to router
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-13 16:52:21 +02:00
David Shah a76f5c5678 Remove IO buffers when fed by SB_IO
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-13 10:50:05 +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
David Shah 330d393c59 Fixing regression due to IDStrings
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 16:04:02 +02:00
Clifford Wolf da33da5bc2 Minor clangformat changes
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-12 15:52:38 +02:00
Clifford Wolf 136ce3d18f Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-12 15:51:51 +02:00
Clifford Wolf 9c275d0a65 Add fast IdString <-> PortPin conversion
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-12 15:50:33 +02:00
David Shah b77a03d195 Minimal Python bindings for IdString
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 15:48:22 +02:00
Clifford Wolf 7e879953d6 Add proper fast IdString
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-12 15:37:28 +02:00
David Shah 6707b985b4 ice40: Add support for LC placement constraints in packer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 15:13:50 +02:00
Clifford Wolf a139654980 Add IdString API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-12 15:08:01 +02:00
Clifford Wolf d62e341d5a Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-12 14:25:12 +02:00
Clifford Wolf 391d49c13e Add nextpnr namespace
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-12 14:24:59 +02:00
David Shah 47eeda40bc Implement the placement validity checker
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 13:45:59 +02:00
David Shah 2f61a9b98a ice40: Start working on a packer, currently not tested
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 12:13:11 +02:00
David Shah 5f813410aa ice40: Adding cell utilities for packing
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 11:49:54 +02:00
David Shah 3ce32b6b1d Adding some utilities for packing
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-12 11:02:07 +02:00
Clifford Wolf be73894bea Add "nextpnr.h"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-11 20:12:57 +02:00
Clifford Wolf ac67482380 Remove pool, dict, vector namespace aliases
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-11 19:56:33 +02:00
Clifford Wolf 70f322ab44 Renamed LOC attribute to BEL, fix ice40 IO bel names
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-09 19:52:22 +02:00
David Shah 72f5e640af Adding basic placement constraints
Specify the attribute (* LOC="bel_name" *) on any cell to constrain its
placement to that bel.

Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-09 19:38:37 +02:00
Clifford Wolf dfbfbf87db Add very basic router
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-09 18:19:20 +02:00
Clifford Wolf 208d378322 Remove writing on sell types to cout (left over debug output?)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-09 15:20:13 +02:00
David Shah 57cd67dbc1 Improving the Python bindings, particularly the map/pair wrappers
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-08 15:53:24 +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
David Shah 7f330af9f3 Reformat remaining files
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-08 11:04:02 +02:00
ZipCPU 4499864024 Applied clang-format to my own contributions 2018-06-07 15:38:24 -04:00
ZipCPU a4f687548e Adjusted info message names for rule-checker and parser 2018-06-07 12:04:01 -04:00
Clifford Wolf 37d2fc65b1 Fix placer build for dummy arch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-07 17:50:36 +02:00
ZipCPU c352f6536b Moved placer definitions to place.h, main automatically runs placer now 2018-06-07 09:49:21 -04:00
ZipCPU f32b9622d5 Initial (random) placer capability
This commit also includes changes to jsonparse to allow it to
1) recognize ports with no connection, and set their net pointers to NULL
2) recognize designs with a ports node rather than a ports_direction

The rule checker has also been modified to accommodate possible NULL netlists

The ice40 chip now also has iterator operations ++bi and bi++.
2018-06-07 09:38:14 -04:00
ZipCPU 1ed5c641c1 Merge branch 'master' into gqtech 2018-06-07 07:45:22 -04:00
David Shah ed0c44891f Replacing Boost type_traits with std
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-07 13:36:42 +02:00
David Shah c3e0252703 Reformat Python bindings and ice40 main
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-07 13:10:53 +02:00
David Shah 9ebc879826 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-07 12:59:41 +02:00
David Shah b0e66d441c Global design object working
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-07 12:57:52 +02:00
Clifford Wolf 1ea8fa4881 clang-format for design and chip codebase
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-07 12:56:49 +02:00
Clifford Wolf 2edde06c07 Fix clang-format include order issues
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-07 12:48:53 +02:00
David Shah a5249da02d Working on global Python design object
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-07 12:40:31 +02:00
David Shah e576f71838 Developing Python bindings for Design and related types 2018-06-07 11:41:54 +02:00
David Shah 3769b20580 Adding Python to/from string wrappers for internal IDs 2018-06-07 09:47:00 +02:00
David Shah bdd9313582 Allow loading and running Python files before GUI starts
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-07 08:56:54 +02:00
ZipCPU 109287ee90 Removed unused set of warnings from log.cc 2018-06-06 17:17:44 -04:00
David Shah 3a6e400f44 rulecheck.cc: Add missing return
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-06 21:14:42 +02:00
ZipCPU 16b9a2f1b5 Attempt to add JSON parser--not working yet w/ build system 2018-06-06 14:44:54 -04:00
ZipCPU 5e463b8543 Merge branch 'master' into gqtech 2018-06-06 12:21:04 -04:00
ZipCPU 468ed85280 Applied Rule Check to parser results, refactored JSON parser 2018-06-06 12:20:24 -04:00
Clifford Wolf 5ff9aafb20 Refactor Chip API and iCE40 database
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-06 15:13:41 +02:00
ZipCPU d0ee08aeb1 Merge branch 'master' into gqtech 2018-06-06 07:55:18 -04:00
ZipCPU 2e6d0b752a Removed erroneous BEL assignment in JSON parser 2018-06-06 07:49:35 -04:00
Miodrag Milanovic 7cb42f4368 Initial GUI work 2018-06-05 21:03:06 +02:00
ZipCPU bd08f9e698 Removed the log_ dependencies from json-parser 2018-06-05 11:39:27 -04:00
ZipCPU 8b6f8382b8 Added some logging functions, borrowed from Yosys 2018-06-05 11:15:35 -04:00
ZipCPU 709ce3884d Initial JSON parser 2018-06-05 09:01:26 -04:00
David Shah 3b78eda5d3 Add 'styles' to GraphicElement
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-04 13:30:20 +02:00
Clifford Wolf eb3c89bee9 Replace GuiLine with GraphicElement
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-04 12:02:58 +02:00
David Shah 363ddd0f3c Python bindings working on both architectures
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-02 13:48:28 +02:00
David Shah d3f74eb056 Simple Python test working
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-02 13:48:28 +02:00
David Shah f353453a7f Add architecture specific Python defs
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-02 13:48:28 +02:00
David Shah a7415bfbc3 Adding generic Python range and iterator bindings
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
Clifford Wolf 3b0d1beabb Add DelayInfo struct
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-05-29 20:04:29 +02:00
Clifford Wolf 1338f0f9eb Add Makefile
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-05-26 11:17:50 +02:00
Clifford Wolf 5e48758b30 Directory structure
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-05-26 10:47:35 +02:00