cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ldm_as
Observer
Observer
408 Views
Registered: ‎09-04-2019

TCL proc -> sending arguments to a proceedure by name

Hi All,

Is it possible to send arguments to TCL proceedure by name and not by order?

I mean if the proc is as following:

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
proc comp_rtl_lst {RTL LST UNIT LIB} { #* Compile RTL
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "-> @comp_rtl_lst";
set FILE [open "${LST}/${UNIT}_rtl.lst" r];
set data [read ${FILE}];
foreach f ${data} {
  echo "-------------------------------------------------------------";
  set file "${RTL}/${f}";
  echo "FILE: ${file}";
  vlog -work ${LIB} -vopt -sv -incr "${file}";
}
close ${FILE};
}

could it be called as following?

%> comp_rtl_lst (.RTL(./rtl/), .LST(./lst/), .UNIT(abc), .LIB(ABC))

Thank you!

 

0 Kudos
Reply
0 Replies