How to pass a value to a sequence from a hierarchical sequence?

In a hierarchical sequence, can I specify the value of one of the rand values declared within the lower sequence using ovm_do_with macro as below? If not, is there any way to pass specific values

class X_seq extends ovm_sequence #(Seq_item1);

bit[31:0]  DW0; 
bit[31:0]  DW1; 
bit[31:0]  DW2; 
rand bit[31:0]  DW3;

`ovm_sequence_utils_begin(Xseq,IVC1_sqr)     
   `ovm_field_int(DW3, OVM_ALL_ON)
`ovm_sequence_utils_end   

//hierarchical sequence
class top_seq extends ovm_sequence #(Seq_item1);

X_seq drv1_seq;

ovm_sequence_utils_begin(top_seq,IVC1_sqr) ovm_field_object(drv1_seq, OVM_ALL_ON)
`ovm_sequence_utils_end

virtual task body();

<font color=red> `ovm_do_with(drv1_seq, {DW3==32'h00000008;})</font>

Yes, of course you could do this. if it does not work, you could try to remove the filed automation macro. that should be the only difference between yours and my working one.

Thank you for your response

does it work?

if anyone know the reason why please share with us. thanks!

It does work. You need to put `ovm_do_with(drv1_seq, {drv1_seq.DW3==32’h00000008;})