diff --git a/design_dump.cc b/design_dump.cc index 908551c61..427a9a8da 100644 --- a/design_dump.cc +++ b/design_dump.cc @@ -279,8 +279,13 @@ void NetCompare::dump_node(ostream&o, unsigned ind) const void NetConcat::dump_node(ostream&o, unsigned ind) const { o << setw(ind) << "" << "NetConcat: " - << name() - << " scope=" << scope_path(scope()) + << name(); + if (rise_time()) + o << " #(" << *rise_time() + << "," << *fall_time() << "," << *decay_time() << ")"; + else + o << " #(0,0,0)"; + o << " scope=" << scope_path(scope()) << " width=" << width_ << endl; dump_node_pins(o, ind+4); dump_obj_attr(o, ind+4); @@ -302,7 +307,10 @@ void NetMult::dump_node(ostream&o, unsigned ind) const void NetPow::dump_node(ostream&o, unsigned ind) const { - o << setw(ind) << "" << "LPM_POW (NetPow): " << name() << endl; + o << setw(ind) << "" << "LPM_POW (NetPow): " << name() + << " scope=" << scope_path(scope()) + << " delay=(" << *rise_time() << "," << *fall_time() << "," + << *decay_time() << ")" << endl; dump_node_pins(o, ind+4); dump_obj_attr(o, ind+4); } @@ -457,7 +465,9 @@ void NetPartSelect::dump_node(ostream&o, unsigned ind) const break; } o << setw(ind) << "" << "NetPartSelect(" << pt << "): " - << name() << " off=" << off_ << " wid=" << wid_ <pin(0).drivers_delays(rise_time, fall_time, decay_time); + } + connect(lval->pin(0), rval->pin(0)); if (lval->local_flag()) diff --git a/net_link.cc b/net_link.cc index e7aa09790..df1a97ca0 100644 --- a/net_link.cc +++ b/net_link.cc @@ -101,6 +101,11 @@ Link::DIR Link::get_dir() const return dir_; } +void Link::drivers_delays(NetExpr*rise, NetExpr*fall, NetExpr*decay) +{ + nexus_->drivers_delays(rise, fall, decay); +} + void Link::drive0(Link::strength_t str) { drive0_ = str; @@ -245,6 +250,19 @@ verinum::V Nexus::get_init() const return verinum::Vz; } +void Nexus::drivers_delays(NetExpr*rise, NetExpr*fall, NetExpr*decay) +{ + for (Link*cur = list_ ; cur ; cur = cur->next_) { + if (cur->get_dir() != Link::OUTPUT) + continue; + + NetObj*obj = cur->get_obj(); + obj->rise_time(rise); + obj->fall_time(fall); + obj->decay_time(decay); + } +} + void Nexus::unlink(Link*that) { if (name_) { diff --git a/netlist.h b/netlist.h index 0ecd27201..c069e3942 100644 --- a/netlist.h +++ b/netlist.h @@ -148,6 +148,9 @@ class Link { void set_dir(DIR d); DIR get_dir() const; + // Set the delay for all the drivers to this nexus. + void drivers_delays(NetExpr*rise, NetExpr*fall, NetExpr*decay); + // A link has a drive strength for 0 and 1 values. The drive0 // strength is for when the link has the value 0, and drive1 // strength is for when the link has a value 1. @@ -255,6 +258,8 @@ class Nexus { const char* name() const; verinum::V get_init() const; + void drivers_delays(NetExpr*rise, NetExpr*fall, NetExpr*decay); + Link*first_nlink(); const Link* first_nlink()const;