def main(): parser = argparse.ArgumentParser(description='verilog hierarchy printer') parser.add_argument('path', help='rtl directory') parser.add_argument('--top', help='top module name') parser.add_argument('--output', help='output file. stdout if not defined') args = parser.parse_args() modules = parse_dir(args.path) html = print_html(modules, args.top) if args.output: with open(args.output, 'w') as f: f.write(html) f.close() else: print(html) pass
log_dir = '../results/delay_logs/' log_prefix = 'delay' xs = ('Workers', ['w1', 'w2', 'w4', 'w6']) ys = ('Delays', ['d0', 'd10', 'd35', 'd140', 'd500']) replications = 5 # Per w - delay time_per_epoch = list() time_per_epoch_std = list() final_acc = list() for worker in xs[1]: directory = f"{baseline_log_dir}{baseline_log_prefix}-{worker}-d0" print(directory) df = parse_dir(directory) # Compute average time per epoch # Compute end accuracy avg, std = avg_time_per_epoch(df) acc = final_accuracy(df) time_per_epoch.extend(avg) time_per_epoch_std.extend(std) final_acc.extend(acc) for delay in ys[1][1:]: directory = f"{log_dir}{log_prefix}-{worker}-{delay}" df = parse_dir(directory) # Compute average time per epoch # Compute end accuracy