Skip to content
Snippets Groups Projects
Commit eb193b3a authored by dwf1m12's avatar dwf1m12
Browse files

add -n/--html switch flist to strip .sv files from flist compile to suppress...

add -n/--html switch flist to strip .sv files from flist compile to suppress errors in html_gen flow
parent 1f17b470
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,8 @@ def read_list(filelist, first, incdirs, args): ...@@ -115,7 +115,8 @@ def read_list(filelist, first, incdirs, args):
else: else:
compiled_filelist.append("read_verilog " + str(env_var_substitute(line_list[1], tcl=True)).replace("$","$env")+"/"+str(file)) compiled_filelist.append("read_verilog " + str(env_var_substitute(line_list[1], tcl=True)).replace("$","$env")+"/"+str(file))
else: else:
compiled_filelist.append(line_list[1]+"/"+str(file)) if (file.endswith(".v") or (file.endswith(".sv") and (args.html == False))):
compiled_filelist.append(line_list[1]+"/"+str(file))
elif line_list[0].startswith("+incdir+"): elif line_list[0].startswith("+incdir+"):
# Append to filelist # Append to filelist
...@@ -172,7 +173,7 @@ def read_list(filelist, first, incdirs, args): ...@@ -172,7 +173,7 @@ def read_list(filelist, first, incdirs, args):
##elif args.makefile == False: ##elif args.makefile == False:
elif ((args.makefile == False) and (args.vfiles == False)): elif ((args.makefile == False) and (args.vfiles == False)):
for file in os.listdir(env_var_substitute(line_list[0].lstrip("+incdir+"))): for file in os.listdir(env_var_substitute(line_list[0].lstrip("+incdir+"))):
if file.endswith(verilog_extensions): if (file.endswith(".v") or (file.endswith(".sv") and (args.html == False))):
# Append to filelist # Append to filelist
if args.absolute == True: if args.absolute == True:
compiled_filelist.append(env_var_substitute(line_list[0].lstrip("+incdir+"))+"/"+str(file)) compiled_filelist.append(env_var_substitute(line_list[0].lstrip("+incdir+"))+"/"+str(file))
...@@ -199,10 +200,11 @@ def read_list(filelist, first, incdirs, args): ...@@ -199,10 +200,11 @@ def read_list(filelist, first, incdirs, args):
else: else:
compiled_filelist.append("VERILOG_SOURCES += " + str(line_list[0])) compiled_filelist.append("VERILOG_SOURCES += " + str(line_list[0]))
else: else:
if args.absolute == True: if (line_list[0].endswith(".v") or (line_list[0].endswith(".sv") and (args.html == False))):
compiled_filelist.append(env_var_substitute(line_list[0])) if args.absolute == True:
else: compiled_filelist.append(env_var_substitute(line_list[0]))
compiled_filelist.append(line_list[0]) else:
compiled_filelist.append(line_list[0])
if len(hdl_files) > 0: if len(hdl_files) > 0:
# temp_str = 'add_files -norecurse -scan_for_includes "' # temp_str = 'add_files -norecurse -scan_for_includes "'
if args.genus == True: if args.genus == True:
...@@ -294,6 +296,7 @@ if __name__ == "__main__": ...@@ -294,6 +296,7 @@ if __name__ == "__main__":
parser.add_argument("-m", "--makefile", action='store_true', help="Generate a Makefile RTL Sources File") parser.add_argument("-m", "--makefile", action='store_true', help="Generate a Makefile RTL Sources File")
parser.add_argument("-a", "--absolute", action='store_true', help="Substitute environment Variables with Absolute Path") parser.add_argument("-a", "--absolute", action='store_true', help="Substitute environment Variables with Absolute Path")
parser.add_argument("-v", "--vfiles", action='store_true', help="Generate a vc filelist") parser.add_argument("-v", "--vfiles", action='store_true', help="Generate a vc filelist")
parser.add_argument("-n", "--html", action='store_true', help="No '.sv' - strip files as HTML wont render")
parser.add_argument("-r", "--rtldir", type=str, help="Directory where RTL Source will be copied to in TCL mode") parser.add_argument("-r", "--rtldir", type=str, help="Directory where RTL Source will be copied to in TCL mode")
parser.add_argument('-d', '--defines', nargs='+', default=[]) parser.add_argument('-d', '--defines', nargs='+', default=[])
args = parser.parse_args() args = parser.parse_args()
......
...@@ -27,7 +27,8 @@ gen_html: ...@@ -27,7 +27,8 @@ gen_html:
@echo Output Directory is $(OUT_DIR)/build @echo Output Directory is $(OUT_DIR)/build
@echo Filelist is $(FILELIST) @echo Filelist is $(FILELIST)
$(MAKE) -C $(SOCLABS_NANOSOC_TECH_DIR) gen_defs $(MAKE) -C $(SOCLABS_NANOSOC_TECH_DIR) gen_defs
$(MAKE) -C $(SOCLABS_NANOSOC_TECH_DIR) bootrom
@(cd $(OUT_DIR)/build; \ @(cd $(OUT_DIR)/build; \
rm *.html; rm *.gif; \ rm *.html; rm *.gif; \
$(SOCLABS_SOCTOOLS_FLOW_DIR)/bin/filelist_compile.py -ea -f $(FILELIST) -o $(OUTPUT_FILELIST) ; \ $(SOCLABS_SOCTOOLS_FLOW_DIR)/bin/filelist_compile.py -eanv -f $(FILELIST) -o $(OUTPUT_FILELIST) ; \
$(SOCLABS_SOCTOOLS_FLOW_DIR)/bin/htmlgen/v2html/v2html -f $(OUTPUT_FILELIST) -ht $(TOP_MODULE) ; ) $(SOCLABS_SOCTOOLS_FLOW_DIR)/bin/htmlgen/v2html/v2html -f $(OUTPUT_FILELIST) -ht $(TOP_MODULE) ; )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment