Elaborate wide structoral bitwise OR.

This commit is contained in:
steve 1999-06-24 04:45:29 +00:00
parent 11b2b1740a
commit 1ec98ba7cf
1 changed files with 16 additions and 10 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: elaborate.cc,v 1.48 1999/06/24 04:24:18 steve Exp $" #ident "$Id: elaborate.cc,v 1.49 1999/06/24 04:45:29 steve Exp $"
#endif #endif
/* /*
@ -629,17 +629,20 @@ NetNet* PEBinary::elaborate_net(Design*des, const string&path) const
des->add_node(gate); des->add_node(gate);
break; break;
case '|': // OR case '|': // Bitwise OR
assert(lsig->pin_count() == 1); assert(lsig->pin_count() == rsig->pin_count());
assert(rsig->pin_count() == 1); osig = new NetNet(des->local_symbol(path), NetNet::WIRE,
gate = new NetLogic(des->local_symbol(path), 3, NetLogic::OR); lsig->pin_count());
connect(gate->pin(1), lsig->pin(0));
connect(gate->pin(2), rsig->pin(0));
osig = new NetNet(des->local_symbol(path), NetNet::WIRE);
osig->local_flag(true); osig->local_flag(true);
connect(gate->pin(0), osig->pin(0)); for (unsigned idx = 0 ; idx < lsig->pin_count() ; idx += 1) {
gate = new NetLogic(des->local_symbol(path), 3,
NetLogic::OR);
connect(gate->pin(1), lsig->pin(idx));
connect(gate->pin(2), rsig->pin(idx));
connect(gate->pin(0), osig->pin(idx));
des->add_node(gate);
}
des->add_signal(osig); des->add_signal(osig);
des->add_node(gate);
break; break;
case 'e': // == case 'e': // ==
@ -1638,6 +1641,9 @@ Design* elaborate(const map<string,Module*>&modules,
/* /*
* $Log: elaborate.cc,v $ * $Log: elaborate.cc,v $
* Revision 1.49 1999/06/24 04:45:29 steve
* Elaborate wide structoral bitwise OR.
*
* Revision 1.48 1999/06/24 04:24:18 steve * Revision 1.48 1999/06/24 04:24:18 steve
* Handle expression widths for EEE and NEE operators, * Handle expression widths for EEE and NEE operators,
* add named blocks and scope handling, * add named blocks and scope handling,