Commit Graph

90 Commits

Author SHA1 Message Date
Alessandro Comodi
b5d6fc8ed7 interchange: lut map cache: remove hardcoded values
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2022-03-04 16:53:24 +01:00
gatecat
ddb084e9a8 archapi: Use arbitrary rather than actual placement in predictDelay
This makes predictDelay be based on an arbitrary belpin pair rather
than a arc of a net based on cell placement. This way 'what-if'
decisions can be evaluated without actually changing placement;
potentially useful for parallel placement.

A new helper predictArcDelay behaves like the old predictDelay to
minimise the impact on existing passes; only arches need be updated.

Signed-off-by: gatecat <gatecat@ds0.me>
2021-12-19 17:15:15 +00:00
Maciej Dudek
ea489f6d93 Fix small isses and code formatting
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
2021-09-27 16:16:33 +02:00
Maciej Dudek
94acf7a797 Change Cluster placement algorithm
Use physical placement from device DB
It should reduce runtime

Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
2021-09-23 15:43:23 +02:00
Maciej Dudek
3cd459912a Adding MacroCell placement
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
2021-09-23 15:43:23 +02:00
Maciej Dudek
fdcfe8cd81 Adding support for MacroCells 2021-09-23 15:43:23 +02:00
Alessandro Comodi
e0950408d5 interchange: clusters: fix other cluster allowance checks in same site
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-08-31 12:44:36 +02:00
Alessandro Comodi
78bf5796db interchange: disallow placing cells on sites with clusters
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-08-27 13:47:10 +02:00
gatecat
5212e38512
Merge pull request #757 from antmicro/lut-mapping-cache
interchange: Add caching of site LUT mapping solution
2021-07-22 14:09:40 +01:00
Maciej Kurc
580a45485a Added an option to disable the LUT mapping cache
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2021-07-22 14:07:35 +02:00
Maciej Kurc
d52516756c Working site LUT mapping cache
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2021-07-16 12:51:28 +02:00
Alessandro Comodi
d9668df818 interchange: add constraints constraints application routine
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-07-12 16:45:08 +02:00
Alessandro Comodi
dc0819b01a interchange: reduce run-time to check dedicated interconnect
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-07-08 16:51:23 +02:00
gatecat
31abefc8e4 interchange: Allow pseudo pip wires to overlap with bound site wires on the same net
Signed-off-by: gatecat <gatecat@ds0.me>
2021-07-06 10:38:08 +01:00
gatecat
f64d06fa02 interchange: Improve search for PAD-attached bels
Signed-off-by: gatecat <gatecat@ds0.me>
2021-07-06 10:13:50 +01:00
gatecat
2476f116bb interchange: Track the macros that cells have been expanded from
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-29 14:48:47 +01:00
gatecat
2ffb081442 Fixing old emails and names in copyrights
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-12 13:22:38 +01:00
Alessandro Comodi
64b45848d7 interchange: run clang formatter
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-06-11 11:19:01 +02:00
Alessandro Comodi
104536b7aa interchange: add support for generating BEL clusters
Clustering greatly helps the placer to identify and pack together
specific cells at the same site (e.g. LUT+FF), or cells that are chained through
dedicated interconnections (e.g. CARRY CHAINS)

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-06-11 11:19:01 +02:00
gatecat
ecc19c2c08 Using hashlib in arches
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-02 15:05:19 +01:00
gatecat
2759480cb5 interchange: Preliminary implementation of macro expansion
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-21 10:00:35 +01:00
gatecat
9a1cad85fe interchange: Adding a basic global buffer placer
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-07 10:28:59 +01:00
gatecat
9b3fb00908 interchange: Initial global routing implementation
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-07 10:28:56 +01:00
gatecat
0d6be6f474 Add stub cluster API impl for remaining arches
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-06 13:12:52 +01:00
gatecat
18459a9e4c interchange: Handle disconnected/missing cell pins
Signed-off-by: gatecat <gatecat@ds0.me>
2021-04-19 10:46:35 +01:00
gatecat
fc15105643 clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2021-04-12 10:26:39 +01:00
Keith Rothman
3200026e1f [interchange] Remove requirement to have wire_lut.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-06 10:42:05 -07:00
Keith Rothman
c11ad31393 [interchange] Scale edge cost of pseudo pips.
Previous pseudo pips were the same cost as regular pips, but this is
definitely too fast, and meant that the router was prefering them.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-06 10:42:05 -07:00
Keith Rothman
90aa1d3b7e [interchange] Disallow site edges during general routing.
This prevents the general router from routing through sites, which is
not legal in FPGA interchange.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-06 10:42:05 -07:00
Keith Rothman
0d41fff3a7 [interchange] Add crude pseudo pip model.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-06 10:42:05 -07:00
gatecat
8863b962fd interchange: Fix illegal placements
Signed-off-by: gatecat <gatecat@ds0.me>
2021-03-30 15:28:19 +01:00
Keith Rothman
c8dccd3e7b Implement debugging tools for site router.
- Finishes implementation of SiteArch::nameOfPip and SiteArch::nameOfWire
 - Adds "explain_bel_status", which should be an exhaustive diagnostic
   of the status of a BEL placement.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-25 17:56:11 -07:00
