From 408692e943b575a8ccdfebc2e5bc53ce85f50869 Mon Sep 17 00:00:00 2001 From: Marco Biasion Date: Fri, 18 Oct 2024 15:47:01 +0200 Subject: [PATCH] #95: fixed et update in .v file names --- sxpat/synthesis.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sxpat/synthesis.py b/sxpat/synthesis.py index 81eb828f0..11b50045f 100644 --- a/sxpat/synthesis.py +++ b/sxpat/synthesis.py @@ -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, @@ -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