From 93edf21c102f6267d34c0ff6b5175104b3354902 Mon Sep 17 00:00:00 2001
From: dam1n19 <dam1n19@soton.ac.uk>
Date: Wed, 17 May 2023 12:04:28 +0100
Subject: [PATCH] SOC1-207: Added comments to filelist compile script

---
 bin/filelist_compile.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/filelist_compile.py b/bin/filelist_compile.py
index 454e619..0aa21c4 100755
--- a/bin/filelist_compile.py
+++ b/bin/filelist_compile.py
@@ -12,8 +12,10 @@
 import argparse
 import os
 
-verilog_extensions = (".v", ".sv")
+# Files with these extensions are included in compiled filelists
+verilog_extensions = (".v", ".sv", ".vh")
 
+# Exclude paths including these strings
 filelist_exclusions = ["cortex","dma"]
 
 filelist_header = """//-----------------------------------------------------------------------------
@@ -89,12 +91,15 @@ def filelist_compile(args):
     print("------------------")
     print("Compiling Filelist")
     print("------------------")
+    # Read in filelist and add newlines to paths
     filelist = read_list(input_filelist)
     filelist = [x+"\n" for x in filelist]
+    # Create string of all paths to write out
     filelist_str = filelist_header
     for path in filelist: filelist_str += path
     print("Compile Done")
     print("------------------")
+    # Write out output filelist
     f_outlist = open(output_filelist, "w")
     f_outlist.write(filelist_str)
     f_outlist.close()
-- 
GitLab