add files

This commit is contained in:
leeyunlong 2025-07-21 14:48:31 +08:00
parent d73d2e9c0d
commit bafb7a485e
4 changed files with 24 additions and 6 deletions

View File

@ -687,3 +687,4 @@ if __name__ == "__main__":
gen_reg_hdl(p_sheet,ModuleName) gen_reg_hdl(p_sheet,ModuleName)
gen_reg_cheader(p_sheet,ModuleName) gen_reg_cheader(p_sheet,ModuleName)
gen_reg_ralf(p_sheet,ModuleName) gen_reg_ralf(p_sheet,ModuleName)

View File

@ -24,8 +24,11 @@ tch 0.0736 CEB hold after CLK rising
tas 0.0927 A setup before CLK rising tas 0.0927 A setup before CLK rising
tah 0.0939 A hold after CLK rising tah 0.0939 A hold after CLK rising
tws 0.1108 WEB setup before CLK rising tws 0.1108 WEB setup before CLK rising
tbwh 0.0860 WEB hold after 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
================================================================================ ================================================================================

View File

@ -59,8 +59,19 @@ def extract_info(file_path):
error_msgs.append(f"Error: tcd OVER ({tcd_value}ns > 0.6ns)") error_msgs.append(f"Error: tcd OVER ({tcd_value}ns > 0.6ns)")
except ValueError: except ValueError:
pass 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(): def write_info():
output = [] output = []
@ -70,16 +81,19 @@ def write_info():
# 匹配目标文件模式 # 匹配目标文件模式
for ds_file in glob.glob(os.path.join(root, '*_ssgnp0p72v125c.ds')): for ds_file in glob.glob(os.path.join(root, '*_ssgnp0p72v125c.ds')):
print(f"Processing: {ds_file}") 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(f"======== {os.path.basename(ds_file)} ==========\n")
output.append("[Area Info]\n") output.append("[Area Info]\n")
output.extend(area) output.extend(area)
output.append("\n[Timing Info]\n") output.append("[Timing Info]\n")
output.extend(timing) output.extend(timing)
if error_msgs: if error_msgs:
output.append("\n")
print (f"Errors found in {ds_file}: {error_msgs}") print (f"Errors found in {ds_file}: {error_msgs}")
output.extend([msg + "\n" for msg in 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" + "="*80 + "\n")
output.append("\n") output.append("\n")

View File

@ -28,7 +28,7 @@ tch 0.0736 CEB hold after CLK rising
tas 0.0927 A setup before CLK rising tas 0.0927 A setup before CLK rising
tah 0.0939 A hold after CLK rising tah 0.0939 A hold after CLK rising
tws 0.1108 WEB setup before CLK rising tws 0.1108 WEB setup before CLK rising
tbwh 0.0860 WEB hold after CLK rising tbwh 0.0860 WEB hold after CLK rising
xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx
ddddddddddddddd ddddddddddddddd
xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx