From 9495f5b793570f85b15f5b1cf3be27dd9263b10e Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 12 Aug 2021 17:46:02 -0700 Subject: [PATCH] groupPorts port_is_big_endian -> port_msb_first Signed-off-by: James Cherry --- include/sta/ConcreteLibrary.hh | 2 +- include/sta/ConcreteNetwork.hh | 2 +- include/sta/Network.hh | 2 +- network/ConcreteLibrary.cc | 6 +++--- network/ConcreteNetwork.cc | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/sta/ConcreteLibrary.hh b/include/sta/ConcreteLibrary.hh index 5f12bd0c..57aa1f39 100644 --- a/include/sta/ConcreteLibrary.hh +++ b/include/sta/ConcreteLibrary.hh @@ -118,7 +118,7 @@ public: // Group previously defined bus bit ports together. void groupBusPorts(const char bus_brkt_left, const char bus_brkt_right, - std::function port_big_endian_pred); + std::function port_msb_first); size_t portCount() const; void setName(const char *name); void addPort(ConcretePort *port); diff --git a/include/sta/ConcreteNetwork.hh b/include/sta/ConcreteNetwork.hh index f6eda0a7..b207f56d 100644 --- a/include/sta/ConcreteNetwork.hh +++ b/include/sta/ConcreteNetwork.hh @@ -177,7 +177,7 @@ public: int from_index, int to_index); virtual void groupBusPorts(Cell *cell, - std::function port_is_big_endian); + std::function port_msb_first); virtual Port *makeBundlePort(Cell *cell, const char *name, PortSeq *members); diff --git a/include/sta/Network.hh b/include/sta/Network.hh index 0f2fb048..1f5e1b1a 100644 --- a/include/sta/Network.hh +++ b/include/sta/Network.hh @@ -549,7 +549,7 @@ public: int from_index, int to_index) = 0; virtual void groupBusPorts(Cell *cell, - std::function port_is_big_endian) = 0; + std::function port_msb_first) = 0; virtual Port *makeBundlePort(Cell *cell, const char *name, PortSeq *members) = 0; diff --git a/network/ConcreteLibrary.cc b/network/ConcreteLibrary.cc index 093eed4a..ab24bfc6 100644 --- a/network/ConcreteLibrary.cc +++ b/network/ConcreteLibrary.cc @@ -376,7 +376,7 @@ typedef Map BusPortMap; void ConcreteCell::groupBusPorts(const char bus_brkt_left, const char bus_brkt_right, - std::function port_is_big_endian) + std::function port_msb_first) { const char bus_brkts_left[2]{bus_brkt_left, '\0'}; const char bus_brkts_right[2]{bus_brkt_right, '\0'}; @@ -416,7 +416,7 @@ ConcreteCell::groupBusPorts(const char bus_brkt_left, while (bus_iter.hasNext()) { BusPort *bus_port = bus_iter.next(); const char *bus_name = bus_port->name(); - bool is_big_endian = port_is_big_endian(bus_name); + bool msb_first = port_msb_first(bus_name); ConcretePortSeq *members = bus_port->members(); sort(members, [&](ConcretePort *port1, ConcretePort *port2) { @@ -428,7 +428,7 @@ ConcreteCell::groupBusPorts(const char bus_brkt_left, parseBusName(port2->name(), bus_brkts_left, bus_brkts_right, escape_, bus_name, index2); stringDelete(bus_name); - return is_big_endian ? index1 > index2 : index1 < index2; + return msb_first ? index1 > index2 : index1 < index2; }); char *bus_name1; diff --git a/network/ConcreteNetwork.cc b/network/ConcreteNetwork.cc index e163353d..51f059f7 100644 --- a/network/ConcreteNetwork.cc +++ b/network/ConcreteNetwork.cc @@ -639,12 +639,12 @@ ConcreteNetwork::makeBusPort(Cell *cell, void ConcreteNetwork::groupBusPorts(Cell *cell, - std::function port_is_big_endian) + std::function port_msb_first) { Library *lib = library(cell); ConcreteLibrary *clib = reinterpret_cast(lib); ConcreteCell *ccell = reinterpret_cast(cell); - ccell->groupBusPorts(clib->busBrktLeft(), clib->busBrktRight(), port_is_big_endian); + ccell->groupBusPorts(clib->busBrktLeft(), clib->busBrktRight(), port_msb_first); } Port *