network external cell/port member vars

This commit is contained in:
James Cherry 2019-11-13 14:58:38 -07:00
parent c59b2db038
commit 0c97a10f9a
2 changed files with 23 additions and 0 deletions

View File

@ -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
{

View File

@ -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_;