Skip to content

Commit

Permalink
#95: fixed et update in .v file names
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-biasion committed Oct 18, 2024
1 parent 59bee0c commit 408692e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sxpat/synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ def get_num_models_from_json(self, json_obj: List[Dict]):

def set_path(self, this_path: Tuple[str, str], this_name: Optional[str] = None, id: int = 0):
if this_name is None:
# get data from name
data = NameData.from_filename(self.benchmark_name)

# updte root if origin
if data.is_origin:
data.root = '_'.join((
data.root,
Expand All @@ -180,6 +183,12 @@ def set_path(self, this_path: Tuple[str, str], this_name: Optional[str] = None,
f'imax{self.specs.imax}',
f'omax{self.specs.omax}',
))

# update et
ET_PATTERN = re.compile(r'_et\d+')
data.root = ET_PATTERN.sub(f'_et{self.specs.et}', data.root)

# generate successor path
this_name = str(data.get_successor(self.specs.iteration, id))

folder, extenstion = this_path
Expand Down

0 comments on commit 408692e

Please sign in to comment.