Hi,
Hi have a small piece of code something like below.
The hierarchy is top.u_t1.u_t2.u_t3.u_t4
Each module has 2 input ports which are connected to 2 ports of the internal module.
I want to force value of 1 to the port u_t1.u_t2.u_t3.u_t4.i2 after some time without affecting i2 input of all other modules.
Please let me know how to do it without changing code for module t1, t2, t3 and t4.
module top();
logic a, b;
initial
begin
$display("Hi");
a=0;
b=0;
#10 a = 1;
#20;
force top.u_t1.u_t2.u_t3.u_t4.i2 = 1;
#20;
$display("Done");
end
t1 u_t1(.i1(a), .i2(b));
module t1(input i1, i2);
t2 u_t2(.i1(i1), .i2(i2));
endmodule : t1
module t2(input i1, i2);
t3 u_t3(.i1(i1), .i2(i2));
endmodule : t2
module t3(input i1, i2);
t4 u_t4(.i1(i1), .i2(i2));
endmodule : t3
module t4(input i1, i2);
endmodule : t4
endmodule : top