in my compare method if condition not excuting means my compersion sucessfull, functionality wise it is correct it reduce to code coverage due to not excution of if condition ,
please tell me how to overcome to this issue because it redude coverage.
function bit compare(sata_trans rcv, output string message);
compare='b0;
begin
if( this.MB2IP_Addr_pin !=rcv.MB2IP_Addr_pin &&
this.MB2IP_Data_pin !=rcv.MB2IP_Data_pin &&
this.MB2IP_CS_pin !=rcv.MB2IP_CS_pin &&
this.MB2IP_RNW_pin !=rcv.MB2IP_RNW_pin &&
this.address_audio !=rcv.address_audio &&
this.done !=rcv.done &&
this.count1 !=rcv.count1 &&
this.state !=rcv.state
)
begin
// $display($time);
// message="=============== DATA_MISMATCH=================";
return(0);
end
else
begin
$display($time);
message="================== SUCESSFULLY_COMPARED=======";
return(1);
end
end
endfunction