add files
This commit is contained in:
parent
d73d2e9c0d
commit
bafb7a485e
|
@ -687,3 +687,4 @@ if __name__ == "__main__":
|
|||
gen_reg_hdl(p_sheet,ModuleName)
|
||||
gen_reg_cheader(p_sheet,ModuleName)
|
||||
gen_reg_ralf(p_sheet,ModuleName)
|
||||
|
||||
|
|
|
@ -25,7 +25,10 @@ tas 0.0927 A setup before CLK rising
|
|||
tah 0.0939 A hold after CLK rising
|
||||
tws 0.1108 WEB setup before CLK rising
|
||||
tbwh 0.0860 WEB hold after CLK rising
|
||||
Error: tcycÖµ³¬±ê (0.9469ns > 0.8ns)
|
||||
Error: tcyc OVER (0.9469ns > 0.8ns)
|
||||
|
||||
[Conclusion]
|
||||
Area: 19006.4743 tcyc: 0.9469 tcd: 0.5055
|
||||
|
||||
================================================================================
|
||||
|
||||
|
|
|
@ -59,8 +59,19 @@ def extract_info(file_path):
|
|||
error_msgs.append(f"Error: tcd OVER ({tcd_value}ns > 0.6ns)")
|
||||
except ValueError:
|
||||
pass
|
||||
# get the area value
|
||||
area_value = 'N/A'
|
||||
if len(area_info) >= 4:
|
||||
area_line = area_info[3].strip().split()
|
||||
if len(area_line) >= 3:
|
||||
area_value = area_line[2]
|
||||
|
||||
return area_info, sram_timing, error_msgs
|
||||
tcyc_str = f"{tcyc_value:.4f}" if tcyc_value else "N/A"
|
||||
tcd_str = f"{tcd_value:.4f}" if tcd_value else "N/A"
|
||||
conclusion = f"[Conclusion]\nArea: {area_value} tcyc: {tcyc_str} tcd: {tcd_str}"
|
||||
|
||||
|
||||
return area_info, sram_timing, error_msgs, conclusion
|
||||
|
||||
def write_info():
|
||||
output = []
|
||||
|
@ -70,16 +81,19 @@ def write_info():
|
|||
# 匹配目标文件模式
|
||||
for ds_file in glob.glob(os.path.join(root, '*_ssgnp0p72v125c.ds')):
|
||||
print(f"Processing: {ds_file}")
|
||||
area, timing, error_msgs = extract_info(ds_file)
|
||||
area, timing, error_msgs, conclusion = extract_info(ds_file)
|
||||
|
||||
output.append(f"======== {os.path.basename(ds_file)} ==========\n")
|
||||
output.append("[Area Info]\n")
|
||||
output.extend(area)
|
||||
output.append("\n[Timing Info]\n")
|
||||
output.append("[Timing Info]\n")
|
||||
output.extend(timing)
|
||||
if error_msgs:
|
||||
output.append("\n")
|
||||
print (f"Errors found in {ds_file}: {error_msgs}")
|
||||
output.extend([msg + "\n" for msg in error_msgs])
|
||||
output.append("\n")
|
||||
output.append(conclusion + "\n")
|
||||
output.append("\n" + "="*80 + "\n")
|
||||
output.append("\n")
|
||||
|
||||
|
|
Loading…
Reference in New Issue