Skip to content
Snippets Groups Projects
Commit 7a5fe702 authored by dam1n19's avatar dam1n19
Browse files

SOC1-124: Restructured environment setup and environment variable names

parent a248f149
No related branches found
No related tags found
No related merge requests found
//-----------------------------------------------------------------------------
// Accelerator Wrapper Filelist
// A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
//
// Contributors
//
// David Mapstone (d.a.mapstone@soton.ac.uk)
//
// Copyright � 2021-3, SoC Labs (www.soclabs.org)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Abstract : Verilog Command File for Accelerator Wrapper IP
//-----------------------------------------------------------------------------
// ============= Verilog library extensions ===========
+libext+.v+.vlib
// ============= Accelerator Module search path =============
-y $(ACC_WRAPPER_DIR)/hdl/src/
+incdir+$(ACC_WRAPPER_DIR)/hdl/src/
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_ahb_packet_constructor.sv
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_ahb_packet_deconstructor.sv
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_addr_calc.sv
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_data_req.sv
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_ahb_reg_interface.sv
// $(ACC_WRAPPER_DIR)/hdl/src/wrapper_ahb_vr_interface.sv
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_packet_construct.sv
$(ACC_WRAPPER_DIR)/hdl/src/wrapper_packet_deconstruct.sv
......@@ -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["SOC_TOP_DIR"] + "/system/stimulus/" + "adp_hash_stim.cmd"
adp_file = os.environ["PROJECT_DIR"] + "/system/stimulus/" + "adp_hash_stim.cmd"
adp_output(adp_file, output_word_list)
# Generate FRI File with Write Transactions
fri_file = os.environ["SOC_TOP_DIR"] + "/wrapper/stimulus/" + "ahb_input_hash_stim.fri"
fri_file = os.environ["PROJECT_DIR"] + "/wrapper/stimulus/" + "ahb_input_hash_stim.fri"
fri_output(fri_file, output_word_list)
# Call fm2conv.pl script
m2d_file = os.environ["SOC_TOP_DIR"] + "/wrapper/stimulus/" + "ahb_input_hash_stim.m2d"
m2d_file = os.environ["PROJECT_DIR"] + "/wrapper/stimulus/" + "ahb_input_hash_stim.m2d"
os.system(f"fm2conv.pl -busWidth=32 -infile={fri_file} -outfile={m2d_file}")
......@@ -205,6 +205,6 @@ if __name__ == "__main__":
accelerator_input_size = 0x0000_0800
accelerator_output_address = 0x6001_0800
accelerator_output_size = 0x0000_0800
stim_file = os.environ["SOC_TOP_DIR"] + "/wrapper/stimulus/" + "input_block_32bit_stim.csv"
ref_file = os.environ["SOC_TOP_DIR"] + "/wrapper/stimulus/" + "output_hash_32bit_ref.csv"
stim_file = os.environ["PROJECT_DIR"] + "/wrapper/stimulus/" + "input_block_32bit_stim.csv"
ref_file = os.environ["PROJECT_DIR"] + "/wrapper/stimulus/" + "output_hash_32bit_ref.csv"
stimulus_generation(stim_file, ref_file, accelerator_input_address, accelerator_input_size, accelerator_output_address, accelerator_output_size)
\ No newline at end of file
#-----------------------------------------------------------------------------
# SoC Labs Environment Setup Script
# A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
#
# Contributors
#
# David Mapstone (d.a.mapstone@soton.ac.uk)
#
# Copyright 2023, SoC Labs (www.soclabs.org)
#-----------------------------------------------------------------------------
#!/bin/bash
# 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 - at root
DESIGN_ROOT=`git rev-parse --show-toplevel`
fi
# Source Top-Level Sourceme
source $DESIGN_ROOT/set_env.sh
else
# Set Environment Variable for this Repository
export ACC_WRAPPER_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" && pwd)"
# 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 $ACC_WRAPPER_DIR/* ; do
if [ -e "$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_WRAPPER_DIR/flow"
fi
#-----------------------------------------------------------------------------
# SoC Labs Environment Setup Script
# 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
if [ -z "$ACC_WRAPPER_DIR" ]; then
# Set environment Variables for Repository
export ACC_WRAPPER_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" && pwd)"
if [ -z "$SOC_ENV_SET" ]; then
# Add flow directory to Path
export PATH=$PATH:$ACC_WRAPPER_DIR/flow
# Set Default Simulator
export SIMULATOR="ivlog"
# Set Top-level Directory
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 $ACC_WRAPPER_DIR/../* ; do
if [ -d "$d" ]; then
if test -f "$d/sourceme"; then
source $d/sourceme
fi
fi
done
# Clear SOC_ENV_SET Variable
unset SOC_ENV_SET
fi
fi
\ No newline at end of file
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