From d66553e313578cb15443899a330d890c6b26a12b Mon Sep 17 00:00:00 2001
From: Daniel Newbrook <dwn1c21@soton.ac.uk>
Date: Wed, 3 Jul 2024 09:06:05 +0100
Subject: [PATCH] Move nanosoc.config to top level project

---
 nanosoc.config | 31 +++++++++++++++++++++++++++++++
 nanosoc_tech   |  2 +-
 set_env.sh     |  4 +++-
 3 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 nanosoc.config

diff --git a/nanosoc.config b/nanosoc.config
new file mode 100644
index 0000000..f28efad
--- /dev/null
+++ b/nanosoc.config
@@ -0,0 +1,31 @@
+#-----------------------------------------------------------------------------
+# NanoSoC Configuration file
+# A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
+#
+# Copyright (C) 2021-3, SoC Labs (www.soclabs.org)
+#-----------------------------------------------------------------------------
+
+#### IP Configuration 
+# !!EDIT this to point to the relevant logical directories of IP
+ARM_CORSTONE_101_DIR ?= $(ARM_IP_LIBRARY_PATH)/latest/Corstone-101/logical
+ARM_CORTEX_M0_DIR    ?= $(ARM_IP_LIBRARY_PATH)/latest/Cortex-M0/logical
+
+# DMA_xxx_INCLUDE (yes or leave blank)
+DMA_0_PL230_INCLUDE := yes 
+DMA_1_PL230_INCLUDE := 
+DMA_DMA350_INCLUDE := 
+
+# DMA 350 options set to yes for one of them
+# !! MAKE sure you run the correct configuration in the SLDMA350 directory
+# Small configuration of DMA, 2 channels, no stream interface, no extended features
+# Default configuration of DMA, 2 channels, stream interface, extended features
+# Big configuration of DMA, 3 channels, stream interface, extended features
+DMA350_SMALL := 
+DMA350_DEFAULT := 
+DMA350_BIG := 
+
+# ADC Include (yes or leave blank)
+ADC_0_INCLUDE:= 
+ADC_1_INCLUDE:= 
+ADC_2_INCLUDE:=
+ADC_3_INCLUDE:=
\ No newline at end of file
diff --git a/nanosoc_tech b/nanosoc_tech
index 55eaa51..0aad87a 160000
--- a/nanosoc_tech
+++ b/nanosoc_tech
@@ -1 +1 @@
-Subproject commit 55eaa51a5b382c95c009e1b4eab4658579c8b8a4
+Subproject commit 0aad87ad6fc7d93028fc5202388356d2b31afdf5
diff --git a/set_env.sh b/set_env.sh
index 2afe7f5..5155760 100755
--- a/set_env.sh
+++ b/set_env.sh
@@ -13,7 +13,9 @@
 # Source set_env script from soctools_flow
 source soctools_flow/bin/project_setup.sh $@
 if [ ! -f .dma350_configured ]; then
-    cp nanosoc_tech/nanosoc/sldma350_tech/config/address_map_m1_nanosoc.sv $ARM_IP_LIBRARY_PATH/DMA-350/CG096-r0p0-00rel0/CG096-BU-50000-r0p0-00rel0/dma350/logical/models/modules/generic/address_map_m1_nanosoc.sv
+    if [ ! -f $ARM_IP_LIBRARY_PATH/DMA-350/CG096-r0p0-00rel0/CG096-BU-50000-r0p0-00rel0/dma350/logical/models/modules/generic/address_map_m1_nanosoc.sv ]; then
+        cp nanosoc_tech/nanosoc/sldma350_tech/config/address_map_m1_nanosoc.sv $ARM_IP_LIBRARY_PATH/DMA-350/CG096-r0p0-00rel0/CG096-BU-50000-r0p0-00rel0/dma350/logical/models/modules/generic/address_map_m1_nanosoc.sv
+    fi
     make -C nanosoc_tech/nanosoc/sldma350_tech/ config_dma_ahb
     touch .dma350_configured
 fi
-- 
GitLab