diff --git a/bin/filelist_compile.py b/bin/filelist_compile.py index d6381dea1ae608427e38c36a9d9bb346c48a6d37..49f967f6d735298d09f707aa2ef2a8911a83b2f6 100755 --- a/bin/filelist_compile.py +++ b/bin/filelist_compile.py @@ -13,7 +13,7 @@ import argparse import os # Files with these extensions are included in compiled filelists -verilog_extensions = (".v", ".sv", ".vh") +verilog_extensions = (".v", ".sv", ".vh",".vams") # Exclude paths including these strings filelist_exclusions = ["cortex","pl230"] @@ -53,12 +53,24 @@ def env_var_substitute(path, tcl=False, synthesis=False): sub_path = os.path.expandvars(sub_path) return sub_path +def append_includes(filelines, includes): + for inc in includes: + if inc != "": + print("-f " + inc) + filelines.append("-f "+inc) + return filelines + def read_list(filelist, first, incdirs, args): # Create Filelist List Structure compiled_filelist = [] # Open Filelist and Read Lines f = open(filelist, "r") filelines = f.readlines() + + if first: + includes = args.include + if includes != None: + filelines = append_includes(filelines, includes) f.close() hdl_files = [] # Remove Black Lines from list @@ -78,7 +90,7 @@ def read_list(filelist, first, incdirs, args): pass else: # print(line_list[1]) - temp_list, first, incdirs = read_list(env_var_substitute(line_list[1]), first, incdirs, args) + temp_list, first, incdirs = read_list(env_var_substitute(line_list[1]), False, incdirs, args) compiled_filelist += temp_list elif line_list[0] == "-y": @@ -206,7 +218,7 @@ def read_list(filelist, first, incdirs, args): else: compiled_filelist.append("VERILOG_SOURCES += " + str(line_list[0])) else: - if (line_list[0].endswith(".v") or (line_list[0].endswith(".sv") and (args.html == False))): + if (line_list[0].endswith(".v") or line_list[0].endswith(".vams") or (line_list[0].endswith(".sv") and (args.html == False))): if args.absolute == True: compiled_filelist.append(env_var_substitute(line_list[0])) else: @@ -284,6 +296,9 @@ def filelist_compile(args): input_filelist = args.filelist output_filelist = args.output print("Compiling Filelist") + if args.include is not None: + for inc in args.include: + print("Including: " + inc) incdirs = [] # Read in filelist and add newlines to paths filelist, first, incdirs = read_list(input_filelist, True, incdirs, args) @@ -307,6 +322,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Compiles Filelist to Read') parser.add_argument("-f", "--filelist", type=str, help="Input Filelist to Read") parser.add_argument("-o", "--output", type=str, help="Output Filelist location") + parser.add_argument("-i", "--include",nargs='*', type=str, help="Include extra flist files") parser.add_argument("-e", "--exclude", action='store_true', help="Exclude filists including these strings") parser.add_argument("-t", "--tcl", action='store_true', help="Generate a TCL Script") parser.add_argument("-g", "--genus", action = 'store_true', help="Generate TCL script for genus") diff --git a/tools/socsim b/tools/socsim index 9c7fbf5c22798f54f81db07872ea5d839b6af65f..8ff2ab5e80205a8e88e92282cb98b984e9191158 100755 --- a/tools/socsim +++ b/tools/socsim @@ -43,5 +43,5 @@ else simscript=$(find ${SOCLABS_SOCSIM_PATH//:/\ } -name "${1}.sh") # Run Script if Found - $simscript $@ + $simscript $@ SIM=${3} fi \ No newline at end of file