modify note
This commit is contained in:
parent
46885906bd
commit
5fe83fc4e8
|
@ -67,8 +67,7 @@ def generate_files(xls_path, sheet_name=None):
|
|||
if not row[col_map['name']] or not row[col_map['AssemblyWidth']] or not row[col_map['AssemblyDepth']]:
|
||||
print(f"[Warning] Missing required data in row {row_idx}, skipping.")
|
||||
continue
|
||||
# is Assembly or not
|
||||
print(f"[Note:Assembly] AssemblyDepth is {row[col_map['AssemblyDepth']]} and AssemblyWidth is {row[col_map['AssemblyWidth']]} in row {row_idx}, skipping.")
|
||||
# generate sram wrap
|
||||
if int(row[col_map['AssemblyDepth']]) + int(row[col_map['AssemblyWidth']]) == 2:
|
||||
if row[col_map['port']] == 'SP':
|
||||
sram_port = 'SRAM_SP'
|
||||
|
@ -84,7 +83,7 @@ def generate_files(xls_path, sheet_name=None):
|
|||
sram_port = 'SRAM_TP'
|
||||
template_file = "template_sram_tp_wrap_asmbly.v"
|
||||
|
||||
print(f"Generating {sram_port} wrapper for: {row[col_map['name']]}")
|
||||
print(f"Generated {sram_port} wrapper for: {row[col_map['name']]}")
|
||||
# 调用生成函数
|
||||
generate_sram_wrapper(
|
||||
# input file_path
|
||||
|
@ -99,34 +98,18 @@ def generate_files(xls_path, sheet_name=None):
|
|||
compile_width = int(row[col_map['CompileWidth']]),
|
||||
output_dir = output_dir
|
||||
)
|
||||
## sp or tp
|
||||
#if row[col_map['port']] == 'SP':
|
||||
# print(f"Generating SRAM_SP wrapper for: {row[col_map['name']]}")
|
||||
# # 调用生成函数
|
||||
# generate_sram_wrapper(
|
||||
# # input file_path
|
||||
# template_file = 'template_sram_sp_wrap.v',
|
||||
# sram_name = row[col_map['name']],
|
||||
# width = int(row[col_map['width']]),
|
||||
# depth = int(row[col_map['depth']]),
|
||||
# ref_name = row[col_map['ref']],
|
||||
# output_dir = output_dir
|
||||
# )
|
||||
|
||||
# scan the all files of the directory/ to be inclued into xxx.lst
|
||||
lst_path = os.path.join(output_dir, f"{output_dir}.lst")
|
||||
# # 获取目录中所有.v文件k按字母顺序排序)
|
||||
# v_files = [f for f in os.listdir(output_dir) if f.endswith('.v')]
|
||||
# 获取目录中所有.v文件并添加路径前缀
|
||||
v_files = [f"$PROJ_ROOT/rtl/common/mem/{output_dir}/{f}"
|
||||
for f in os.listdir(output_dir)
|
||||
if f.endswith('.v')]
|
||||
with open(lst_path, 'w') as f:
|
||||
f.write('\n'.join(sorted(v_files)))
|
||||
|
||||
#elif row[col_map['port']] == 'TP':
|
||||
# print(f"Generating SRAM_TP wrapper for: {row[col_map['name']]} (TP)")
|
||||
# # 调用生成函数
|
||||
# generate_sram_wrapper(
|
||||
# template_file = 'template_sram_tp_wrap.v',
|
||||
# sram_name = row[col_map['name']],
|
||||
# width = int(row[col_map['width']]),
|
||||
# depth = int(row[col_map['depth']]),
|
||||
# ref_name = row[col_map['ref']],
|
||||
# output_dir = output_dir
|
||||
# )
|
||||
#else:
|
||||
# print(f"[Warning] Unknown port type '{row[col_map['port']]}' in row {row_idx}, skipping.")
|
||||
# continue
|
||||
|
||||
|
||||
def generate_sram_wrapper(template_file, sram_name, width, depth, ref_name,\
|
||||
|
|
Loading…
Reference in New Issue