Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
NanoSoC Tech
Commits
92c768ac
Commit
92c768ac
authored
2 years ago
by
dwf1m12
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of git.soton.ac.uk:soclabs/nanosoc into main
parents
f62d728d
5843789d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
set_env.sh
+26
-20
26 additions, 20 deletions
set_env.sh
with
26 additions
and
20 deletions
set_env.sh
+
26
−
20
View file @
92c768ac
...
@@ -10,23 +10,28 @@
...
@@ -10,23 +10,28 @@
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#!/bin/bash
#!/bin/bash
# Get Root Location of
Repository
# Get Root Location of
Design Structure
if
[
-z
$DESIGN_ROOT
]
;
then
if
[
-z
$DESIGN_ROOT
]
;
then
# If $DESIGN_ROOT hasn't been set yet
# If $DESIGN_ROOT hasn't been set yet
DESIGN_ROOT
=
`
git rev-parse
--show-superproject-working-tree
`
DESIGN_ROOT
=
`
git rev-parse
--show-superproject-working-tree
`
if
[
-z
$DESIGN_ROOT
]
;
then
if
[
-z
$DESIGN_ROOT
]
;
then
# If not in a submodule
# If not in a submodule
- at root
DESIGN_ROOT
=
`
git rev-parse
--show-toplevel
`
DESIGN_ROOT
=
`
git rev-parse
--show-toplevel
`
fi
fi
fi
# Source Top-Level Sourceme
source
$DESIGN_ROOT
/set_env.sh
else
# Set Environment Variable for this Repository
# Set Environment Variable for this Repository
export
NANOSOC_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
export
NANOSOC_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
# If this Repo is root of workspace
# If this Repo is root of workspace
if
[
$NANOSOC_DIR
=
$DESIGN_ROOT
]
;
then
if
[
$NANOSOC_DIR
=
$DESIGN_ROOT
]
;
then
echo
"Design Workspace:
$
NANOSOC_DIR
"
echo
"Design Workspace:
$
DESIGN_ROOT
"
export
DESIGN_ROOT
export
DESIGN_ROOT
# Set Default Simulator
export
SIMULATOR
=
"ivlog"
fi
fi
# Source environment variables for all submodules
# Source environment variables for all submodules
...
@@ -39,5 +44,6 @@ for d in $NANOSOC_DIR/* ; do
...
@@ -39,5 +44,6 @@ for d in $NANOSOC_DIR/* ; do
fi
fi
done
done
# Add
Flow directory
to Path
# Add
Scripts
to Path
export
PATH
=
"
$PATH
:/
$NANOSOC_DIR
/flow"
export
PATH
=
"
$PATH
:/
$NANOSOC_DIR
/flow"
fi
\ No newline at end of file
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