Keith Rothman
91ca5f110b Re-work LUT mapping logic to only put VCC pins when required.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-25 17:20:13 -07:00
Keith Rothman
77bc2f9130 Add initial handling of local site inverters and constant signals.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-25 17:20:09 -07:00
Keith Rothman
5e96740451 [FPGA interchange] Small fix to get_net_type.
If get_net_type was called before the driver was placed, it could return
the wrong value.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-25 17:14:53 -07:00
gatecat
3cc50a5744
Merge pull request #644 from litghost/add_global_buffers
[FPGA interchange] Add support for global buffers from chipdb.
2021-03-23 17:33:55 +00:00
gatecat
323da87dec
Merge pull request #643 from litghost/id_constants
[FPGA interchange] Convert some string constants to IdString.
2021-03-23 17:33:40 +00:00
Keith Rothman
720f64ea60 [FPGA interchange] Add support for global buffers from chipdb.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-23 09:41:45 -07:00
Keith Rothman
0dd93035e4 [FPGA interchange] Convert some string constants to IdString.
Also add some optional diagnostic prints for cell -> BEL pin mapping.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-23 09:38:37 -07:00
Keith Rothman
831b94cdac Initial version of inverter logic.
For now just implements some inspection capabilities, and the site
router (for now) avoids inverted paths.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-23 09:03:07 -07:00
Keith Rothman
8a50b02b9b Use new parameter definition data in FPGA interchange processing.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-23 09:01:43 -07:00
Keith Rothman
8d1eb0a195 Initial lookahead for FPGA interchange.
Currently the lookahead is disabled by default because of the time to
compute and RAM usage.  However it does appear to work reasonably well
in testing.  Further effort is required to lower RAM usage after initial
computation, and explore trade-off for cheaper time to compute.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-23 08:16:50 -07:00
gatecat
a3ed97c0db
Merge pull request #637 from litghost/refine_site_router
Refine site router
2021-03-22 18:32:04 +00:00
Keith Rothman
32f2ec86c4 Rework FPGA interchange site router.
The new site router should be robust to most situations, and isn't
significantly slower with the use of caching.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-22 09:54:49 -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
db12a83ced Add pseudo pip data to chipdb (with schema bump).
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-22 09:33:12 +00:00
Keith Rothman
2cd5bacca0 Refactor header structures in FPGA interchange Arch.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-19 21:36:06 -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
fe4608386e Split nextpnr.h to allow for linear inclusion.
"nextpnr.h" is no longer the god header.  Important improvements:

 - Functions in log.h can be used without including
   BaseCtx/Arch/Context. This means that log_X functions can be called
   without included "nextpnr.h"

 - NPNR_ASSERT can be used without including "nextpnr.h" by including
   "nextpnr_assertions.h".  This allows NPNR_ASSERT to be used safely in
   any header file.

 - Types defined in "archdefs.h" are now available without including
   BaseCtx/Arch/Context.  This means that utility classes that will be
   used inside of BaseCtx/Arch/Context can be defined safely in a
   self-contained header.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-15 09:05:23 -07:00
Keith Rothman
cfa449c3f3 Initial LUT rotation logic.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-02-26 11:01:22 -08:00