I wanted to make dynamic connection with the desired discrete input/output. In the below line,input SCAN_ENABLE is connected with env[1], with the usage of same line I want to connect this input with env[2],env[3].etc so that I didn’t have to repeat this line again and again.
In reply to dave_59:
Thanks Dave, I also want to change DUT values with respect to env[*] value, so that connection should be according to the different DUTs.
and how can I set these input/outputs simultaneously for different DUTs before run time.
I knew that was going to be your next question. SystemVerilog identifiers are not dynamically constructed strings. They must be resolved as you compile the source code. You could create a text macro to help you, but you still would need to repeat the line.
No. Compiler macros get expanded before parsing any SystemVerilog syntax.
When you put a number in an identifier, you might as well use apple, orange, fig.