Commit Graph

171 Commits

Author SHA1 Message Date
whitequark
db96b88d79 ice40: raise CE global promotion threshold. 2018-11-29 00:12:48 +00:00
whitequark
a974124a7a ice40: print fanout of nets promoted to globals. 2018-11-28 23:52:48 +00:00
Sylvain Munaut
ba958d1792 ice40: Try to be helpful and suggest using PAD PLL instead of CORE
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-28 16:04:58 +01:00
Sylvain Munaut
a65b12e8d6 ice40: Revamp the whole PLL placement/validity check logic
We do a pre-pass on all the PLLs to place them before packing.

To place them:
 - First pass with all the PADs PLLs since those can only fit at one
   specific BEL depending on the input connection
 - Second pass with all the dual outputs CORE PLLs. Those can go
   anywhere where there is no conflicts with their A & B outputs and
   used IO pins
 - Third pass with the single output CORE PLLs. Those have the least
   constrains.

 During theses passes, we also check the validity of all their connections.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-28 16:04:43 +01:00
David Shah
80f7ef4b4b ice40: Finer-grained control of global promotion
Signed-off-by: David Shah <dave@ds0.me>
2018-11-27 19:06:55 +00:00
Sylvain Munaut
584e8c58a6 ice40: During global promotion, only promote if this will actually fit !
We need to take into account the global networks that are already used
and possibly locked to know what we can promote since all networks
can't drive resets / clock-enables

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-26 12:51:14 +01:00
David Shah
2951e37b45 ice40: Fix disconnection of PACKAGEPIN for PAD PLLs
Signed-off-by: David Shah <dave@ds0.me>
2018-11-24 17:49:26 +00:00
Sylvain Munaut
9c5f4fb885 ice40/pll: Fix typo when testing for global port output net
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-20 23:53:08 +01:00
Sylvain Munaut
e8556aff37 ice40: Add support for SB_RGBA_DRV
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
de8de6304f ice40: Add global network output support for LFOSC/HFOSC
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
271cc7be11 ice40/pack: Add helper to constain cells that are unique in the FPGA
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
519d4e2af8 ice40: Add support for SB_GB_IO
During packing we replace them by standard SB_IO cells and create the
'fake' SB_GB that matches that IO site global buffer connection.

It's done in a separate pass because we need to make sure the nextpnr iob
have been dealt first so we have our final Bel location on the SB_IO.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
d8e4c21d96 ice40: Add support for PLL global outputs via PADIN
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
bc9f2da470 ice40: Introduce the concept of forPadIn SB_GB
Those are cells that are created mainly to handle the various sources a
global network can be driven from other than a user net.

When the flag is set, this means the global network usually driven by
this BEL is in fact driven by something else and so that SB_GB BEL and
matching global network can't be used.

