From 1fce0ec5bb85ae6e7b327b323a1f1580daa156a5 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Fri, 29 Nov 2024 09:38:27 +0200 Subject: [PATCH] adi_tb_env: Updated TCL variables setting - Separated Testbenches from HDL dependency Signed-off-by: Istvan-Zsolt Szekely --- scripts/adi_tb_env.tcl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/adi_tb_env.tcl b/scripts/adi_tb_env.tcl index eff40bdd..66224601 100644 --- a/scripts/adi_tb_env.tcl +++ b/scripts/adi_tb_env.tcl @@ -4,6 +4,16 @@ ############################################################################### # environment related stuff +if [info exists ::env(ADI_HDL_DIR)] { + set ad_hdl_dir [file normalize $::env(ADI_HDL_DIR)] +} else { + error "Missing ADI_HDL_DIR environment variable definition!" +} + set ad_tb_dir [file normalize [file join [file dirname [info script]] "../"]] -source $ad_tb_dir/../scripts/adi_env.tcl +if [info exists ::env(ADI_TB_DIR)] { + set ad_tb_dir [file normalize $::env(ADI_TB_DIR)] +} + +source $ad_hdl_dir/scripts/adi_env.tcl