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
78e5c225
Commit
78e5c225
authored
1 year ago
by
dam1n19
Browse files
Options
Downloads
Patches
Plain Diff
SOC1-169
: Added basic cleaning functionality to socsim
parent
550534f9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
flow/socsim
+33
-10
33 additions, 10 deletions
flow/socsim
with
33 additions
and
10 deletions
flow/socsim
+
33
−
10
View file @
78e5c225
...
...
@@ -6,19 +6,42 @@
#
# David Mapstone (d.a.mapstone@soton.ac.uk)
#
# Copyright
202
2
, SoC Labs (www.soclabs.org)
# Copyright 202
3
, SoC Labs (www.soclabs.org)
#-----------------------------------------------------------------------------
#!/usr/bin/env bash
DEFAULT_SIMULATOR="ivlog"
if [
[ -z "${SIMULATOR}" ]]; then
SIMULATOR=$DEFAULT_SIMULATOR
fi
# $PROJECT_DIR"/flow/simulators/"$SIMULATOR"_sim.sh" $@
# Check arguments passed to SoCSim
if [
$# -eq 0 ]
then
echo "No arguments supplied"
else
# Find a simulation script in the SoCSim environments of all subrepos
simscript=$(find ${SOCSIM_PATH//:/\ } -name "${1}.sh")
# If clean command passed in clean a specific directory or all
if [ ${1} == "clean" ]; then
if [ $# -eq 1 ]; then
echo "No clean arguments supplied"
else
if [ ${2} == "all" ]; then
# Clean all simualation directories
echo "Cleaning all Project Simulation Directories"
rm -rf $PROJECT_DIR/simulate/sim
mkdir -p $PROJECT_DIR/simulate/sim
else
# Remove specific simulaiton directory
SIM_DIR=$PROJECT_DIR/simulate/sim/${2}
if [ -d "$SIM_DIR" ]; then
rm -rf $SIM_DIR
else
echo "Simulation Directory '${2}' doesn't exist"
fi
fi
fi
fi
# Run Script if Found
$simscript $@
\ No newline at end of file
# Find a simulation script in the SoCSim environments of all subrepos
simscript=$(find ${SOCSIM_PATH//:/\ } -name "${1}.sh")
# Run Script if Found
$simscript $@
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