Skip to content

Commit

Permalink
#94: fixed resetting of original et in constant optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-biasion committed Oct 31, 2024
1 parent bd3c2cb commit a27d457
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sxpat/xplore.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ def optimize_constants(specs_obj: Specifications, initial_error_threshold: int)

graph.extract_subgraph(specs_obj)

# save old state
old_extraction_mode = specs_obj.extraction_mode
# save original state
original_extraction_mode = specs_obj.extraction_mode
original_et = specs_obj.et
# set new state
specs_obj.use_constants = True
specs_obj.extraction_mode = -1
Expand Down Expand Up @@ -379,7 +380,8 @@ def optimize_constants(specs_obj: Specifications, initial_error_threshold: int)

# revert state
specs_obj.use_constants = False
specs_obj.extraction_mode = old_extraction_mode
specs_obj.extraction_mode = original_extraction_mode
specs_obj.et = original_et

return (verilog_filename, error_threshold)

Expand Down

0 comments on commit a27d457

Please sign in to comment.