This is also what gets used to set the extra bits during bitstream
generation.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
ad23caef33 ice40/pll: Add proper support for PLLOUT_SELECT_xxx attributes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
35e9ec7737 ice40: Minor fix in predicate checking for logic port
- is_sb_pll40 covers all the PLL types
 - Use helper to test for gbuf

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
ac5d767d4f ice40/pack: Stop looking for BEL when we have one during PLL placement
Ideally we should first process all the PLL that are constrained somehow
(either explicitely or because they are PAD) and then free place the rest.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
5fb3353557 ice40/pack: Allow PLL to be constrained via 'BEL' attributes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
8c69a3bba3 ice40/pack: Make sure we don't use a LOCKED bel when placing PLL
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-19 18:20:20 +01:00
Sylvain Munaut
e1e8d8cd14 ice40: Add warning if an instanciated SB_IO has its PACKAGE_PIN used elsewhere
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2018-11-16 16:36:57 +01:00
David Shah
fc5e6bec9a timing: Add support for clock constraints
Signed-off-by: David Shah <dave@ds0.me>
2018-11-12 14:03:58 +00:00
David Shah
122771cac3 timing: iCE40 Arch API changes for clocking info
Signed-off-by: David Shah <dave@ds0.me>
2018-11-12 14:03:58 +00:00
Clifford Wolf
b4dc6b8845 Add info message for promoted global nets
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-10-03 13:40:21 +02:00
David Shah
7ef8a7415d ice40: Add error for bad PACKAGE_PIN connections
Signed-off-by: David Shah <davey1576@gmail.com>
2018-10-03 12:14:49 +01:00
David Shah
ea03aafc26 clangformat
Signed-off-by: David Shah <davey1576@gmail.com>
2018-09-30 15:13:18 +01:00
Clifford Wolf
07cf349ee4
Merge pull request #79 from YosysHQ/ice40lvds
ice40: Adding LVDS input support
2018-09-25 18:21:56 +02:00
Clifford Wolf
1eb7411fb0
Merge pull request #76 from YosysHQ/plloutglobal_fix
Add needed PLLOUTGLOBAL ports and mapped it
2018-09-25 18:15:00 +02:00
David Shah
f1aa7093fe ice40: Fix carry packer bug
Signed-off-by: David Shah <davey1576@gmail.com>
2018-09-25 15:52:32 +01:00
David Shah
2ee86ab5a8 ice40: Tristate IO support fixes
Signed-off-by: David Shah <davey1576@gmail.com>
2018-09-24 15:25:37 +01:00
Miodrag Milanovic
f8e258825f Added required checks for PLL and fixed messages eol 2018-09-19 18:41:28 +02:00
Miodrag Milanovic
fdf7593c42 Add needed PLLOUTGLOBAL ports and mapped it properly 2018-09-12 18:33:08 +02:00
Sergiusz Bazanski
1bf22a7f64 ice40: make PLL packing more robust 2018-08-19 21:30:55 +01:00
Clifford Wolf
e03ae50e21 Get rid of PortPin and BelType (ice40, generic, docs)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-08-08 17:01:18 +02:00
David Shah
fd2174149c Fixing constraint placement bugs
Signed-off-by: David Shah <davey1576@gmail.com>
2018-08-03 16:29:44 +02:00
David Shah
7e9209878c Reworking packer and placer to use new generic rel legaliser
Signed-off-by: David Shah <davey1576@gmail.com>
2018-08-03 15:00:32 +02:00
David Shah
483f1b772c ice40: Promote 'logic' globals as well as clock/enable/reset
Signed-off-by: David Shah <davey1576@gmail.com>
2018-08-03 09:56:56 +02:00
David Shah
0414c93403 ice40: Add HFOSC support, force fabric routing on oscillators for now
Signed-off-by: David Shah <davey1576@gmail.com>
2018-08-01 09:45:08 +02:00
Sergiusz Bazanski
85fc356fc1 clangformat 2018-08-01 03:59:27 +01:00
Eddie Hung
950f33c1bb clangformat 2018-07-25 17:53:01 -07:00
Sergiusz Bazanski
db4f2d2318 ice40: check PLL PACKAGEPIN drives only PLL, cosmetics 2018-07-25 11:47:24 +01:00
Sergiusz Bazanski
c554ab1ef0 clang-format 2018-07-25 11:32:40 +01:00
Sergiusz Bazanski
aad0d3eb35 ice40: support PLL40_*_PAD, fix pass-through LUT for LOCK 2018-07-25 11:32:21 +01:00
Sergiusz Bazanski
2039112a47 ice40: after review 2018-07-24 15:59:18 +01:00
Sergiusz Bazanski
b31e95f82c Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/pll 2018-07-24 15:54:03 +01:00
David Shah
5a170f286c ice40: Remove use of deprecated APIs
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-24 15:52:56 +02:00
David Shah
4359197dfe ice40: Trim BRAM constant inputs, reduces routing congestion around BRAM
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-24 11:21:10 +02:00
Sergiusz Bazanski
90ba958abe ice40: fixes before review 2018-07-24 03:19:22 +01:00
Sergiusz Bazanski
fae7994bc3 clang-format 2018-07-24 02:55:40 +01:00
Sergiusz Bazanski
065ea95eab ice40: Move spliceLUT back to pack.cc 2018-07-24 02:55:40 +01:00
Sergiusz Bazanski
e6c7b14465 ice40: Refactor PLL/LOCK LUT splicing out into Arch:: 2018-07-24 02:55:40 +01:00
Sergiusz Bazanski
69233385f8 ice40: Emit feed-through LUTs for PLL/LOCK 2018-07-24 02:55:40 +01:00
Sergiusz Bazanski
db31c0625b ice40: Fail early on SB_PLL40_*_PAD cells 2018-07-24 02:55:38 +01:00
Sergiusz Bazanski
2b1f7875bb ice40: Implement emitting PLLs 2018-07-24 02:38:10 +01:00
David Shah
79dc910b40 ice40: Trim DSP inputs that are constant where appropriate
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-19 14:32:30 +02:00
David Shah
bff7d673ed ice40: Packer and bitstream gen support for MAC16s
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-19 14:03:48 +02:00
David Shah
08ceb8a059 ice40: Renaming
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-18 14:34:32 +02:00
David Shah
ddd94edfe0 ice40: Fixes for inverted clocks
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-18 14:01:19 +02:00
David Shah
70cfa7a6a4 ice40: Make assignArchArgs a Arch method; call also after legaliser
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-18 12:21:02 +02:00
David Shah
c75a924c3f ice40: Assign ArchArgs after packing
Signed-off-by: David Shah <davey1576@gmail.com>
2018-07-18 12:12:05 +02:00
Clifford Wolf
c05bea12e0 Add ctx->pack() API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-07-13 15:16:44 +02:00
Miodrag Milanovic
1cf8293019 Fixed macros and includes for MSVC 2018-07-03 08:53:44 +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
3b90f3698f ice40: Fix carry packing in some degenerate cases
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-29 15:10:29 +02:00
David Shah
c0724a7e97 ice40: Only pack up to one SB_CARRY into a LC
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 16:24:44 +02:00
David Shah
28e851cf45 ice40: Fix IO packer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 16:16:38 +02:00
David Shah
885fe93a17 ice40: Carry packer bugfix
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 15:24:34 +02:00
David Shah
998ab2b20a ice40: Fixing the carry packer for a larger design
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-27 12:43:29 +02:00
David Shah
09c0d96105 ice40: Fixing packing of CIN constant drivers
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 20:02:19 +02:00
David Shah
21d5a04501 Carry chains now routable
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 15:55:50 +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
29df577f14 Fixing packing of carry cells
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 14:37:01 +02:00
David Shah
ded9df61dc Working on debugging carry packer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-26 13:08:28 +02:00
Miodrag Milanovic
db890d3a81 nets and cells are unique_ptr's 2018-06-25 21:33:48 +02:00
David Shah
64208da1f9 ice40: Remove constant driver cells in packer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-25 16:29:37 +02:00
Miodrag Milanovic
a279720fc1 merge 2018-06-25 16:22:08 +02:00
Miodrag Milanovic
6de8b4ef7d some more memory leaks 2018-06-25 15:52:55 +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
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
David Shah
289fca0976 ice40: Move global net test to Arch
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-23 12:09:01 +02:00
Miodrag Milanovic
cb92c10b99 Cleanup almost all deprecation warnings 2018-06-23 09:42:48 +02:00
David Shah
8850f86a8a ice40: SB_LFOSC support, fabric routing only
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 19:21:39 +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
David Shah
63baa10032 ice40: Make the packer deterministic
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-22 12:57:22 +02:00
Miodrag Milanovic
8fac26c2b7 Fixed return codes for packer, placer and router 2018-06-21 17:56:45 +02:00
Clifford Wolf
a29bfc788e Add ctx->checksum(), slightly improve log messages
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-21 15:47:41 +02:00
Clifford Wolf
993f6ef7d3 Improve log messages, move many messages to verbose mode
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-21 14:09:50 +02:00
David Shah
c27c96f4f0 place_sa: Improvements including supporting force and ordering consistency
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-20 20:12:23 +02:00
David Shah
df4b4d48f7 ice40: Tidying up carry packer a bit
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 16:23:02 +02:00
David Shah
8e26e4381b ice40: WIP SB_CARRY packer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 16:16:10 +02:00
Clifford Wolf
2603c6d805 Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr 2018-06-19 14:34:45 +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
David Shah
a8071a418d ice40: Improve error reporting for invalid tristate usage
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 14:10:28 +02:00
David Shah
ecc2c486d9 ice40: Fix constant packer
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 13:48:04 +02:00
David Shah
6f7070a365 ice40: More IdString API updates
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-19 11:21:16 +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
58e3104796 Updates from clangformat
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-18 14:07:18 +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
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