Supress 2nd Wertetabelle if no hazard was found
This commit is contained in:
parent
1325c11caa
commit
e1614a62e6
3 changed files with 7 additions and 3 deletions
|
@ -47,6 +47,7 @@ void CellCollection::findHazards()
|
|||
printf("Hazard found! Cell %d <--> Cell %d\n", I, (*nc)->index);
|
||||
this->globalPIC->add(I, (*nc)->index); // add PI that solves hazard. Not quite smart...
|
||||
(*nc)->refresh(this->globalPIC); // refresh the foreign PIC (a PI was added)
|
||||
this->hazardsFound = true;
|
||||
}
|
||||
currentCell->refresh(this->globalPIC); // refresh the current PIC (a PI was added)
|
||||
delete hazardousNeighbors;
|
||||
|
|
|
@ -27,11 +27,13 @@ public:
|
|||
CellCollection(PrimImplikantCollection* &globalPIC)
|
||||
{
|
||||
this->init(globalPIC);
|
||||
this->hazardsFound = false;
|
||||
};
|
||||
|
||||
|
||||
vector<Cell*> cells;
|
||||
PrimImplikantCollection* globalPIC;
|
||||
bool hazardsFound;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -161,9 +161,10 @@ void user_main(void)
|
|||
// find and solve Hazards
|
||||
allCells->findHazards();
|
||||
|
||||
|
||||
// print Wertetabelle and KV of corrected data
|
||||
wt->Print();
|
||||
|
||||
if (allCells->hazardsFound)
|
||||
// print Wertetabelle and KV of corrected data
|
||||
wt->Print();
|
||||
|
||||
kv->Print(30 + kv->width() + 30, 30); // Diagramm neben dem vorherigen
|
||||
|
||||
|
|
Loading…
Reference in a new issue