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 @@
#!/usr/bin/env bash
mkdir -p $SOC_TOP/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
cd $SOC_TOP/simulate/sim/ && vvp $1.vvp $2
\ No newline at end of file
mkdir -p $SOC_TOP_DIR/simulate/sim/
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_DIR/simulate/sim/ && vvp $1.vvp $2
\ No newline at end of file
......@@ -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" $@
......@@ -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 ACC_ENGINE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
echo $ACC_ENGINE_DIR
# If this Repo is root of workspace
if [ $ACC_ENGINE_DIR = $DESIGN_ROOT ]; then
echo "Design Workspace: $ACC_ENGINE_DIR"
export DESIGN_ROOT
fi
# Source Top-Level Sourceme
source $DESIGN_ROOT/set_env.sh
else
# Set Environment Variable for this Repository
export ACC_ENGINE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
# Source environment variables for all submodules
for d in $ACC_ENGINE_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
# If this Repo is root of workspace
if [ $ACC_ENGINE_DIR = $DESIGN_ROOT ]; then
echo "Design Workspace: $DESIGN_ROOT"
export DESIGN_ROOT
# Set Default Simulator
export SIMULATOR="ivlog"
fi
done
# Add Flow directory to Path
export PATH="$PATH:/$ACC_ENGINE_DIR/flow"
\ No newline at end of file
# Source environment variables for all submodules
for d in $ACC_ENGINE_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:/$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