Closed just22 closed 2 years ago
Greetings,
The code doesn't compile anymore when -DUSE_CUDD is passed to cmake.
The problem seems that in search/Sim.cc the function logicNot, defined within the #if CUDD #else branch, is then used outside too, in Sim::evalInstance.
search/Sim.cc
logicNot
#if CUDD
#else
Sim::evalInstance
Would the following patch be acceptable?
Index: search/Sim.cc --- search/Sim.cc.orig +++ search/Sim.cc @@ -43,6 +43,15 @@ static Pin * findDrvrPin(const Pin *pin, Network *network); +static LogicValue +logicNot(LogicValue value) +{ + static LogicValue logic_not[5] = {LogicValue::one, LogicValue::zero, + LogicValue::unknown, LogicValue::unknown, + LogicValue::unknown}; + return logic_not[int(value)]; +} + #if CUDD Sim::Sim(StaState *sta) : @@ -223,15 +232,6 @@ Sim::ensureNode(LibertyPort *port) const #else // No CUDD. - -static LogicValue -logicNot(LogicValue value) -{ - static LogicValue logic_not[5] = {LogicValue::one, LogicValue::zero, - LogicValue::unknown, LogicValue::unknown, - LogicValue::unknown}; - return logic_not[int(value)]; -} static LogicValue logicOr(LogicValue value1,
-- Alessandro
yes, that would work but I decided to clean up some other things so it should work now
Greetings,
The code doesn't compile anymore when -DUSE_CUDD is passed to cmake.
The problem seems that in
search/Sim.cc
the functionlogicNot
, defined within the#if CUDD
#else
branch, is then used outside too, inSim::evalInstance
.Would the following patch be acceptable?
-- Alessandro