Browse files

Don't normalize the port base (lidx) twice.

eval_part_select_() has already normalized the base number so don't
do it again.
  • Loading branch information...
1 parent 5342958 commit 4a4a2eef137cfc1a1b7d3fda237c3eacb8b638f7 @caryr caryr committed with Mar 2, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 elab_net.cc
View
8 elab_net.cc
@@ -705,22 +705,20 @@ NetNet* PEIdent::elaborate_port(Design*des, NetScope*scope) const
switch (sig->port_type()) {
case NetNet::PINPUT:
- ps = new NetPartSelect(sig, sig->sb_to_idx(lidx), swid,
- NetPartSelect::PV);
+ ps = new NetPartSelect(sig, lidx, swid, NetPartSelect::PV);
connect(tmp->pin(0), ps->pin(0));
sig = tmp;
break;
case NetNet::POUTPUT:
- ps = new NetPartSelect(sig, sig->sb_to_idx(lidx), swid,
- NetPartSelect::VP);
+ ps = new NetPartSelect(sig, lidx, swid, NetPartSelect::VP);
connect(tmp->pin(0), ps->pin(0));
sig = tmp;
break;
case NetNet::PINOUT:
ps = new NetTran(scope, scope->local_symbol(), sig->vector_width(),
- swid, sig->sb_to_idx(lidx));
+ swid, lidx);
connect(sig->pin(0), ps->pin(0));
connect(tmp->pin(0), ps->pin(1));
sig = tmp;

0 comments on commit 4a4a2ee

Please sign in to comment.