From 57f75385b0960d6e1e30112a395a89ee4df07056 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Sat, 14 Jul 2018 18:53:08 +0100 Subject: Revert "Make PnR use Unlocked methods" This reverts commit 9e4f97290a50fc5d9dc0cbe6ead945840b9811b1. --- ice40/arch.cc | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'ice40/arch.cc') diff --git a/ice40/arch.cc b/ice40/arch.cc index 30eea776..74353fe6 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -242,11 +242,6 @@ IdString Arch::archArgsToId(ArchArgs args) const BelId Arch::getBelByName(IdString name) const { boost::lock_guard lock(mtx_); - return getBelByNameUnlocked(name); -} - -BelId Arch::getBelByNameUnlocked(IdString name) const -{ BelId ret; if (bel_by_name.empty()) { @@ -280,14 +275,9 @@ BelRange Arch::getBelsAtSameTile(BelId bel) const } WireId Arch::getWireBelPin(BelId bel, PortPin pin) const -{ - boost::shared_lock_guard lock(mtx_); - return getWireBelPinUnlocked(bel, pin); -} - -WireId Arch::getWireBelPinUnlocked(BelId bel, PortPin pin) const { WireId ret; + boost::shared_lock_guard lock(mtx_); NPNR_ASSERT(bel != BelId()); @@ -306,14 +296,9 @@ WireId Arch::getWireBelPinUnlocked(BelId bel, PortPin pin) const // ----------------------------------------------------------------------- WireId Arch::getWireByName(IdString name) const -{ - boost::shared_lock_guard lock(mtx_); - return getWireByNameUnlocked(name); -} - -WireId Arch::getWireByNameUnlocked(IdString name) const { WireId ret; + boost::shared_lock_guard lock(mtx_); if (wire_by_name.empty()) { for (int i = 0; i < chip_info->num_wires; i++) @@ -330,14 +315,9 @@ WireId Arch::getWireByNameUnlocked(IdString name) const // ----------------------------------------------------------------------- PipId Arch::getPipByName(IdString name) const -{ - boost::shared_lock_guard lock(mtx_); - return getPipByNameUnlocked(name); -} - -PipId Arch::getPipByNameUnlocked(IdString name) const { PipId ret; + boost::shared_lock_guard lock(mtx_); if (pip_by_name.empty()) { for (int i = 0; i < chip_info->num_pips; i++) { -- cgit v1.2.3