From 104e17f7be8840fe62e3cb607ca0a154c47121ee Mon Sep 17 00:00:00 2001
From: David Mapstone <david@mapstone.me>
Date: Thu, 16 Mar 2023 11:16:02 +0000
Subject: [PATCH] SOC1-121: Updated Top Repo with SoCSim submodule

---
 .gitignore          |  2 ++
 .gitmodules         |  3 +++
 accelerator-wrapper |  2 +-
 flow/socsim         | 11 ++++++++++-
 sha-2-accelerator   |  2 +-
 socsim              |  1 +
 6 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 .gitignore
 create mode 160000 socsim

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ec1bff
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.vcd
+*.vvp
\ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
index 1dd1e0d..13b7191 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -7,3 +7,6 @@
 [submodule "nanosoc"]
 	path = nanosoc
 	url = git@git.soton.ac.uk:soclabs/nanosoc.git
+[submodule "socsim"]
+	path = socsim
+	url = git@git.soton.ac.uk:soclabs/socsim.git
diff --git a/accelerator-wrapper b/accelerator-wrapper
index 341995f..a51ddde 160000
--- a/accelerator-wrapper
+++ b/accelerator-wrapper
@@ -1 +1 @@
-Subproject commit 341995f2792589d454d2a7f026a1158e4ba0f063
+Subproject commit a51dddead317f88afdf266458383501d96429ae3
diff --git a/flow/socsim b/flow/socsim
index 4b2d7f1..5b56393 100755
--- a/flow/socsim
+++ b/flow/socsim
@@ -15,4 +15,13 @@ DEFAULT_SIMULATOR="ivlog"
 if [[ -z "${SIMULATOR}" ]]; then 
     SIMULATOR=$DEFAULT_SIMULATOR
 fi
-$SOC_TOP_DIR"/flow/simulators/"$SIMULATOR"_sim.sh" $@
+# $SOC_TOP_DIR"/flow/simulators/"$SIMULATOR"_sim.sh" $@
+
+for d in $SOC_TOP_DIR/* ; do
+    if [ -f "$d/.git" ]; then
+        if [ -f "$d/simulate/socsim/$1.sh" ]; then
+        # If .git file exists - submodule
+            bash $d/simulate/socsim/$1.sh
+        fi
+    fi
+done
\ No newline at end of file
diff --git a/sha-2-accelerator b/sha-2-accelerator
index 2899c7d..1dd9a82 160000
--- a/sha-2-accelerator
+++ b/sha-2-accelerator
@@ -1 +1 @@
-Subproject commit 2899c7d990cf38184c54a18ba38cc59f2cf037ac
+Subproject commit 1dd9a82ce6170d363933240053894e8f84928e55
diff --git a/socsim b/socsim
new file mode 160000
index 0000000..55fae46
--- /dev/null
+++ b/socsim
@@ -0,0 +1 @@
+Subproject commit 55fae46b24cd1ec6e93347e553ad3d5e88fc0064
-- 
GitLab