From e6696dd6551f772a740cfd8b49001cff91e9707b Mon Sep 17 00:00:00 2001 From: JiacongSun Date: Fri, 6 Oct 2023 17:39:27 +0200 Subject: [PATCH] create self_gen folder for cacti if it does not exist --- zigzag/classes/hardware/architecture/get_cacti_cost.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zigzag/classes/hardware/architecture/get_cacti_cost.py b/zigzag/classes/hardware/architecture/get_cacti_cost.py index 95f567f..2c36991 100644 --- a/zigzag/classes/hardware/architecture/get_cacti_cost.py +++ b/zigzag/classes/hardware/architecture/get_cacti_cost.py @@ -449,6 +449,7 @@ def get_cacti_cost(cacti_path, tech_node, mem_type, mem_size_in_byte, bw, hd_has mem_size_in_byte_adjust = mem_size_in_byte file_path = './self_gen' # location for input file (cache.cfg) and output file (cache.cfg.out) + os.makedirs(file_path, exist_ok=True) # clear target folder # if system == 'Linux': @@ -552,4 +553,4 @@ def get_w_cost_per_weight_from_cacti(cacti_path, tech_param, hd_param, dimension rows = mem_size*8/bw access_time, area, r_cost, w_cost = get_cacti_cost(cacti_path = '../../cacti/cacti_master', tech_node = 0.028, mem_type = 'sram', mem_size_in_byte = mem_size, bw = bw) print(f'access time (ns): {access_time}, area (mm2): {area}, r_cost (pJ)/bit: {r_cost*1000/bw}, w_cost (pJ)/bit: {w_cost*1000/bw}') - exit() \ No newline at end of file + exit()