Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SoCLabs SHA-2 Accelerator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
SoCLabs SHA-2 Accelerator
Commits
df94cd39
Commit
df94cd39
authored
2 years ago
by
David Mapstone
Browse files
Options
Downloads
Patches
Plain Diff
Updated Environment Sourcing Script
parent
b50a185c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
set_env.sh
+42
-0
42 additions, 0 deletions
set_env.sh
sourceme
+0
-44
0 additions, 44 deletions
sourceme
with
42 additions
and
44 deletions
set_env.sh
0 → 100755
+
42
−
0
View file @
df94cd39
#-----------------------------------------------------------------------------
# SoC Labs Environment Setup Script
# A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
#
# Contributors
#
# David Mapstone (d.a.mapstone@soton.ac.uk)
#
# Copyright 2023, SoC Labs (www.soclabs.org)
#-----------------------------------------------------------------------------
#!/bin/bash
# Get Root Location of Repository
if
[
-z
$DESIGN_ROOT
]
;
then
# If $DESIGN_ROOT hasn't been set yet
DESIGN_ROOT
=
`
git rev-parse
--show-superproject-working-tree
`
if
[
-z
$DESIGN_ROOT
]
;
then
# If not in a submodule
DESIGN_ROOT
=
`
git rev-parse
--show-toplevel
`
fi
fi
# Set Environment Variable for this Repository
export
SHA_2_ACC_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
# If this Repo is root of workspace
if
[
$SHA_2_ACC_DIR
=
$DESIGN_ROOT
]
;
then
echo
"Design Workspace:
$SHA_2_ACC_DIR
"
export
DESIGN_ROOT
else
source
$DESIGN_ROOT
/set_env.sh
fi
# Source environment variables for all submodules
for
d
in
$SHA_2_ACC_DIR
/
*
;
do
if
[
-f
"
$d
/.git"
]
;
then
if
[
-f
"
$d
/set_env.sh"
]
;
then
# If .git file exists - submodule
source
$d
/set_env.sh
fi
fi
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
sourceme
deleted
100755 → 0
+
0
−
44
View file @
b50a185c
#-----------------------------------------------------------------------------
# SoC Labs Environment Setup Script
# A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
#
# Contributors
#
# David Mapstone (d.a.mapstone@soton.ac.uk)
#
# Copyright 2022, SoC Labs (www.soclabs.org)
#-----------------------------------------------------------------------------
#!/usr/bin/env bash
if [ -z "$SHA_2_ACC_DIR" ]; then
# Set environment Variables for Repository
export SHA_2_ACC_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
if [ -z "$SOC_ENV_SET" ]; then
# Add flow directory to Path
export PATH=$PATH:$SHA_2_ACC_DIR/flow
# Set Default Simulator
export SIMULATOR="ivlog"
# Set Top-level Directory
export SOC_TOP=$SHA_2_ACC_DIR
# Set flag to say this is top level repo
export SOC_ENV_SET="True"
# Source Top-level sourceme
for d in $WRAP_ACC_DIR/../* ; do
if [ -d "$d" ]; then
if test -f "$d/sourceme"; then
source $d/sourceme
fi
fi
done
# Clear SOC_ENV_SET Variable
unset SOC_ENV_SET
fi
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment