aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.cc
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-01-29 11:22:31 -0800
committerGitHub <noreply@github.com>2019-01-29 11:22:31 -0800
commit6d664046d3774c8fa2a9dccb64dd8ab06cc0cd0a (patch)
tree5c6fc5bcd414aa9d8e47f5347960b0260ef8fd19 /ice40/arch.cc
parent6cc1bfcb37199e0988d0f06ce34071b409ab8019 (diff)
parent77bb5ea63a86f2ce5feb2f3ee13d920c85c29111 (diff)
downloadnextpnr-6d664046d3774c8fa2a9dccb64dd8ab06cc0cd0a.tar.gz
nextpnr-6d664046d3774c8fa2a9dccb64dd8ab06cc0cd0a.tar.bz2
nextpnr-6d664046d3774c8fa2a9dccb64dd8ab06cc0cd0a.zip
Merge pull request #220 from YosysHQ/coi3
ice40: Add budget override for CO->I3 path
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r--ice40/arch.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index e674b4c9..f6084e72 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -594,26 +594,29 @@ std::vector<GroupId> Arch::getGroupGroups(GroupId group) const
bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const
{
const auto &driver = net_info->driver;
- if (driver.port == id_COUT && sink.port == id_CIN) {
- if (driver.cell->constr_abs_z && driver.cell->constr_z < 7)
+ if (driver.port == id_COUT) {
+ NPNR_ASSERT(sink.port == id_CIN || sink.port == id_I3);
+ NPNR_ASSERT(driver.cell->constr_abs_z);
+ bool cin = sink.port == id_CIN;
+ bool same_y = driver.cell->constr_z < 7;
+ if (cin && same_y)
budget = 0;
else {
- NPNR_ASSERT(driver.cell->constr_z == 7);
switch (args.type) {
#ifndef ICE40_HX1K_ONLY
case ArchArgs::HX8K:
#endif
case ArchArgs::HX1K:
- budget = 190;
+ budget = cin ? 190 : (same_y ? 260 : 560);
break;
#ifndef ICE40_HX1K_ONLY
case ArchArgs::LP384:
case ArchArgs::LP1K:
case ArchArgs::LP8K:
- budget = 290;
+ budget = cin ? 290 : (same_y ? 380 : 670);
break;
case ArchArgs::UP5K:
- budget = 560;
+ budget = cin ? 560 : (same_y ? 660 : 1220);
break;
#endif
default: