Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SoCTools Flow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
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
SoCTools Flow
Commits
55fae46b
Commit
55fae46b
authored
2 years ago
by
David Mapstone
Browse files
Options
Downloads
Patches
Plain Diff
SOC1-121
: Update SoCSim Flow
parent
27329d3a
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
flow/socsim
+24
-0
24 additions, 0 deletions
flow/socsim
set_env.sh
+62
-0
62 additions, 0 deletions
set_env.sh
with
86 additions
and
0 deletions
flow/socsim
0 → 100755
+
24
−
0
View file @
55fae46b
#-----------------------------------------------------------------------------
# SoC Labs socsim script to run required simulation
# 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
DEFAULT_SIMULATOR="ivlog"
if [[ -z "${SIMULATOR}" ]]; then
SIMULATOR=$DEFAULT_SIMULATOR
fi
# $SOC_TOP_DIR"/flow/simulators/"$SIMULATOR"_sim.sh" $@
# Find a simulation script in the SoCSim environments of all subrepos
simscript=$(find -E ${SOCSIM_PATH//:/\/} -name "${1}.sh")
# Run Script if Found
$simscript $@
\ No newline at end of file
This diff is collapsed.
Click to expand it.
set_env.sh
0 → 100644
+
62
−
0
View file @
55fae46b
#-----------------------------------------------------------------------------
# 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 Design Structure
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 - at root
DESIGN_ROOT
=
`
git rev-parse
--show-toplevel
`
fi
# Source Top-Level Sourceme
source
$DESIGN_ROOT
/set_env.sh
else
# Set Environment Variable for this Repository
export
SOCSIM_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
# If this Repo is root of workspace
if
[
$SOCSIM_DIR
=
$DESIGN_ROOT
]
;
then
echo
"Design Workspace:
$DESIGN_ROOT
"
export
DESIGN_ROOT
# Set Default Simulator
export
SIMULATOR
=
"ivlog"
fi
# Source environment variables for all submodules
for
d
in
$SOCSIM_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
# Add Scripts to Path
export
PATH
=
"
$PATH
:/
$SOCSIM_DIR
/flow"
# SoCSim Specific
# Source environment variables for all submodules
for
d
in
$DESIGN_ROOT
/
*
;
do
if
[
-f
"
$d
/.git"
]
;
then
if
[
-d
"
$d
/simulate/socsim"
]
;
then
# If socsim directory exists
SOCSIM_PATH
=
"
$d
/simulate/socsim:
$SOCSIM_PATH
"
fi
fi
done
export
SOCSIM_PATH
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