From 83ffcd193d885646484111451ecb4e68267d884d Mon Sep 17 00:00:00 2001 From: Ayaka Yorihiro Date: Sun, 17 Nov 2024 23:18:14 -0500 Subject: [PATCH] fix tiny bug --- tools/profiler/new-parse-vcd.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/profiler/new-parse-vcd.py b/tools/profiler/new-parse-vcd.py index 15d2b97ce..5e053a284 100644 --- a/tools/profiler/new-parse-vcd.py +++ b/tools/profiler/new-parse-vcd.py @@ -84,7 +84,7 @@ def is_active_at_cycle(self, i): # is the probe active at cycle i? return self.get_segment_active_at_cycle(i) != None def id(self): - return f"{self.name}_{self.component}" + return f"{self.name}{DELIMITER}{self.component}" class VCDConverter(vcdvcd.StreamParserCallbacks): def __init__(self, main_component, cells_to_components): @@ -389,6 +389,11 @@ def create_traces(active_element_probes_info, call_stack_probes_info, cell_calle return new_timeline_map def create_output(timeline_map, out_dir): + + all_stacks = set() + + + # shutil.rmtree(out_dir) os.mkdir(out_dir) for i in timeline_map: @@ -401,9 +406,6 @@ def create_output(timeline_map, out_dir): for stack_elem in stack[0:-1]: acc += f'"{stack_elem}" -> ' acc += f'"{stack[-1]}" ;\n' - # for stack_elem in stack[0:-1]: - # acc += stack_elem.shortname + " -> " - # acc += stack[-1].shortname + ";\n" f.write(acc) f.write("}") @@ -429,8 +431,6 @@ def main(vcd_filename, cells_json_file, out_dir): vcdvcd.VCDVCD(vcd_filename, callbacks=converter) converter.postprocess() - print(cells_to_components) - print("Active groups info: " + str(converter.active_elements_info.keys())) print() print("Call stack info: " + str(converter.call_stack_probe_info))