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

eval_part_select_() has already normalized the base number so don't
do it again.
This commit is contained in:
Cary R 2011-03-02 18:16:48 -08:00 committed by Stephen Williams
parent 9d0e85afe1
commit b6223f39c9
1 changed files with 3 additions and 5 deletions

View File

@ -711,22 +711,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;