Skip to content
Snippets Groups Projects
Commit 2899c7d9 authored by David Mapstone's avatar David Mapstone
Browse files

SOC1-124: Updated set_env script

parent ea9f5a59
No related branches found
No related tags found
No related merge requests found
No preview for this file type
{
"workbench.colorCustomizations": {
"activityBar.background": "#00360F",
"titleBar.activeBackground": "#004C16",
"titleBar.activeForeground": "#EDFFF2"
}
}
\ No newline at end of file
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
mkdir -p $SOC_TOP/simulate/sim/ mkdir -p $SOC_TOP_DIR/simulate/sim/
iverilog -I $SOC_TOP/hdl/verif/ -I $SOC_TOP/hdl/src/ -g2012 -o $SOC_TOP/simulate/sim/$1.vvp $SOC_TOP/hdl/verif/tb_$1.sv iverilog -I $SOC_TOP_DIR/hdl/verif/ -I $SOC_TOP_DIR/hdl/src/ -g2012 -o $SOC_TOP_DIR/simulate/sim/$1.vvp $SOC_TOP_DIR/hdl/verif/tb_$1.sv
cd $SOC_TOP/simulate/sim/ && vvp $1.vvp $2 cd $SOC_TOP_DIR/simulate/sim/ && vvp $1.vvp $2
\ No newline at end of file \ No newline at end of file
...@@ -15,4 +15,4 @@ DEFAULT_SIMULATOR="ivlog" ...@@ -15,4 +15,4 @@ DEFAULT_SIMULATOR="ivlog"
if [[ -z "${SIMULATOR}" ]]; then if [[ -z "${SIMULATOR}" ]]; then
SIMULATOR=$DEFAULT_SIMULATOR SIMULATOR=$DEFAULT_SIMULATOR
fi fi
$SOC_TOP"/flow/simulators/"$SIMULATOR"_sim.sh" $@ $SOC_TOP_DIR"/flow/simulators/"$SIMULATOR"_sim.sh" $@
...@@ -10,34 +10,41 @@ ...@@ -10,34 +10,41 @@
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#!/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
# Set Environment Variable for this Repository # Source Top-Level Sourceme
export ACC_ENGINE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )" source $DESIGN_ROOT/set_env.sh
echo $ACC_ENGINE_DIR else
# If this Repo is root of workspace # Set Environment Variable for this Repository
if [ $ACC_ENGINE_DIR = $DESIGN_ROOT ]; then export ACC_ENGINE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
echo "Design Workspace: $ACC_ENGINE_DIR"
export DESIGN_ROOT
fi
# Source environment variables for all submodules # If this Repo is root of workspace
for d in $ACC_ENGINE_DIR/* ; do if [ $ACC_ENGINE_DIR = $DESIGN_ROOT ]; then
if [ -f "$d/.git" ]; then echo "Design Workspace: $DESIGN_ROOT"
if [ -f "$d/set_env.sh" ]; then export DESIGN_ROOT
# If .git file exists - submodule # Set Default Simulator
source $d/set_env.sh export SIMULATOR="ivlog"
fi
fi fi
done
# Add Flow directory to Path # Source environment variables for all submodules
export PATH="$PATH:/$ACC_ENGINE_DIR/flow" for d in $ACC_ENGINE_DIR/* ; do
\ No newline at end of file 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:/$ACC_ENGINE_DIR/flow"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment