Skip to content
Snippets Groups Projects
Commit de642492 authored by dam1n19's avatar dam1n19
Browse files

SOC1-205: Added exclusions options to filelist compile to remove filelists...

SOC1-205: Added exclusions options to filelist compile to remove filelists including specific arm IP
parent fa8ca0c8
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@ import os
verilog_extensions = (".v", ".sv")
filelist_exclusions = ["cortex","dma"]
filelist_header = """//-----------------------------------------------------------------------------
// AUTOGENERATED: Compiled Filelist
// A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
......@@ -51,14 +53,16 @@ def read_list(filelist):
for line in filelines:
# Remove whitespace and split line into arguments
line_list = line.strip().split()
# print(line_list)
# Check Line isn't a comment
if not line_list[0].startswith("//"):
# If line is a reference to another filelist
if line_list[0] == "-f":
# Recursively call this function and append list to this compiled Filelist
print(line_list[1])
compiled_filelist += read_list(env_var_substitute(line_list[1]))
if any(ext in line_list[1] for ext in filelist_exclusions) and args.exclude == True:
print(line_list[1]+" is in the exclusions list")
else:
print(line_list[1])
compiled_filelist += read_list(env_var_substitute(line_list[1]))
elif line_list[0] == "-y":
# Append to filelist
......@@ -100,5 +104,6 @@ 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("-e", "--exclude", action='store_true', help="Exclude filists including these strings")
args = parser.parse_args()
filelist_compile(args)
\ No newline at end of file
......@@ -26,5 +26,5 @@ gen_html:
@mkdir -p $(OUT_DIR)/build
@(cd $(OUT_DIR)/build; \
rm *.html; rm *.gif; \
$(SOCTOOLS_FLOW_DIR)/bin/htmlgen/filelist_compile.py -f $(FILELIST) -o $(OUTPUT_FILELIST) ; \
$(SOCTOOLS_FLOW_DIR)/bin/filelist_compile.py -e -f $(FILELIST) -o $(OUTPUT_FILELIST) ; \
$(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