Remove useless Link instance number.
This commit is contained in:
parent
088c7f3feb
commit
5dfecb3789
|
|
@ -244,8 +244,7 @@ void NetNode::dump_node(ostream&o, unsigned ind) const
|
|||
void NetPins::dump_node_pins(ostream&o, unsigned ind) const
|
||||
{
|
||||
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
|
||||
o << setw(ind) << "" << idx << " " << pin(idx).get_name()
|
||||
<< "<" << pin(idx).get_inst() << ">";
|
||||
o << setw(ind) << "" << idx << " " << pin(idx).get_name();
|
||||
|
||||
switch (pin(idx).get_dir()) {
|
||||
case Link::PASSIVE:
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ NetEvProbe::NetEvProbe(NetScope*s, perm_string n, NetEvent*tgt,
|
|||
{
|
||||
for (unsigned idx = 0 ; idx < p ; idx += 1) {
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
pin(idx).set_name(perm_string::literal("P"), idx);
|
||||
pin(idx).set_name(perm_string::literal("P"));
|
||||
}
|
||||
|
||||
enext_ = event_->probes_;
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ NetUserFunc::NetUserFunc(NetScope*s, perm_string n, NetScope*d)
|
|||
def_(d)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(def_->basename(), 0);
|
||||
pin(0).set_name(def_->basename());
|
||||
|
||||
for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) {
|
||||
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
pin(idx).set_name(perm_string::literal("D"), idx-1);
|
||||
pin(idx).set_name(perm_string::literal("D"));
|
||||
pin(idx).drive0(Link::HIGHZ);
|
||||
pin(idx).drive1(Link::HIGHZ);
|
||||
}
|
||||
|
|
@ -136,12 +136,12 @@ NetSysFunc::NetSysFunc(NetScope*s, perm_string n,
|
|||
def_ = def;
|
||||
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Q"), 0);
|
||||
pin(0).set_name(perm_string::literal("Q"));
|
||||
|
||||
for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) {
|
||||
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
pin(idx).set_name(perm_string::literal("D"), idx-1);
|
||||
pin(idx).set_name(perm_string::literal("D"));
|
||||
pin(idx).drive0(Link::HIGHZ);
|
||||
pin(idx).drive1(Link::HIGHZ);
|
||||
}
|
||||
|
|
|
|||
12
net_link.cc
12
net_link.cc
|
|
@ -64,7 +64,7 @@ void connect(Link&l, Link&r)
|
|||
|
||||
Link::Link()
|
||||
: dir_(PASSIVE), drive0_(STRONG), drive1_(STRONG), init_(verinum::Vx),
|
||||
inst_(0), next_(0), nexus_(0)
|
||||
next_(0), nexus_(0)
|
||||
{
|
||||
(new Nexus()) -> relink(this);
|
||||
}
|
||||
|
|
@ -206,10 +206,9 @@ unsigned Link::get_pin() const
|
|||
return pin_;
|
||||
}
|
||||
|
||||
void Link::set_name(perm_string n, unsigned i)
|
||||
void Link::set_name(perm_string n)
|
||||
{
|
||||
name_ = n;
|
||||
inst_ = i;
|
||||
}
|
||||
|
||||
perm_string Link::get_name() const
|
||||
|
|
@ -217,11 +216,6 @@ perm_string Link::get_name() const
|
|||
return name_;
|
||||
}
|
||||
|
||||
unsigned Link::get_inst() const
|
||||
{
|
||||
return inst_;
|
||||
}
|
||||
|
||||
Nexus::Nexus()
|
||||
{
|
||||
name_ = 0;
|
||||
|
|
@ -455,7 +449,7 @@ const char* Nexus::name() const
|
|||
pin = lnk->get_pin();
|
||||
cerr << "internal error: No signal for nexus of " <<
|
||||
obj->name() << " pin " << pin << "(" <<
|
||||
lnk->get_name() << "<" << lnk->get_inst() << ">)"
|
||||
lnk->get_name() << ")"
|
||||
" type=" << typeid(*obj).name() << "?" << endl;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ NetModulo::NetModulo(NetScope*s, perm_string n, unsigned wr,
|
|||
width_r_(wr), width_a_(wa), width_b_(wb)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("DataA"), 0);
|
||||
pin(1).set_name(perm_string::literal("DataA"));
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("DataB"), 0);
|
||||
pin(2).set_name(perm_string::literal("DataB"));
|
||||
}
|
||||
|
||||
NetModulo::~NetModulo()
|
||||
|
|
|
|||
10
net_tran.cc
10
net_tran.cc
|
|
@ -45,19 +45,19 @@ static bool has_enable(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)
|
||||
{
|
||||
pin(0).set_dir(Link::PASSIVE); pin(0).set_name(perm_string::literal("A"), 0);
|
||||
pin(1).set_dir(Link::PASSIVE); pin(1).set_name(perm_string::literal("B"), 0);
|
||||
pin(0).set_dir(Link::PASSIVE); pin(0).set_name(perm_string::literal("A"));
|
||||
pin(1).set_dir(Link::PASSIVE); pin(1).set_name(perm_string::literal("B"));
|
||||
if (pin_count() == 3) {
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("E"), 0);
|
||||
pin(2).set_name(perm_string::literal("E"));
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
pin(0).set_dir(Link::PASSIVE); pin(0).set_name(perm_string::literal("A"), 0);
|
||||
pin(1).set_dir(Link::PASSIVE); pin(1).set_name(perm_string::literal("B"), 0);
|
||||
pin(0).set_dir(Link::PASSIVE); pin(0).set_name(perm_string::literal("A"));
|
||||
pin(1).set_dir(Link::PASSIVE); pin(1).set_name(perm_string::literal("B"));
|
||||
}
|
||||
|
||||
NetTran::~NetTran()
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ NetUDP::NetUDP(NetScope*s, perm_string n, unsigned pins, PUdp *u)
|
|||
: NetNode(s, n, pins), udp(u)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
for (unsigned idx = 1 ; idx < pins ; idx += 1) {
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
pin(idx).set_name(perm_string::literal("I"), idx-1);
|
||||
pin(idx).set_name(perm_string::literal("I"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
136
netlist.cc
136
netlist.cc
|
|
@ -238,9 +238,9 @@ NetNode::~NetNode()
|
|||
NetBranch::NetBranch(discipline_t*dis)
|
||||
: NetPins(2), discipline_(dis)
|
||||
{
|
||||
pin(0).set_name(perm_string::literal("A"), 0);
|
||||
pin(0).set_name(perm_string::literal("A"));
|
||||
pin(0).set_dir(Link::PASSIVE);
|
||||
pin(1).set_name(perm_string::literal("B"), 0);
|
||||
pin(1).set_name(perm_string::literal("B"));
|
||||
pin(1).set_dir(Link::PASSIVE);
|
||||
}
|
||||
|
||||
|
|
@ -266,13 +266,13 @@ NetDelaySrc::NetDelaySrc(NetScope*s, perm_string n, unsigned npins,
|
|||
posedge_ = false;
|
||||
negedge_ = false;
|
||||
for (unsigned idx = 0 ; idx < npins ; idx += 1) {
|
||||
pin(idx).set_name(perm_string::literal("I"), idx);
|
||||
pin(idx).set_name(perm_string::literal("I"));
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
}
|
||||
|
||||
if (condit_src) {
|
||||
condit_flag_ = true;
|
||||
pin(npins).set_name(perm_string::literal("COND"), 0);
|
||||
pin(npins).set_name(perm_string::literal("COND"));
|
||||
pin(npins).set_dir(Link::INPUT);
|
||||
}
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t, unsigned npins)
|
|||
break;
|
||||
}
|
||||
|
||||
pin(0).set_name(perm_string::literal("P"), 0);
|
||||
pin(0).set_name(perm_string::literal("P"));
|
||||
pin(0).set_dir(dir);
|
||||
pin(0).set_init(init_value);
|
||||
|
||||
|
|
@ -494,7 +494,7 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t,
|
|||
}
|
||||
|
||||
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
|
||||
pin(idx).set_name(perm_string::literal("P"), idx);
|
||||
pin(idx).set_name(perm_string::literal("P"));
|
||||
pin(idx).set_dir(dir);
|
||||
pin(idx).set_init(init_value);
|
||||
}
|
||||
|
|
@ -542,7 +542,7 @@ NetNet::NetNet(NetScope*s, perm_string n, Type t,
|
|||
}
|
||||
|
||||
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
|
||||
pin(idx).set_name(perm_string::literal("P"), idx);
|
||||
pin(idx).set_name(perm_string::literal("P"));
|
||||
pin(idx).set_dir(dir);
|
||||
pin(idx).set_init(init_value);
|
||||
}
|
||||
|
|
@ -799,8 +799,8 @@ NetPartSelect::NetPartSelect(NetNet*sig, unsigned off, unsigned wid,
|
|||
pin(1).set_dir(Link::OUTPUT);
|
||||
break;
|
||||
}
|
||||
pin(0).set_name(perm_string::literal("Part"), 0);
|
||||
pin(1).set_name(perm_string::literal("Vect"), 0);
|
||||
pin(0).set_name(perm_string::literal("Part"));
|
||||
pin(1).set_name(perm_string::literal("Vect"));
|
||||
}
|
||||
|
||||
NetPartSelect::NetPartSelect(NetNet*sig, NetNet*sel,
|
||||
|
|
@ -823,9 +823,9 @@ NetPartSelect::NetPartSelect(NetNet*sig, NetNet*sel,
|
|||
}
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
|
||||
pin(0).set_name(perm_string::literal("Part"), 0);
|
||||
pin(1).set_name(perm_string::literal("Vect"), 0);
|
||||
pin(2).set_name(perm_string::literal("Select"), 0);
|
||||
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()
|
||||
|
|
@ -890,28 +890,28 @@ NetCastInt::NetCastInt(NetScope*scope, perm_string n, unsigned width)
|
|||
: NetNode(scope, n, 2), width_(width)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("I"), 0);
|
||||
pin(1).set_name(perm_string::literal("I"));
|
||||
}
|
||||
|
||||
NetCastReal::NetCastReal(NetScope*scope, perm_string n, bool signed_flag)
|
||||
: NetNode(scope, n, 2), signed_flag_(signed_flag)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("I"), 0);
|
||||
pin(1).set_name(perm_string::literal("I"));
|
||||
}
|
||||
|
||||
NetConcat::NetConcat(NetScope*scope, perm_string n, unsigned wid, unsigned cnt)
|
||||
: NetNode(scope, n, cnt+1), width_(wid)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
for (unsigned idx = 1 ; idx < cnt+1 ; idx += 1) {
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
pin(idx).set_name(perm_string::literal("I"), idx-1);
|
||||
pin(idx).set_name(perm_string::literal("I"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -929,9 +929,9 @@ NetReplicate::NetReplicate(NetScope*scope, perm_string n,
|
|||
: NetNode(scope, n, 2), width_(wid), repeat_(rpt)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("I"), 0);
|
||||
pin(1).set_name(perm_string::literal("I"));
|
||||
}
|
||||
|
||||
NetReplicate::~NetReplicate()
|
||||
|
|
@ -966,21 +966,21 @@ NetFF::NetFF(NetScope*s, perm_string n, unsigned width)
|
|||
: NetNode(s, n, 8), width_(width)
|
||||
{
|
||||
pin_Clock().set_dir(Link::INPUT);
|
||||
pin_Clock().set_name(perm_string::literal("Clock"), 0);
|
||||
pin_Clock().set_name(perm_string::literal("Clock"));
|
||||
pin_Enable().set_dir(Link::INPUT);
|
||||
pin_Enable().set_name(perm_string::literal("Enable"), 0);
|
||||
pin_Enable().set_name(perm_string::literal("Enable"));
|
||||
pin_Aset().set_dir(Link::INPUT);
|
||||
pin_Aset().set_name(perm_string::literal("Aset"), 0);
|
||||
pin_Aset().set_name(perm_string::literal("Aset"));
|
||||
pin_Aclr().set_dir(Link::INPUT);
|
||||
pin_Aclr().set_name(perm_string::literal("Aclr"), 0);
|
||||
pin_Aclr().set_name(perm_string::literal("Aclr"));
|
||||
pin_Sset().set_dir(Link::INPUT);
|
||||
pin_Sset().set_name(perm_string::literal("Sset"), 0);
|
||||
pin_Sset().set_name(perm_string::literal("Sset"));
|
||||
pin_Sclr().set_dir(Link::INPUT);
|
||||
pin_Sclr().set_name(perm_string::literal("Sclr"), 0);
|
||||
pin_Sclr().set_name(perm_string::literal("Sclr"));
|
||||
pin_Data().set_dir(Link::INPUT);
|
||||
pin_Data().set_name(perm_string::literal("Data"), 0);
|
||||
pin_Data().set_name(perm_string::literal("Data"));
|
||||
pin_Q().set_dir(Link::OUTPUT);
|
||||
pin_Q().set_name(perm_string::literal("Q"), 0);
|
||||
pin_Q().set_name(perm_string::literal("Q"));
|
||||
}
|
||||
|
||||
NetFF::~NetFF()
|
||||
|
|
@ -1097,9 +1097,9 @@ NetAbs::NetAbs(NetScope*s, perm_string n, unsigned w)
|
|||
: NetNode(s, n, 2), width_(w)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("DataA"), 0);
|
||||
pin(1).set_name(perm_string::literal("DataA"));
|
||||
}
|
||||
|
||||
NetAbs::~NetAbs()
|
||||
|
|
@ -1128,23 +1128,23 @@ NetAddSub::NetAddSub(NetScope*s, perm_string n, unsigned w)
|
|||
: NetNode(s, n, 9), width_(w)
|
||||
{
|
||||
pin(0).set_dir(Link::INPUT);
|
||||
pin(0).set_name(perm_string::literal("Add_Sub"), 0);
|
||||
pin(0).set_name(perm_string::literal("Add_Sub"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("Aclr"), 0);
|
||||
pin(1).set_name(perm_string::literal("Aclr"));
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("Clock"), 0);
|
||||
pin(2).set_name(perm_string::literal("Clock"));
|
||||
pin(3).set_dir(Link::INPUT);
|
||||
pin(3).set_name(perm_string::literal("Cin"), 0);
|
||||
pin(3).set_name(perm_string::literal("Cin"));
|
||||
pin(4).set_dir(Link::OUTPUT);
|
||||
pin(4).set_name(perm_string::literal("Cout"), 0);
|
||||
pin(4).set_name(perm_string::literal("Cout"));
|
||||
pin(5).set_dir(Link::OUTPUT);
|
||||
pin(5).set_name(perm_string::literal("Overflow"), 0);
|
||||
pin(5).set_name(perm_string::literal("Overflow"));
|
||||
pin(6).set_dir(Link::INPUT);
|
||||
pin(6).set_name(perm_string::literal("DataA"), 0);
|
||||
pin(6).set_name(perm_string::literal("DataA"));
|
||||
pin(7).set_dir(Link::INPUT);
|
||||
pin(7).set_name(perm_string::literal("DataB"), 0);
|
||||
pin(7).set_name(perm_string::literal("DataB"));
|
||||
pin(8).set_dir(Link::OUTPUT);
|
||||
pin(8).set_name(perm_string::literal("Result"), 0);
|
||||
pin(8).set_name(perm_string::literal("Result"));
|
||||
}
|
||||
|
||||
NetAddSub::~NetAddSub()
|
||||
|
|
@ -1201,9 +1201,9 @@ NetArrayDq::NetArrayDq(NetScope*s, perm_string n, NetNet*mem, unsigned awid)
|
|||
mem_(mem), awidth_(awid)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("Address"), 0);
|
||||
pin(1).set_name(perm_string::literal("Address"));
|
||||
// Increment the expression reference count for the target
|
||||
// memory so that it is not deleted underneath me.
|
||||
mem->incr_eref();
|
||||
|
|
@ -1262,11 +1262,11 @@ NetCLShift::NetCLShift(NetScope*s, perm_string n,
|
|||
right_flag_(right_flag), signed_flag_(signed_flag)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("Data"), 0);
|
||||
pin(1).set_name(perm_string::literal("Data"));
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("Distance"), 0);
|
||||
pin(2).set_name(perm_string::literal("Distance"));
|
||||
}
|
||||
|
||||
NetCLShift::~NetCLShift()
|
||||
|
|
@ -1474,11 +1474,11 @@ NetDivide::NetDivide(NetScope*sc, perm_string n, unsigned wr,
|
|||
width_r_(wr), width_a_(wa), width_b_(wb), signed_flag_(false)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("DataA"), 0);
|
||||
pin(1).set_name(perm_string::literal("DataA"));
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("DataB"), 0);
|
||||
pin(2).set_name(perm_string::literal("DataB"));
|
||||
}
|
||||
|
||||
NetDivide::~NetDivide()
|
||||
|
|
@ -1544,7 +1544,7 @@ NetLiteral::NetLiteral(NetScope*sc, perm_string n, const verireal&val)
|
|||
: NetNode(sc, n, 1), real_(val)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
}
|
||||
|
||||
NetLiteral::~NetLiteral()
|
||||
|
|
@ -1567,11 +1567,11 @@ NetMult::NetMult(NetScope*sc, perm_string n, unsigned wr,
|
|||
signed_(false), width_r_(wr), width_a_(wa), width_b_(wb)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("DataA"), 0);
|
||||
pin(1).set_name(perm_string::literal("DataA"));
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("DataB"), 0);
|
||||
pin(2).set_name(perm_string::literal("DataB"));
|
||||
}
|
||||
|
||||
NetMult::~NetMult()
|
||||
|
|
@ -1639,11 +1639,11 @@ NetPow::NetPow(NetScope*sc, perm_string n, unsigned wr,
|
|||
signed_(false), width_r_(wr), width_a_(wa), width_b_(wb)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Result"), 0);
|
||||
pin(0).set_name(perm_string::literal("Result"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("DataA"), 0);
|
||||
pin(1).set_name(perm_string::literal("DataA"));
|
||||
pin(2).set_dir(Link::INPUT);
|
||||
pin(2).set_name(perm_string::literal("DataB"), 0);
|
||||
pin(2).set_name(perm_string::literal("DataB"));
|
||||
}
|
||||
|
||||
NetPow::~NetPow()
|
||||
|
|
@ -1719,13 +1719,13 @@ NetMux::NetMux(NetScope*s, perm_string n,
|
|||
width_(wi), size_(si), swidth_(sw)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("Q"), 0);
|
||||
pin(0).set_name(perm_string::literal("Q"));
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(1).set_name(perm_string::literal("Sel"), 0);
|
||||
pin(1).set_name(perm_string::literal("Sel"));
|
||||
|
||||
for (unsigned idx = 0 ; idx < size_ ; idx += 1) {
|
||||
pin_Data(idx).set_dir(Link::INPUT);
|
||||
pin_Data(idx).set_name(perm_string::literal("D"), idx);
|
||||
pin_Data(idx).set_name(perm_string::literal("D"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1785,8 +1785,8 @@ NetSignExtend::NetSignExtend(NetScope*s, perm_string n, unsigned w)
|
|||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(1).set_name(perm_string::literal("I"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
pin(1).set_name(perm_string::literal("I"));
|
||||
}
|
||||
|
||||
NetSignExtend::~NetSignExtend()
|
||||
|
|
@ -1803,8 +1803,8 @@ NetBUFZ::NetBUFZ(NetScope*s, perm_string n, unsigned w)
|
|||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(1).set_dir(Link::INPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(1).set_name(perm_string::literal("I"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
pin(1).set_name(perm_string::literal("I"));
|
||||
}
|
||||
|
||||
NetBUFZ::~NetBUFZ()
|
||||
|
|
@ -1819,9 +1819,9 @@ unsigned NetBUFZ::width() const
|
|||
NetCaseCmp::NetCaseCmp(NetScope*s, perm_string n, unsigned wid, bool eeq)
|
||||
: NetNode(s, n, 3), width_(wid), eeq_(eeq)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT); pin(0).set_name(perm_string::literal("O"),0);
|
||||
pin(1).set_dir(Link::INPUT); pin(1).set_name(perm_string::literal("I"),0);
|
||||
pin(2).set_dir(Link::INPUT); pin(2).set_name(perm_string::literal("I"),1);
|
||||
pin(0).set_dir(Link::OUTPUT); pin(0).set_name(perm_string::literal("O"));
|
||||
pin(1).set_dir(Link::INPUT); pin(1).set_name(perm_string::literal("I0"));
|
||||
pin(2).set_dir(Link::INPUT); pin(2).set_name(perm_string::literal("I1"));
|
||||
}
|
||||
|
||||
NetCaseCmp::~NetCaseCmp()
|
||||
|
|
@ -1880,7 +1880,7 @@ NetConst::NetConst(NetScope*s, perm_string n, verinum::V v)
|
|||
: NetNode(s, n, 1), width_(1)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
value_ = new verinum::V[1];
|
||||
value_[0] = v;
|
||||
}
|
||||
|
|
@ -1889,7 +1889,7 @@ NetConst::NetConst(NetScope*s, perm_string n, const verinum&val)
|
|||
: NetNode(s, n, 1), width_(val.len())
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
value_ = new verinum::V[width_];
|
||||
for (unsigned idx = 0 ; idx < width_ ; idx += 1) {
|
||||
value_[idx] = val.get(idx);
|
||||
|
|
@ -2418,10 +2418,10 @@ NetLogic::NetLogic(NetScope*s, perm_string n, unsigned pins,
|
|||
: NetNode(s, n, pins), type_(t), width_(wid)
|
||||
{
|
||||
pin(0).set_dir(Link::OUTPUT);
|
||||
pin(0).set_name(perm_string::literal("O"), 0);
|
||||
pin(0).set_name(perm_string::literal("O"));
|
||||
for (unsigned idx = 1 ; idx < pins ; idx += 1) {
|
||||
pin(idx).set_dir(Link::INPUT);
|
||||
pin(idx).set_name(perm_string::literal("I"), idx-1);
|
||||
pin(idx).set_name(perm_string::literal("I"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -259,9 +259,8 @@ class Link {
|
|||
// 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, unsigned inst =0);
|
||||
void set_name(perm_string);
|
||||
perm_string get_name() const;
|
||||
unsigned get_inst() const;
|
||||
|
||||
private:
|
||||
// The NetNode manages these. They point back to the
|
||||
|
|
@ -277,7 +276,6 @@ class Link {
|
|||
// has width, then the inst_ member is the index of the
|
||||
// pin.
|
||||
perm_string name_;
|
||||
unsigned inst_;
|
||||
|
||||
private:
|
||||
Link *next_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue