Uvm_do_with question

Hello,

I have two sequences. One of them is virtual. There is pck_del variable in each sequence, but this one from “base_workload_v_sequence” doesn’t pass its value to “sys_var_sequence”. When I change the name of pck_del variable from “base_workload_v_sequence” to pck_del_s it’s ok, but when the names are the same it doesn’t work. I mean the exprassion pck_del == pck_del_s; in `uvm_do_on_with works well, but pck_del == this.pck_del; doesn’t. Does anybody now the solution?

class sys_var_sequence extends sys_base_sequence;
    rand int pck_del;
    rand int busy_del;

    `uvm_object_utils(ipcc_sys_var_sequence)

    `uvm_declare_p_sequencer(ipcc_sys_sequencer)

    function new(string name = "ipcc_sys_var_sequence");
        super.new(name);
    endfunction:new

    virtual task body();
        `uvm_do_with(req, { req.vc inside p_sequencer.vc;
                            req.packet_delay == pck_del; 
                            req.busy_delay == busy_del; } )
    endtask
endclass : sys_var_sequence

class base_workload_v_sequence extends sys_base_v_sequence;
    rand int pck_del;
    // Constraints
    constraint pck_del_c { pck_del  dist {0:= 4, [20:30]:= 1}; }

    `uvm_object_utils(ipcc_base_workload_v_sequence)

    `uvm_declare_p_sequencer(ipcc_sys_vsequencer)
    function new(string name = "ipcc_base_workload_v_sequence");
        super.new(name);
    endfunction:new

    ipcc_sys_var_sequence var_seq;

    virtual task body();
        foreach(p_sequencer.ch0_sqrs[i]) begin
           `uvm_do_on_with(var_seq, p_sequencer.ch0_sqrs[i], {pck_del == this.pck_del; busy_del == 0;})
        end
    endtask
endclass : base_workload_v_sequence

Use local::pck_del instead of this.pck_del. There is already an implicit this. in front of every simple identifier, which refers to the object being randomized.

In reply to dave_59:

Thanks Dave