From 134dc304f0da1070b6c423a477d00a864bbb9c26 Mon Sep 17 00:00:00 2001 From: dam1n19 <dam1n19@soton.ac.uk> Date: Mon, 3 Apr 2023 16:30:59 +0100 Subject: [PATCH] SOC1-124: Updated comments in git initialisation script and started Readme --- README.md | 46 ++++++++++++++++++++++++++++++--- flow/{socrepo-init => soc-init} | 3 ++- 2 files changed, 44 insertions(+), 5 deletions(-) rename flow/{socrepo-init => soc-init} (86%) diff --git a/README.md b/README.md index faf2193..babc4e8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,47 @@ # Accelerator System Top-Level +This repo is the top-level repository which contains accelerator and SoC Labs provided design IP in forms of git subrepositories. -This sample project shows how a project in GitLab looks for demonstration purposes. It contains issues, merge requests and Markdown files in many branches, -named and filled with lorem ipsum. +The SoC wiring is handled in this repository too, along with design and verification for accelerator wrappers. -You can look around to get an idea how to structure your project and, when done, you can safely delete this project. +## Creating own top-level -[Learn more about creating GitLab projects.](https://docs.gitlab.com/ee/gitlab-basics/create-project.html) +The first stage of putting your accelerator into a SoC is to build the accelerator in your own repository. + +Once you have a custom design repository, you are able to fork the template System Top-level repository and make some changes. + +After forking, you need to add your own repository as a submodule. The first thing to do is to clone your new forked top-level. + +## Cloning + +To clone this repository and its subrepository, use the following command: + +`git clone --recusrive $REPO_NAME` + +Once the repository and the subrepository has been cloned, the next stage is to initalise the environment variables and check out the sub repositories to a branch. + +First navigate to the top of this cloned repository and run: + +`source set_env.sh` + +This sets the environment variables related to this project and creates visability to the scripts in the flow directory. Because of this, you scan now run: + +`soc-init` + +This checks out all the repositories to the `main` branch. You are then able to check out the sub repos to the desired branches. + +## Adding Submodule + +After setting up your workarea, you now need to add your accelerator design repository as a subrepo. + +From `$DESIGN_ROOT`, you are able to run: + +`git submodule status` + +This lists the sub repositories and their branches. Make sure these are all you are expecting other than your design repo and you can then use the + +`git submodule add -b $BRANCH $REPOSITORY_URL` + +to add the repo into this work area. + +You then need to push the .gitmodules file back to remote to save this configuration. \ No newline at end of file diff --git a/flow/socrepo-init b/flow/soc-init similarity index 86% rename from flow/socrepo-init rename to flow/soc-init index cf24e4c..51df7f3 100755 --- a/flow/socrepo-init +++ b/flow/soc-init @@ -1,5 +1,6 @@ #----------------------------------------------------------------------------- -# SoC Labs socsim script to run required simulation +# SoC Labs Workarea initialisation Script +# - sets submodule branches to main - can then be checked out to other branches from there. # A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license. # # Contributors -- GitLab