# @(posedge "dynamic\_string")

**URL:** <https://verificationacademy.com/forums/t/posedge-dynamic-string/40812>\
**Category:** SystemVerilog\
**Tags:** dynamic, SystemVerilog\
**Created:** [September 3, 2022, 5:12am UTC](https://verificationacademy.com/forums/t/posedge-dynamic-string/40812 "2022-09-03T05:12:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uvmbee](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/u/94ad74/32.png) [@uvmbee](https://verificationacademy.com/forums/u/uvmbee)\
**Post date:** [September 3, 2022, 5:12am UTC](https://verificationacademy.com/forums/t/posedge-dynamic-string/40812/1 "2022-09-03T05:12:54Z")

</div>

Hi,

I want to make a dynamic edge trigger as below shape.  
Is it possible? If not, please advice me any other workaround.  
Thanks.

```verilog

task automatic chk(input string signal_name);
   begin
     @(posedge $sformatf("Top.duv.%p",signal_name));
        $display("test");
   end
endtask

```

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [September 3, 2022, 6:32am UTC](https://verificationacademy.com/forums/t/posedge-dynamic-string/40812/2 "2022-09-03T06:32:21Z")

</div>

_In reply to [uvmbee](https://verificationacademy.com/forums/t/posedge-dynamic-string/40812):_

SystemVerilog is a compiled programming language, you cannot build references to identifiers using strings. You can pass the entire hierarchical signal name to the task by reference(if the signal is a variable).

```verilog
task automatic chk(ref bit signal_name);
   begin
     @(posedge signal_name);
        $display("test");
   end
endtask

...
chk(Top.duv.signal);

```

It the signal is a wire, you can use the bind construct to attach a probe interface to the signal.

See [Updated Example Code from DVCon Paper: The Missing Link: The Testbench to DUT Connection | Verification Academy](https://verificationacademy.com/forums/downloads/updated-example-code-dvcon-paper-missing-link-testbench-dut-connection)
