Get rid of names attached to Links.

This is simply no need for the names on links,
other then for debug messages, and there are
better ways to handle that.
This commit is contained in:
Stephen Williams 2008-09-10 19:34:28 -07:00
parent 5dfecb3789
commit 3abf51dcad
9 changed files with 45 additions and 166 deletions

View File

@ -244,7 +244,7 @@ void NetNode::dump_node(ostream&o, unsigned ind) const
void NetPins::dump_node_pins(ostream&o, unsigned ind) const void NetPins::dump_node_pins(ostream&o, unsigned ind) const
{ {
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
o << setw(ind) << "" << idx << " " << pin(idx).get_name(); o << setw(ind) << "" << idx << " pin" << idx;
switch (pin(idx).get_dir()) { switch (pin(idx).get_dir()) {
case Link::PASSIVE: case Link::PASSIVE:

View File

@ -251,7 +251,6 @@ NetEvProbe::NetEvProbe(NetScope*s, perm_string n, NetEvent*tgt,
{ {
for (unsigned idx = 0 ; idx < p ; idx += 1) { for (unsigned idx = 0 ; idx < p ; idx += 1) {
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
pin(idx).set_name(perm_string::literal("P"));
} }
enext_ = event_->probes_; enext_ = event_->probes_;

View File

@ -34,12 +34,10 @@ NetUserFunc::NetUserFunc(NetScope*s, perm_string n, NetScope*d)
def_(d) def_(d)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(def_->basename());
for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) {
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
pin(idx).set_name(perm_string::literal("D"));
pin(idx).drive0(Link::HIGHZ); pin(idx).drive0(Link::HIGHZ);
pin(idx).drive1(Link::HIGHZ); pin(idx).drive1(Link::HIGHZ);
} }
@ -135,13 +133,11 @@ NetSysFunc::NetSysFunc(NetScope*s, perm_string n,
{ {
def_ = def; def_ = def;
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Q
pin(0).set_name(perm_string::literal("Q"));
for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) {
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
pin(idx).set_name(perm_string::literal("D"));
pin(idx).drive0(Link::HIGHZ); pin(idx).drive0(Link::HIGHZ);
pin(idx).drive1(Link::HIGHZ); pin(idx).drive1(Link::HIGHZ);
} }

View File

@ -206,16 +206,6 @@ unsigned Link::get_pin() const
return pin_; return pin_;
} }
void Link::set_name(perm_string n)
{
name_ = n;
}
perm_string Link::get_name() const
{
return name_;
}
Nexus::Nexus() Nexus::Nexus()
{ {
name_ = 0; name_ = 0;
@ -447,10 +437,9 @@ const char* Nexus::name() const
const Link*lnk = first_nlink(); const Link*lnk = first_nlink();
const NetObj*obj = dynamic_cast<const NetObj*>(lnk->get_obj()); const NetObj*obj = dynamic_cast<const NetObj*>(lnk->get_obj());
pin = lnk->get_pin(); pin = lnk->get_pin();
cerr << "internal error: No signal for nexus of " << cerr << "internal error: No signal for nexus of "
obj->name() << " pin " << pin << "(" << << obj->name() << " pin " << pin
lnk->get_name() << ")" << " type=" << typeid(*obj).name() << "?" << endl;
" type=" << typeid(*obj).name() << "?" << endl;
} }
assert(sig); assert(sig);

View File

@ -40,12 +40,9 @@ NetModulo::NetModulo(NetScope*s, perm_string n, unsigned wr,
: NetNode(s, n, 3), : NetNode(s, n, 3),
width_r_(wr), width_a_(wa), width_b_(wb) width_r_(wr), width_a_(wa), width_b_(wb)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Result
pin(0).set_name(perm_string::literal("Result")); pin(1).set_dir(Link::INPUT); // DataA
pin(1).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT); // DataB
pin(1).set_name(perm_string::literal("DataA"));
pin(2).set_dir(Link::INPUT);
pin(2).set_name(perm_string::literal("DataB"));
} }
NetModulo::~NetModulo() NetModulo::~NetModulo()

View File

@ -45,19 +45,18 @@ static bool has_enable(ivl_switch_type_t tt)
NetTran::NetTran(NetScope*scope, perm_string n, ivl_switch_type_t tt) NetTran::NetTran(NetScope*scope, perm_string n, ivl_switch_type_t tt)
: NetNode(scope, n, has_enable(tt)? 3 : 2), type_(tt) : NetNode(scope, n, has_enable(tt)? 3 : 2), type_(tt)
{ {
pin(0).set_dir(Link::PASSIVE); pin(0).set_name(perm_string::literal("A")); pin(0).set_dir(Link::PASSIVE);
pin(1).set_dir(Link::PASSIVE); pin(1).set_name(perm_string::literal("B")); pin(1).set_dir(Link::PASSIVE);
if (pin_count() == 3) { if (pin_count() == 3) {
pin(2).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT); // Enable
pin(2).set_name(perm_string::literal("E"));
} }
} }
NetTran::NetTran(NetScope*scope, perm_string n, unsigned wid, unsigned part, unsigned off) NetTran::NetTran(NetScope*scope, perm_string n, unsigned wid, unsigned part, unsigned off)
: NetNode(scope, n, 2), type_(IVL_SW_TRAN_VP), wid_(wid), part_(part), off_(off) : NetNode(scope, n, 2), type_(IVL_SW_TRAN_VP), wid_(wid), part_(part), off_(off)
{ {
pin(0).set_dir(Link::PASSIVE); pin(0).set_name(perm_string::literal("A")); pin(0).set_dir(Link::PASSIVE);
pin(1).set_dir(Link::PASSIVE); pin(1).set_name(perm_string::literal("B")); pin(1).set_dir(Link::PASSIVE);
} }
NetTran::~NetTran() NetTran::~NetTran()

View File

@ -30,10 +30,8 @@ NetUDP::NetUDP(NetScope*s, perm_string n, unsigned pins, PUdp *u)
: NetNode(s, n, pins), udp(u) : NetNode(s, n, pins), udp(u)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
for (unsigned idx = 1 ; idx < pins ; idx += 1) { for (unsigned idx = 1 ; idx < pins ; idx += 1) {
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
pin(idx).set_name(perm_string::literal("I"));
} }
} }

