From d2bdb670c0be9e18722f79c170fc99d7f41768f1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 11 Nov 2018 11:34:38 +0100 Subject: Add getConflictingPipWire() arch API, router1 improvements Signed-off-by: Clifford Wolf --- ecp5/arch.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ecp5') diff --git a/ecp5/arch.h b/ecp5/arch.h index 583d539f..c9b1bf43 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -733,6 +733,11 @@ struct Arch : BaseCtx return pip_to_net.at(pip); } + WireId getConflictingPipWire(PipId pip) const + { + return WireId(); + } + AllPipRange getPips() const { AllPipRange range; -- cgit v1.2.3 From f93129634b479ba54d8e33186eb79f412eaeb4a9 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 11 Nov 2018 17:28:41 +0100 Subject: Add getConflictingWireWire() arch API, streamline getConflictingXY semantic Signed-off-by: Clifford Wolf --- ecp5/arch.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'ecp5') diff --git a/ecp5/arch.h b/ecp5/arch.h index c9b1bf43..bd4881c2 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -619,6 +619,11 @@ struct Arch : BaseCtx return wire_to_net.at(wire); } + WireId getConflictingWireWire(WireId wire) const + { + return wire; + } + NetInfo *getConflictingWireNet(WireId wire) const { NPNR_ASSERT(wire != WireId()); @@ -724,6 +729,11 @@ struct Arch : BaseCtx return pip_to_net.at(pip); } + WireId getConflictingPipWire(PipId pip) const + { + return WireId(); + } + NetInfo *getConflictingPipNet(PipId pip) const { NPNR_ASSERT(pip != PipId()); @@ -733,11 +743,6 @@ struct Arch : BaseCtx return pip_to_net.at(pip); } - WireId getConflictingPipWire(PipId pip) const - { - return WireId(); - } - AllPipRange getPips() const { AllPipRange range; -- cgit v1.2.3 From 6002a0a80ad2b7a300ea6cd3427dd942012de7d2 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 11 Nov 2018 19:48:15 +0100 Subject: clangformat Signed-off-by: Clifford Wolf --- ecp5/arch.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'ecp5') diff --git a/ecp5/arch.h b/ecp5/arch.h index bd4881c2..9daae11d 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -619,10 +619,7 @@ struct Arch : BaseCtx return wire_to_net.at(wire); } - WireId getConflictingWireWire(WireId wire) const - { - return wire; - } + WireId getConflictingWireWire(WireId wire) const { return wire; } NetInfo *getConflictingWireNet(WireId wire) const { @@ -729,10 +726,7 @@ struct Arch : BaseCtx return pip_to_net.at(pip); } - WireId getConflictingPipWire(PipId pip) const - { - return WireId(); - } + WireId getConflictingPipWire(PipId pip) const { return WireId(); } NetInfo *getConflictingPipNet(PipId pip) const { -- cgit v1.2.3 From 06e0e1ffeec9b06cecc213728c279b9235316df9 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 13 Nov 2018 05:03:46 +0100 Subject: Various router1 fixes, Add BelId/WireId/PipId::operator<() Signed-off-by: Clifford Wolf --- ecp5/archdefs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ecp5') diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h index b85852c2..01cbad46 100644 --- a/ecp5/archdefs.h +++ b/ecp5/archdefs.h @@ -75,6 +75,7 @@ struct Location bool operator==(const Location &other) const { return x == other.x && y == other.y; } bool operator!=(const Location &other) const { return x != other.x || y != other.y; } + bool operator<(const Location &other) const { return y == other.y ? x < other.x : y < other.y; } }; inline Location operator+(const Location &a, const Location &b) { return Location(a.x + b.x, a.y + b.y); } @@ -86,6 +87,7 @@ struct BelId bool operator==(const BelId &other) const { return index == other.index && location == other.location; } bool operator!=(const BelId &other) const { return index != other.index || location != other.location; } + bool operator<(const BelId &other) const { return location == other.location ? index < other.index : location < other.location; } }; struct WireId @@ -95,6 +97,7 @@ struct WireId bool operator==(const WireId &other) const { return index == other.index && location == other.location; } bool operator!=(const WireId &other) const { return index != other.index || location != other.location; } + bool operator<(const WireId &other) const { return location == other.location ? index < other.index : location < other.location; } }; struct PipId @@ -104,6 +107,7 @@ struct PipId bool operator==(const PipId &other) const { return index == other.index && location == other.location; } bool operator!=(const PipId &other) const { return index != other.index || location != other.location; } + bool operator<(const PipId &other) const { return location == other.location ? index < other.index : location < other.location; } }; struct GroupId -- cgit v1.2.3 From 959d163ba71fd2fdf08911e9be47f4f1d60514e5 Mon Sep 17 00:00:00 2001 From: David Shah Date: Tue, 13 Nov 2018 14:27:23 +0000 Subject: ecp5: Improve delay estimates Signed-off-by: David Shah --- ecp5/arch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecp5') diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 4a0b31b5..ffd6ebcd 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -400,7 +400,7 @@ BelId Arch::getBelByLocation(Loc loc) const delay_t Arch::estimateDelay(WireId src, WireId dst) const { - return 100 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); + return 170 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); } delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const @@ -409,7 +409,7 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const auto driver_loc = getBelLocation(driver.cell->bel); auto sink_loc = getBelLocation(sink.cell->bel); - return 100 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y)); + return 170 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y)); } bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; } -- cgit v1.2.3