Skip to content

Commit

Permalink
fix tiny bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakayorihiro committed Nov 18, 2024
1 parent 7c118ea commit 83ffcd1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/profiler/new-parse-vcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand All @@ -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("}")

Expand All @@ -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))
Expand Down

0 comments on commit 83ffcd1

Please sign in to comment.