Permalink
Browse files

Restructure Nexus lists of Links to handle large net lists.

When netlists get very large, the Nexus::connect() method tickles
the O(N) performance and elaboration gets very slow. Rework the
connect method to be O(C), for a drastic performance boost for
large designs.
  • Loading branch information...
1 parent 4db4a46 commit 782c55f7b500a0736510b04d0d41ad2e56f66acd @steveicarus committed Dec 9, 2009
Showing with 163 additions and 88 deletions.
  1. +2 −2 link_const.cc
  2. +145 −77 net_link.cc
  3. +16 −9 netlist.h
View
@@ -34,7 +34,7 @@ bool Nexus::drivers_constant() const
if (driven_ != NO_GUESS)
return true;
- for (const Link*cur = list_ ; cur ; cur = cur->next_) {
+ for (const Link*cur = first_nlink() ; cur ; cur = cur->next_nlink()) {
const NetNet*sig;
Link::DIR cur_dir;
@@ -121,7 +121,7 @@ verinum::V Nexus::driven_value() const
verinum::V val = verinum::Vz;
- for (cur = list_ ; cur ; cur = cur->next_) {
+ for (cur = first_nlink() ; cur ; cur = cur->next_nlink()) {
const NetConst*obj;
const NetNet*sig;
Oops, something went wrong.

0 comments on commit 782c55f

Please sign in to comment.