From 0c97a10f9a52242460951ba488238c10bb012e67 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Wed, 13 Nov 2019 14:58:38 -0700 Subject: [PATCH] network external cell/port member vars --- network/ConcreteLibrary.cc | 14 ++++++++++++++ network/ConcreteLibrary.hh | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/network/ConcreteLibrary.cc b/network/ConcreteLibrary.cc index 059e104f..eea5ec4c 100644 --- a/network/ConcreteLibrary.cc +++ b/network/ConcreteLibrary.cc @@ -117,6 +117,7 @@ ConcreteCell::ConcreteCell(ConcreteLibrary *library, name_(stringCopy(name)), filename_(stringCopy(filename)), liberty_cell_(nullptr), + ext_cell_(nullptr), port_bit_count_(0), is_leaf_(is_leaf) { @@ -145,6 +146,12 @@ ConcreteCell::setLibertyCell(LibertyCell *cell) liberty_cell_ = cell; } +void +ConcreteCell::setExtCell(void *ext_cell) +{ + ext_cell_ = ext_cell; +} + ConcretePort * ConcreteCell::makePort(const char *name) { @@ -437,6 +444,7 @@ ConcretePort::ConcretePort(ConcreteCell *cell, cell_(cell), direction_(PortDirection::unknown()), liberty_port_(nullptr), + ext_port_(nullptr), pin_index_(-1), is_bundle_(is_bundle), is_bus_(is_bus), @@ -468,6 +476,12 @@ ConcretePort::setLibertyPort(LibertyPort *port) liberty_port_ = port; } +void +ConcretePort::setExtPort(void *port) +{ + ext_port_ = port; +} + const char * ConcretePort::busName() const { diff --git a/network/ConcreteLibrary.hh b/network/ConcreteLibrary.hh index 906b135c..18ecd8db 100644 --- a/network/ConcreteLibrary.hh +++ b/network/ConcreteLibrary.hh @@ -96,6 +96,8 @@ public: const char *filename() const { return filename_; } LibertyCell *libertyCell() const { return liberty_cell_; } void setLibertyCell(LibertyCell *cell); + void *extCell() const { return ext_cell_; } + void setExtCell(void *ext_cell); int portBitCount() const { return port_bit_count_; } ConcretePort *findPort(const char *name) const; void findPortsMatching(const PatternMatch *pattern, @@ -147,6 +149,8 @@ protected: // Filename is optional. const char *filename_; LibertyCell *liberty_cell_; + // External application cell. + void *ext_cell_; // Non-bus and bus ports (but no expanded bus bit ports). ConcretePortSeq ports_; ConcretePortMap port_map_; @@ -172,6 +176,9 @@ public: PortDirection *direction() const { return direction_; } LibertyPort *libertyPort() const { return liberty_port_; } void setLibertyPort(LibertyPort *port); + // External application port. + void *extPort() const { return ext_port_; } + void setExtPort(void *port); void setDirection(PortDirection *dir); // Bundles are groups of related ports that do not use // bus notation. @@ -220,6 +227,8 @@ protected: ConcreteCell *cell_; PortDirection *direction_; LibertyPort *liberty_port_; + // External application port. + void *ext_port_; int pin_index_; bool is_bundle_; bool is_bus_;