From 5a765a7606da7c1bc2cd55d26b2981f69d301227 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 22 Aug 2021 17:01:46 -0700 Subject: [PATCH] cudd compilation Signed-off-by: James Cherry --- search/Sim.cc | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/search/Sim.cc b/search/Sim.cc index 69eda947..a5eaa61c 100644 --- a/search/Sim.cc +++ b/search/Sim.cc @@ -35,16 +35,19 @@ #if CUDD // https://davidkebo.com/cudd #include "cudd.h" -#endif // CUDD +#else +#define Cudd_Init(ignore1, ignore2, ignore3, ignore4, ignore5) nullptr +#define Cudd_Quit(ignore1) +#endif namespace sta { +static LogicValue +logicNot(LogicValue value); static Pin * findDrvrPin(const Pin *pin, Network *network); -#if CUDD - Sim::Sim(StaState *sta) : StaState(sta), observer_(nullptr), @@ -62,6 +65,8 @@ Sim::~Sim() Cudd_Quit(cudd_manager_); } +#if CUDD + TimingSense Sim::functionSense(const FuncExpr *expr, const Pin *input_pin, @@ -224,15 +229,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, LogicValue value2) @@ -319,20 +315,6 @@ senseXor(TimingSense sense1, return xor_sense[int(sense1)][int(sense2)]; } -Sim::Sim(StaState *sta) : - StaState(sta), - observer_(nullptr), - valid_(false), - incremental_(false), - const_func_pins_valid_(false) -{ -} - -Sim::~Sim() -{ - delete observer_; -} - TimingSense Sim::functionSense(const FuncExpr *expr, const Pin *input_pin, @@ -515,6 +497,15 @@ Sim::evalExpr(const FuncExpr *expr, #endif // 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)]; +} + void Sim::clear() {