2. Writing Scripts and Procedures : Calling Procedures
 
Share this page                  
Calling Procedures
In OpenROAD, the frame or procedure that includes the callproc statement is referred to as the calling frame or procedure. The procedure you specify in the callproc statement is referred to as the called procedure.
You usually call a procedure with one or more parameters. A parameter is the name of a local variable in the called procedure that is visible to code outside the procedure. You can use parameters to pass values between the procedure and the code that called it. Each time you call the procedure, you can pass different parameters, enabling one procedure to operate on different data. Passing parameters differs for the three types of procedures.
If the procedure returns a value, you can use it as an expression or as part of an expression in an OpenROAD statement. For more information, see How You Can Call Procedures in Expressions (see How You Can Call Procedures in Expressions).