Commit 9a0a4393 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

extract_act_inputs_clocks: Huge improvement: better algo

parent 3b5d0c63
...@@ -228,14 +228,14 @@ class RawSolution(object): ...@@ -228,14 +228,14 @@ class RawSolution(object):
""" """
extract active __inputs and clocks from a state vector extract active __inputs and clocks from a state vector
""" """
out = []
for s_varcode in s_vector: inputs = frozenset(self.__unfolder.get_inputs())
cond1 = s_varcode in self.__unfolder.get_inputs() free_clocks = frozenset(self.__unfolder.get_free_clocks())
cond2 = s_varcode in self.__unfolder.get_free_clocks()
if cond1 or cond2: return [s_varcode for s_varcode in s_vector
if s_varcode > 0: if (s_varcode > 0)
out.append(s_varcode) and ((s_varcode in inputs)
return out or (s_varcode in free_clocks))]
def extract_act_input_clock_seq(self): def extract_act_input_clock_seq(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment