Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Accelerator Wrapper Tech
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
Accelerator Wrapper Tech
Commits
341995f2
Commit
341995f2
authored
2 years ago
by
David Mapstone
Browse files
Options
Downloads
Patches
Plain Diff
SOC1-124
: Updated set_env script
parent
f3387635
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
flow/socsim
+1
-1
1 addition, 1 deletion
flow/socsim
flow/stimgen.py
+3
-3
3 additions, 3 deletions
flow/stimgen.py
set_env.sh
+27
-20
27 additions, 20 deletions
set_env.sh
sourceme
+5
-5
5 additions, 5 deletions
sourceme
with
36 additions
and
29 deletions
flow/socsim
+
1
−
1
View file @
341995f2
...
...
@@ -15,4 +15,4 @@ DEFAULT_SIMULATOR="ivlog"
if [[ -z "${SIMULATOR}" ]]; then
SIMULATOR=$DEFAULT_SIMULATOR
fi
$SOC_TOP"/flow/simulators/"$SIMULATOR"_sim.sh" $@
$SOC_TOP
_DIR
"/flow/simulators/"$SIMULATOR"_sim.sh" $@
This diff is collapsed.
Click to expand it.
flow/stimgen.py
+
3
−
3
View file @
341995f2
...
...
@@ -188,15 +188,15 @@ def stimulus_generation(stim_file, ref_file, input_start_address, input_size, ou
# Generate ADP Command File with Write Transactions
adp_file
=
os
.
environ
[
"
WRAP_ACC
_DIR
"
]
+
"
/simulate/stimulus/
"
+
"
adp_hash_stim.cmd
"
adp_file
=
os
.
environ
[
"
ACC_WRAPPER
_DIR
"
]
+
"
/simulate/stimulus/
"
+
"
adp_hash_stim.cmd
"
adp_output
(
adp_file
,
output_word_list
)
# Generate FRI File with Write Transactions
fri_file
=
os
.
environ
[
"
WRAP_ACC
_DIR
"
]
+
"
/simulate/stimulus/
"
+
"
ahb_input_hash_stim.fri
"
fri_file
=
os
.
environ
[
"
ACC_WRAPPER
_DIR
"
]
+
"
/simulate/stimulus/
"
+
"
ahb_input_hash_stim.fri
"
fri_output
(
fri_file
,
output_word_list
)
# Call fm2conv.pl script
m2d_file
=
os
.
environ
[
"
WRAP_ACC
_DIR
"
]
+
"
/simulate/stimulus/
"
+
"
ahb_input_hash_stim.m2d
"
m2d_file
=
os
.
environ
[
"
ACC_WRAPPER
_DIR
"
]
+
"
/simulate/stimulus/
"
+
"
ahb_input_hash_stim.m2d
"
os
.
system
(
f
"
fm2conv.pl -busWidth=32 -infile=
{
fri_file
}
-outfile=
{
m2d_file
}
"
)
...
...
This diff is collapsed.
Click to expand it.
set_env.sh
+
27
−
20
View file @
341995f2
...
...
@@ -10,34 +10,41 @@
#-----------------------------------------------------------------------------
#!/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
WRAP_ACC_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
ACC_WRAPPER_DIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
# If this Repo is root of workspace
if
[
$WRAP_ACC_DIR
=
$DESIGN_ROOT
]
;
then
echo
"Design Workspace:
$WRAP_ACC_DIR
"
export
$DESIGN_ROOT
fi
# If this Repo is root of workspace
if
[
$ACC_WRAPPER_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
$WRAP_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
# Source environment variables for all submodules
for
d
in
$ACC_WRAPPER_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
:/
$ACC_WRAPPER_DIR
/flow"
fi
# Add Flow directory to Path
export
PATH
=
"
$PATH
:/
$WRAP_ACC_DIR
/flow"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
sourceme
+
5
−
5
View file @
341995f2
...
...
@@ -11,25 +11,25 @@
#!/usr/bin/env bash
if [ -z "$
WRAP_ACC
_DIR" ]; then
if [ -z "$
ACC_WRAPPER
_DIR" ]; then
# Set environment Variables for Repository
export
WRAP_ACC
_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
export
ACC_WRAPPER
_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
if [ -z "$SOC_ENV_SET" ]; then
# Add flow directory to Path
export PATH=$PATH:$
WRAP_ACC
_DIR/flow
export PATH=$PATH:$
ACC_WRAPPER
_DIR/flow
# Set Default Simulator
export SIMULATOR="ivlog"
# Set Top-level Directory
export SOC_TOP=$
WRAP_ACC
_DIR
export SOC_TOP=$
ACC_WRAPPER
_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
for d in $
ACC_WRAPPER
_DIR/../* ; do
if [ -d "$d" ]; then
if test -f "$d/sourceme"; then
source $d/sourceme
...
...
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