View File

@ -238,9 +238,7 @@ NetNode::~NetNode()
NetBranch::NetBranch(discipline_t*dis) NetBranch::NetBranch(discipline_t*dis)
: NetPins(2), discipline_(dis) : NetPins(2), discipline_(dis)
{ {
pin(0).set_name(perm_string::literal("A"));
pin(0).set_dir(Link::PASSIVE); pin(0).set_dir(Link::PASSIVE);
pin(1).set_name(perm_string::literal("B"));
pin(1).set_dir(Link::PASSIVE); pin(1).set_dir(Link::PASSIVE);
} }
@ -266,13 +264,11 @@ NetDelaySrc::NetDelaySrc(NetScope*s, perm_string n, unsigned npins,
posedge_ = false; posedge_ = false;
negedge_ = false; negedge_ = false;
for (unsigned idx = 0 ; idx < npins ; idx += 1) { for (unsigned idx = 0 ; idx < npins ; idx += 1) {
pin(idx).set_name(perm_string::literal("I"));
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
} }
if (condit_src) { if (condit_src) {
condit_flag_ = true; condit_flag_ = true;
pin(npins).set_name(perm_string::literal("COND"));
pin(npins).set_dir(Link::INPUT); pin(npins).set_dir(Link::INPUT);
} }
} }
@ -455,7 +451,6 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t, unsigned npins)
break; break;
} }
pin(0).set_name(perm_string::literal("P"));
pin(0).set_dir(dir); pin(0).set_dir(dir);
pin(0).set_init(init_value); pin(0).set_init(init_value);
@ -494,7 +489,6 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t,
} }
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
pin(idx).set_name(perm_string::literal("P"));
pin(idx).set_dir(dir); pin(idx).set_dir(dir);
pin(idx).set_init(init_value); pin(idx).set_init(init_value);
} }
@ -542,7 +536,6 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t,
} }
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
pin(idx).set_name(perm_string::literal("P"));
pin(idx).set_dir(dir); pin(idx).set_dir(dir);
pin(idx).set_init(init_value); pin(idx).set_init(init_value);
} }
@ -799,8 +792,6 @@ NetPartSelect::NetPartSelect(NetNet*sig, unsigned off, unsigned wid,
pin(1).set_dir(Link::OUTPUT); pin(1).set_dir(Link::OUTPUT);
break; break;
} }
pin(0).set_name(perm_string::literal("Part"));
pin(1).set_name(perm_string::literal("Vect"));
} }
NetPartSelect::NetPartSelect(NetNet*sig, NetNet*sel, NetPartSelect::NetPartSelect(NetNet*sig, NetNet*sel,
@ -822,10 +813,6 @@ NetPartSelect::NetPartSelect(NetNet*sig, NetNet*sel,
break; break;
} }
pin(2).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT);
pin(0).set_name(perm_string::literal("Part"));
pin(1).set_name(perm_string::literal("Vect"));
pin(2).set_name(perm_string::literal("Select"));
} }
NetPartSelect::~NetPartSelect() NetPartSelect::~NetPartSelect()
@ -890,28 +877,22 @@ NetCastInt::NetCastInt(NetScope*scope, perm_string n, unsigned width)
: NetNode(scope, n, 2), width_(width) : NetNode(scope, n, 2), width_(width)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("I"));
} }
NetCastReal::NetCastReal(NetScope*scope, perm_string n, bool signed_flag) NetCastReal::NetCastReal(NetScope*scope, perm_string n, bool signed_flag)
: NetNode(scope, n, 2), signed_flag_(signed_flag) : NetNode(scope, n, 2), signed_flag_(signed_flag)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("I"));
} }
NetConcat::NetConcat(NetScope*scope, perm_string n, unsigned wid, unsigned cnt) NetConcat::NetConcat(NetScope*scope, perm_string n, unsigned wid, unsigned cnt)
: NetNode(scope, n, cnt+1), width_(wid) : NetNode(scope, n, cnt+1), width_(wid)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
for (unsigned idx = 1 ; idx < cnt+1 ; idx += 1) { for (unsigned idx = 1 ; idx < cnt+1 ; idx += 1) {
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
pin(idx).set_name(perm_string::literal("I"));
} }
} }
@ -929,9 +910,7 @@ NetReplicate::NetReplicate(NetScope*scope, perm_string n,
: NetNode(scope, n, 2), width_(wid), repeat_(rpt) : NetNode(scope, n, 2), width_(wid), repeat_(rpt)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("I"));
} }
NetReplicate::~NetReplicate() NetReplicate::~NetReplicate()
@ -966,21 +945,13 @@ NetFF::NetFF(NetScope*s, perm_string n, unsigned width)
: NetNode(s, n, 8), width_(width) : NetNode(s, n, 8), width_(width)
{ {
pin_Clock().set_dir(Link::INPUT); pin_Clock().set_dir(Link::INPUT);
pin_Clock().set_name(perm_string::literal("Clock"));
pin_Enable().set_dir(Link::INPUT); pin_Enable().set_dir(Link::INPUT);
pin_Enable().set_name(perm_string::literal("Enable"));
pin_Aset().set_dir(Link::INPUT); pin_Aset().set_dir(Link::INPUT);
pin_Aset().set_name(perm_string::literal("Aset"));
pin_Aclr().set_dir(Link::INPUT); pin_Aclr().set_dir(Link::INPUT);
pin_Aclr().set_name(perm_string::literal("Aclr"));
pin_Sset().set_dir(Link::INPUT); pin_Sset().set_dir(Link::INPUT);
pin_Sset().set_name(perm_string::literal("Sset"));
pin_Sclr().set_dir(Link::INPUT); pin_Sclr().set_dir(Link::INPUT);
pin_Sclr().set_name(perm_string::literal("Sclr"));
pin_Data().set_dir(Link::INPUT); pin_Data().set_dir(Link::INPUT);
pin_Data().set_name(perm_string::literal("Data"));
pin_Q().set_dir(Link::OUTPUT); pin_Q().set_dir(Link::OUTPUT);
pin_Q().set_name(perm_string::literal("Q"));
} }
NetFF::~NetFF() NetFF::~NetFF()
@ -1097,9 +1068,7 @@ NetAbs::NetAbs(NetScope*s, perm_string n, unsigned w)
: NetNode(s, n, 2), width_(w) : NetNode(s, n, 2), width_(w)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("Result"));
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("DataA"));
} }
NetAbs::~NetAbs() NetAbs::~NetAbs()
@ -1128,23 +1097,14 @@ NetAddSub::NetAddSub(NetScope*s, perm_string n, unsigned w)
: NetNode(s, n, 9), width_(w) : NetNode(s, n, 9), width_(w)
{ {
pin(0).set_dir(Link::INPUT); pin(0).set_dir(Link::INPUT);
pin(0).set_name(perm_string::literal("Add_Sub"));
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("Aclr"));
pin(2).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT);
pin(2).set_name(perm_string::literal("Clock"));
pin(3).set_dir(Link::INPUT); pin(3).set_dir(Link::INPUT);
pin(3).set_name(perm_string::literal("Cin"));
pin(4).set_dir(Link::OUTPUT); pin(4).set_dir(Link::OUTPUT);
pin(4).set_name(perm_string::literal("Cout"));
pin(5).set_dir(Link::OUTPUT); pin(5).set_dir(Link::OUTPUT);
pin(5).set_name(perm_string::literal("Overflow"));
pin(6).set_dir(Link::INPUT); pin(6).set_dir(Link::INPUT);
pin(6).set_name(perm_string::literal("DataA"));
pin(7).set_dir(Link::INPUT); pin(7).set_dir(Link::INPUT);
pin(7).set_name(perm_string::literal("DataB"));
pin(8).set_dir(Link::OUTPUT); pin(8).set_dir(Link::OUTPUT);
pin(8).set_name(perm_string::literal("Result"));
} }
NetAddSub::~NetAddSub() NetAddSub::~NetAddSub()
@ -1200,10 +1160,8 @@ NetArrayDq::NetArrayDq(NetScope*s, perm_string n, NetNet*mem, unsigned awid)
: NetNode(s, n, 2), : NetNode(s, n, 2),
mem_(mem), awidth_(awid) mem_(mem), awidth_(awid)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Result
pin(0).set_name(perm_string::literal("Result")); pin(1).set_dir(Link::INPUT); // Address
pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("Address"));
// Increment the expression reference count for the target // Increment the expression reference count for the target
// memory so that it is not deleted underneath me. // memory so that it is not deleted underneath me.
mem->incr_eref(); mem->incr_eref();
@ -1261,12 +1219,9 @@ NetCLShift::NetCLShift(NetScope*s, perm_string n,
width_(width), width_dist_(width_dist), width_(width), width_dist_(width_dist),
right_flag_(right_flag), signed_flag_(signed_flag) right_flag_(right_flag), signed_flag_(signed_flag)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Result
pin(0).set_name(perm_string::literal("Result")); pin(1).set_dir(Link::INPUT); // Data
pin(1).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT); // Distance
pin(1).set_name(perm_string::literal("Data"));
pin(2).set_dir(Link::INPUT);
pin(2).set_name(perm_string::literal("Distance"));
} }
NetCLShift::~NetCLShift() NetCLShift::~NetCLShift()
@ -1327,26 +1282,16 @@ NetCompare::NetCompare(NetScope*s, perm_string n, unsigned wi)
: NetNode(s, n, 10), width_(wi) : NetNode(s, n, 10), width_(wi)
{ {
signed_flag_ = false; signed_flag_ = false;
pin(0).set_dir(Link::INPUT); pin(0).set_name( pin(0).set_dir(Link::INPUT); // Aclr
perm_string::literal("Aclr")); pin(1).set_dir(Link::INPUT); // Clock
pin(1).set_dir(Link::INPUT); pin(1).set_name( pin(2).set_dir(Link::OUTPUT); // AGB
perm_string::literal("Clock")); pin(3).set_dir(Link::OUTPUT); // AGEB
pin(2).set_dir(Link::OUTPUT); pin(2).set_name( pin(4).set_dir(Link::OUTPUT); // AEB
perm_string::literal("AGB")); pin(5).set_dir(Link::OUTPUT); // ANEB
pin(3).set_dir(Link::OUTPUT); pin(3).set_name( pin(6).set_dir(Link::OUTPUT); // ALB
perm_string::literal("AGEB")); pin(7).set_dir(Link::OUTPUT); // ALEB
pin(4).set_dir(Link::OUTPUT); pin(4).set_name( pin(8).set_dir(Link::INPUT); // DataA
perm_string::literal("AEB")); pin(9).set_dir(Link::INPUT); // DataB
pin(5).set_dir(Link::OUTPUT); pin(5).set_name(
perm_string::literal("ANEB"));
pin(6).set_dir(Link::OUTPUT); pin(6).set_name(
perm_string::literal("ALB"));
pin(7).set_dir(Link::OUTPUT); pin(7).set_name(
perm_string::literal("ALEB"));
pin(8).set_dir(Link::INPUT);
pin(8).set_name(perm_string::literal("DataA"));
pin(9).set_dir(Link::INPUT);
pin(9).set_name(perm_string::literal("DataB"));
} }
NetCompare::~NetCompare() NetCompare::~NetCompare()
@ -1473,12 +1418,9 @@ NetDivide::NetDivide(NetScope*sc, perm_string n, unsigned wr,
: NetNode(sc, n, 3), : NetNode(sc, n, 3),
width_r_(wr), width_a_(wa), width_b_(wb), signed_flag_(false) width_r_(wr), width_a_(wa), width_b_(wb), signed_flag_(false)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Result
pin(0).set_name(perm_string::literal("Result")); pin(1).set_dir(Link::INPUT); // DataA
pin(1).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT); // DataB
pin(1).set_name(perm_string::literal("DataA"));
pin(2).set_dir(Link::INPUT);
pin(2).set_name(perm_string::literal("DataB"));
} }
NetDivide::~NetDivide() NetDivide::~NetDivide()
@ -1544,7 +1486,6 @@ NetLiteral::NetLiteral(NetScope*sc, perm_string n, const verireal&val)
: NetNode(sc, n, 1), real_(val) : NetNode(sc, n, 1), real_(val)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
} }
NetLiteral::~NetLiteral() NetLiteral::~NetLiteral()
@ -1566,12 +1507,9 @@ NetMult::NetMult(NetScope*sc, perm_string n, unsigned wr,
: NetNode(sc, n, 3), : NetNode(sc, n, 3),
signed_(false), width_r_(wr), width_a_(wa), width_b_(wb) signed_(false), width_r_(wr), width_a_(wa), width_b_(wb)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Result
pin(0).set_name(perm_string::literal("Result")); pin(1).set_dir(Link::INPUT); // DataA
pin(1).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT); // DataB
pin(1).set_name(perm_string::literal("DataA"));
pin(2).set_dir(Link::INPUT);
pin(2).set_name(perm_string::literal("DataB"));
} }
NetMult::~NetMult() NetMult::~NetMult()
@ -1638,12 +1576,9 @@ NetPow::NetPow(NetScope*sc, perm_string n, unsigned wr,
: NetNode(sc, n, 3), : NetNode(sc, n, 3),
signed_(false), width_r_(wr), width_a_(wa), width_b_(wb) signed_(false), width_r_(wr), width_a_(wa), width_b_(wb)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Result
pin(0).set_name(perm_string::literal("Result")); pin(1).set_dir(Link::INPUT); // DataA
pin(1).set_dir(Link::INPUT); pin(2).set_dir(Link::INPUT); // DataB
pin(1).set_name(perm_string::literal("DataA"));
pin(2).set_dir(Link::INPUT);
pin(2).set_name(perm_string::literal("DataB"));
} }
NetPow::~NetPow() NetPow::~NetPow()
@ -1718,14 +1653,11 @@ NetMux::NetMux(NetScope*s, perm_string n,
: NetNode(s, n, 2+si), : NetNode(s, n, 2+si),
width_(wi), size_(si), swidth_(sw) width_(wi), size_(si), swidth_(sw)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT); // Q
pin(0).set_name(perm_string::literal("Q")); pin(1).set_dir(Link::INPUT); // Sel
pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("Sel"));
for (unsigned idx = 0 ; idx < size_ ; idx += 1) { for (unsigned idx = 0 ; idx < size_ ; idx += 1) {
pin_Data(idx).set_dir(Link::INPUT); pin_Data(idx).set_dir(Link::INPUT); // Data[idx]
pin_Data(idx).set_name(perm_string::literal("D"));
} }
} }
@ -1785,8 +1717,6 @@ NetSignExtend::NetSignExtend(NetScope*s, perm_string n, unsigned w)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(0).set_name(perm_string::literal("O"));
pin(1).set_name(perm_string::literal("I"));
} }
NetSignExtend::~NetSignExtend() NetSignExtend::~NetSignExtend()
@ -1803,8 +1733,6 @@ NetBUFZ::NetBUFZ(NetScope*s, perm_string n, unsigned w)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(0).set_name(perm_string::literal("O"));
pin(1).set_name(perm_string::literal("I"));
} }
NetBUFZ::~NetBUFZ() NetBUFZ::~NetBUFZ()
@ -1819,9 +1747,9 @@ unsigned NetBUFZ::width() const
NetCaseCmp::NetCaseCmp(NetScope*s, perm_string n, unsigned wid, bool eeq) NetCaseCmp::NetCaseCmp(NetScope*s, perm_string n, unsigned wid, bool eeq)
: NetNode(s, n, 3), width_(wid), eeq_(eeq) : NetNode(s, n, 3), width_(wid), eeq_(eeq)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_name(perm_string::literal("O")); pin(0).set_dir(Link::OUTPUT);
pin(1).set_dir(Link::INPUT); pin(1).set_name(perm_string::literal("I0")); pin(1).set_dir(Link::INPUT);
pin(2).set_dir(Link::INPUT); pin(2).set_name(perm_string::literal("I1")); pin(2).set_dir(Link::INPUT);
} }
NetCaseCmp::~NetCaseCmp() NetCaseCmp::~NetCaseCmp()
@ -1880,7 +1808,6 @@ NetConst::NetConst(NetScope*s, perm_string n, verinum::V v)
: NetNode(s, n, 1), width_(1) : NetNode(s, n, 1), width_(1)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
value_ = new verinum::V[1]; value_ = new verinum::V[1];
value_[0] = v; value_[0] = v;
} }
@ -1889,7 +1816,6 @@ NetConst::NetConst(NetScope*s, perm_string n, const verinum&val)
: NetNode(s, n, 1), width_(val.len()) : NetNode(s, n, 1), width_(val.len())
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
value_ = new verinum::V[width_]; value_ = new verinum::V[width_];
for (unsigned idx = 0 ; idx < width_ ; idx += 1) { for (unsigned idx = 0 ; idx < width_ ; idx += 1) {
value_[idx] = val.get(idx); value_[idx] = val.get(idx);
@ -1920,12 +1846,7 @@ NetFuncDef::NetFuncDef(NetScope*s, NetNet*result, const svector<NetNet*>&po)
NetFuncDef::~NetFuncDef() NetFuncDef::~NetFuncDef()
{ {
} }
#if 0
const string NetFuncDef::name() const
{
return scope_->name();
}
#endif
const NetScope* NetFuncDef::scope() const const NetScope* NetFuncDef::scope() const
{ {
return scope_; return scope_;
@ -2049,12 +1970,7 @@ NetUTask::NetUTask(NetScope*def)
NetUTask::~NetUTask() NetUTask::~NetUTask()
{ {
} }
#if 0
const string NetUTask::name() const
{
return task_->name();
}
#endif
const NetScope* NetUTask::task() const const NetScope* NetUTask::task() const
{ {
return task_; return task_;
@ -2418,10 +2334,8 @@ NetLogic::NetLogic(NetScope*s, perm_string n, unsigned pins,
: NetNode(s, n, pins), type_(t), width_(wid) : NetNode(s, n, pins), type_(t), width_(wid)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
for (unsigned idx = 1 ; idx < pins ; idx += 1) { for (unsigned idx = 1 ; idx < pins ; idx += 1) {
pin(idx).set_dir(Link::INPUT); pin(idx).set_dir(Link::INPUT);
pin(idx).set_name(perm_string::literal("I"));
} }
} }
@ -2440,9 +2354,7 @@ NetUReduce::NetUReduce(NetScope*scope, perm_string n,
: NetNode(scope, n, 2), type_(t), width_(wid) : NetNode(scope, n, 2), type_(t), width_(wid)
{ {
pin(0).set_dir(Link::OUTPUT); pin(0).set_dir(Link::OUTPUT);
pin(0).set_name(perm_string::literal("O"));
pin(1).set_dir(Link::INPUT); pin(1).set_dir(Link::INPUT);
pin(1).set_name(perm_string::literal("I"));
} }
NetUReduce::TYPE NetUReduce::type() const NetUReduce::TYPE NetUReduce::type() const

View File

@ -256,12 +256,6 @@ class Link {
NetPins*get_obj(); NetPins*get_obj();
unsigned get_pin() const; unsigned get_pin() const;
// A link of an object (sometimes called a "pin") has a
// name. It is convenient for the name to have a string and an
// integer part.
void set_name(perm_string);
perm_string get_name() const;
private: private:
// The NetNode manages these. They point back to the // The NetNode manages these. They point back to the
// NetNode so that following the links can get me here. // NetNode so that following the links can get me here.
@ -272,11 +266,6 @@ class Link {
strength_t drive0_, drive1_; strength_t drive0_, drive1_;
verinum::V init_; verinum::V init_;
// These members name the pin of the link. If the name
// has width, then the inst_ member is the index of the
// pin.
perm_string name_;
private: private:
Link *next_; Link *next_;
Nexus*nexus_; Nexus*nexus_;