Assigning weak1 and weak0 to an input pin to verify pulldown

In reply to chr_sue:

Yes. “dut_if.test_drive = weak1” is not a working statement. This just represents the kind of functionality I need.

I tried something like

assign (weak1, weak0) P = (pulldown_verif) ? (test_drive) : (vip.out);

and in my run phase I have :

if(r == 1) begin
dut_if.pulldown_verif = 1;
dut_if.test_drive = 1;
end

But doing this, I need to add more logic in the dut_if file (for all combinations of drive strengths) which I want to avoid. Is it okay if I do this task as shown above?