diff --git a/accelergy_table_based_plug_ins/console.py b/accelergy_table_based_plug_ins/console.py index e84743a..ce8ddad 100644 --- a/accelergy_table_based_plug_ins/console.py +++ b/accelergy_table_based_plug_ins/console.py @@ -24,7 +24,19 @@ def main(): config_content['table_plug_ins'] = {'roots': [table_estimator_path]} if new_root is not None: - config_content['table_plug_ins']['roots'].append(new_root) + if os.path.isabs(new_root): + if new_root not in config_content['table_plug_ins']['roots']: + config_content['table_plug_ins']['roots'].append(new_root) + print(new_root, "is added as a new root for table based plug-in.") + else: + print(new_root, "is already added as a root for table based plug-in") + else: + root_to_add = os.path.join(os.getcwd(), new_root) + if root_to_add not in config_content['table_plug_ins']['roots']: + config_content['table_plug_ins']['roots'].append(root_to_add) + print(root_to_add, "is added as a new root for table based plug-in.") + else: + print(root_to_add, "is already added as a root for table based plug-in") config_file = open(accelergy_config_file_path, 'w') config_file.write(yaml.dump(config_content, Dumper=yaml.SafeDumper)) diff --git a/set_of_table_templates/data/intmergertree.csv b/set_of_table_templates/data/intmergertree.csv new file mode 100644 index 0000000..8c9b427 --- /dev/null +++ b/set_of_table_templates/data/intmergertree.csv @@ -0,0 +1,20 @@ +technology,latency,mergeradix,datawidth,action,energy,area +45nm,0.396042ns,2,8,merger_random,0,581.3544 +45nm,0.396083ns,4,8,merger_random,0,1174.6218 +45nm,0.396054ns,8,8,merger_random,0,2286.3935 +45nm,0.396063ns,16,8,merger_random,0,4531.9218 +45nm,0.396104ns,32,8,merger_random,0,8930.2014 +45nm,0.396065ns,64,8,merger_random,0,17637.5936 +45nm,0.396008ns,128,8,merger_random,0,35271.866 +45nm,0.396045ns,2,16,merger_random,0,1022.9296 +45nm,0.396049ns,4,16,merger_random,0,2055.9672 +45nm,0.396043ns,8,16,merger_random,0,4109.985 +45nm,0.396055ns,16,16,merger_random,0,8153.546 +45nm,0.396067ns,32,16,merger_random,0,16126.231 +45nm,0.396075ns,64,16,merger_random,0,32261.2704 +45nm,0.396059ns,2,32,merger_random,0,1799.2962 +45nm,0.396061ns,4,32,merger_random,0,3654.4752 +45nm,0.396052ns,8,32,merger_random,0,7326.0618 +45nm,0.396064ns,16,32,merger_random,0,14645.9505 +45nm,0.396154ns,32,32,merger_random,0,28851.5171 +45nm,0,64,32,merger_random,0,58170.0238