Skip to content

Commit

Permalink
create self_gen folder for cacti if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
JiacongSun committed Oct 6, 2023
1 parent b312d4e commit e6696dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zigzag/classes/hardware/architecture/get_cacti_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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()
exit()

0 comments on commit e6696dd

Please sign in to comment.