mirror of https://github.com/YosysHQ/abc.git
New function to retrieve polarity value of a variable.
This commit is contained in:
parent
ac409b3152
commit
3f0cb6318b
|
|
@ -195,7 +195,7 @@ static inline unsigned solver_decide(solver_t *s)
|
|||
if (solver_has_marks(s) && !var_mark(s, next_var))
|
||||
next_var = UNDEF;
|
||||
}
|
||||
return var2lit(next_var, vec_char_at(s->polarity, next_var));
|
||||
return var2lit(next_var, var_polarity(s, next_var));
|
||||
}
|
||||
|
||||
static inline void solver_new_decision(solver_t *s, unsigned lit)
|
||||
|
|
|
|||
|
|
@ -132,6 +132,11 @@ static inline char var_value(solver_t *s, unsigned var)
|
|||
return vec_char_at(s->assigns, var);
|
||||
}
|
||||
|
||||
static inline char var_polarity(solver_t *s, unsigned var)
|
||||
{
|
||||
return vec_char_at(s->polarity, var);
|
||||
}
|
||||
|
||||
static inline unsigned var_dlevel(solver_t *s, unsigned var)
|
||||
{
|
||||
return vec_uint_at(s->levels, var);
|
||||
|
|
|
|||
Loading…
Reference in New Issue