Commit Graph

96 Commits

Author SHA1 Message Date
gatecat
9b5e5f124c clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-25 10:29:32 +01:00
gatecat
7845b66512 Add missing <set> includes
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-20 09:04:41 +01:00
gatecat
e260ac33ab refactor: ArcBounds -> BoundingBox
Signed-off-by: gatecat <gatecat@ds0.me>
2022-12-07 10:00:53 +01:00
gatecat
c62a947a28 api: Make NetInfo* of checkPipAvailForNet const
Signed-off-by: gatecat <gatecat@ds0.me>
2022-12-02 14:20:39 +01:00
gatecat
77c82b0fbf refactor: id(stringf(...)) to new idf(...) helper
Signed-off-by: gatecat <gatecat@ds0.me>
2022-08-10 10:57:46 +01:00
Maciej Kurc
d75c45c63f Added fallback to VCC as the preferred constant if the architecture does not specify one.
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2022-05-12 11:55:16 +02:00
Maciej Kurc
aafe1a176c Generalized representation of unused LUT pins connections
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2022-05-11 16:31:30 +02:00
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
86699b42f6 Switch to potentially-sparse net users array
This uses a new data structure for net.users that allows gaps, so
removing a port from a net is no longer an O(n) operation on the number
of users the net has.

Signed-off-by: gatecat <gatecat@ds0.me>
2022-02-27 13:47:05 +00: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
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
8fc16a57c9 Added more code comments, formatted the code
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
2021-07-22 12:59:10 +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
7edfcc3bfa interchange: disallow pseudo-pip on same nets if tile has luts
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-07-15 16:06:00 +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
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
ddff2e2e5e
Merge pull request #744 from YosysHQ/gatecat/const-in-macro
interchange: Fix handling of constants in macros
2021-07-01 13:12:38 +01:00
gatecat
006a40a353 interchange: Fix handling of constants in macros
Signed-off-by: gatecat <gatecat@ds0.me>
2021-07-01 11:45:23 +01:00
gatecat
523ffbaa37 interchange: Reserve site ports only reachable from dedicated routing
Signed-off-by: gatecat <gatecat@ds0.me>
2021-07-01 11:28:12 +01:00
Alessandro Comodi
0344fdcf8d interchange: arch: move macro expansion step before ios packing
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-06-18 16:42:05 +02: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
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
579b98c596 Use hashlib for core netlist structures
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-02 14:27:56 +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
5a41d2070c Run clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-16 16:25:05 +01:00
Alessandro Comodi
8c468acff8 interchange: site router: add valid pips list to check during routing
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-05-13 11:00:42 +02:00
Alessandro Comodi
fd93697a2d interchange: arch: do not allow site pips within sites
During general routing, the only site pips that can be allowed are those
which connect a site wire to the routing interface.

This might be too restrictive when dealing with architectures that
require more than one site PIPs to route from a driver within a site to the routing
interface (which is something that should be allowed in the
interchange).

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
2021-05-12 18:28:22 +02:00
gatecat
7a1a95a2d6 interchange: Fix bounding box computation
Signed-off-by: gatecat <gatecat@ds0.me>
2021-05-11 13:02:23 +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
dcb09ec8de interchange: Implement getWireType
Signed-off-by: gatecat <gatecat@ds0.me>
2021-04-30 11:07:31 +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
gatecat
93e34b8754 interchange: Disambiguate cell and bel pins when creating Vcc ties
The pins created for tieing to Vcc were being named after the bel pin,
relying on the fact that Xilinx names cell and bel pins differently for
LUTs. This isn't true for Nexus devices which uses the same names for
both, and was causing a failure as a result.

This uses a "PHYS_" prefix that's highly unlikely to appear in a cell
pin name to disambiguate.

Signed-off-by: gatecat <gatecat@ds0.me>
2021-04-09 10:26:32 +01:00
Keith Rothman
ae2f7551c1 [interchange] Provide estimateDelay when USE_LOOKAHEAD is not defined.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-06 10:42:05 -07: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
Keith Rothman
009d3b64b6 [interchange] Update to v6 of FPGA interchange chipdb.
Changes:
 - Adds LUT output pin to LutBelPOD.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-04-01 15:24:06 -07:00
Keith Rothman
7e47af1085 [interchange] Fix site pip check for drivers.
Previous code allowed router to entire sites with no sinks.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2021-03-30 10:04:18 -07: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
5dda3a14ff Fixup some of the re-mapping logic.
- Add IDEMPOTENT_CHECK define to perform some expected idempotent
   operations more than once to verify they work as expected.

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
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
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