Hello ,
Is it possible to use bind to override an existing rtl module with a tb/vip component.
The below code attempts to do the same and we see multiple driver issues with it.
Any help or work around is appreciated.
// Actual DUT RTL
module rtl(
input wire clk,reset,
input wire [1:0] req,
output wire [1:0] gnt);
assign gnt = 1;
endmodule
// overide tb componenet
module override_rtl(input wire clk_ip, reset_ip,input wire [1:0] req_ip, output wire [1:0] gnt_ip);
assign gnt_ip = 3;
endmodule
module rtl_tb();
reg reset,clk = 0;
reg [1:0] req = 0;
wire [1:0] gnt;
parameter OVERIDE = 1;
always #3 clk ++;
initial begin
reset <= 1;
#20 reset <= 0;
// Make the assertion pass
#100 @ (posedge clk) req <= 2;
end
generate
if(OVERIDE) begin : overide
bind rtl_tb override_rtl overide_inst (
// .vip port (RTL port)
.clk_ip (clk),
.req_ip (req),
.reset_ip (reset),
.gnt_ip (gnt)
);
end
endgenerate
rtl rtl_inst (clk,reset,req,gnt);
endmodule