Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Accelerator Project
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
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
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
Accelerator Project
Commits
4e34f6e1
Commit
4e34f6e1
authored
2 years ago
by
David Mapstone
Browse files
Options
Downloads
Patches
Plain Diff
SOC1-124
: Updated set_env script
parent
b1162210
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
flow/simulators/ivlog_sim.sh
+16
-0
16 additions, 0 deletions
flow/simulators/ivlog_sim.sh
flow/socsim
+18
-0
18 additions, 0 deletions
flow/socsim
set_env.sh
+26
-20
26 additions, 20 deletions
set_env.sh
with
60 additions
and
20 deletions
flow/simulators/ivlog_sim.sh
0 → 100755
+
16
−
0
View file @
4e34f6e1
#-----------------------------------------------------------------------------
# SoC Labs icarus verilog simulation script for engine testbench
# 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
mkdir
-p
$SOC_TOP_DIR
/simulate/sim/
iverilog
-g2012
-o
$SOC_TOP_DIR
/simulate/sim/
$1
.vvp
$ACC_WRAPPER_DIR
/hdl/verif/tb_
$1
.sv
cd
$SOC_TOP_DIR
/simulate/sim/
&&
vvp
$1
.vvp
$2
\ No newline at end of file
This diff is collapsed.
Click to expand it.
flow/socsim
0 → 100755
+
18
−
0
View file @
4e34f6e1
#-----------------------------------------------------------------------------
# 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" $@
This diff is collapsed.
Click to expand it.
set_env.sh
+
26
−
20
View file @
4e34f6e1
...
...
@@ -10,34 +10,40 @@
#-----------------------------------------------------------------------------
#!/bin/bash
# Get Root Location of
Repository
# 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
# If not in a submodule
- at root
DESIGN_ROOT
=
`
git rev-parse
--show-toplevel
`
fi
fi
# Set Environment Variable for this Repository
export
SHA_2_SOC_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
# Source Top-Level Sourceme
source
$DESIGN_ROOT
/set_env.sh
else
# Set Environment Variable for this Repository
export
SOC_TOP_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
# If this Repo is root of workspace
if
[
$SHA_2_SOC_DIR
=
$DESIGN_ROOT
]
;
then
echo
"Design Workspace:
$SHA_2_SOC_DIR
"
export
DESIGN_ROOT
fi
# If this Repo is root of workspace
if
[
$SOC_TOP_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
$SHA_2_SOC_DIR
/
*
;
do
if
[
-f
"
$d
/.git"
]
;
then
if
[
-f
"
$d
/set_env.sh"
]
;
then
# If .git file exists - submodule
source
$d
/set_env.sh
# Source environment variables for all submodules
for
d
in
$SOC_TOP_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
fi
done
done
# Add Scripts to PAth
export
PATH
=
"
$PATH
:/
$SHA_2_SOC_DIR
/flow"
\ No newline at end of file
# Add Scripts to Path
export
PATH
=
"
$PATH
:/
$SOC_TOP_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