Add user interface to pin virtualization

Flag is DISABLE_VIRTUAL_PINS.  Try to give a helpful hint for
how to work around any problems our regression testing might
have missed.
This commit is contained in:
Larry Doolittle 2009-03-07 13:30:54 -08:00 committed by Stephen Williams
parent f344515e38
commit 67381431ed
2 changed files with 8 additions and 0 deletions

View File

@ -714,6 +714,9 @@ int main(int argc, char*argv[])
cout << endl << "PARSING INPUT" << endl;
}
const char *flag_dvp = flags["DISABLE_VIRTUAL_PINS"];
if (flag_dvp) disable_virtual_pins = strcmp(flag_dvp,"true")==0;
/* Parse the input. Make the pform. */
int rc = pform_parse(argv[optind]);

View File

@ -226,6 +226,11 @@ Link& NetPins::pin(unsigned idx)
const Link& NetPins::pin(unsigned idx) const
{
if (!pins_ && !disable_virtual_pins) {
cerr << get_fileline() << ": internal error: pin is unexpectedly"
" virtual, try again with -pDISABLE_VIRTUAL_PINS=true" << endl;
assert(NULL);
}
assert(pins_);
assert(idx < npins_);
assert(idx == 0? pins_[0].pin_zero_ : pins_[idx].pin_==idx);