class ram_trans; rand bit[31 :0] dout [8192]; constraint cstr { dout >= 0 ; dout <= 2000; } function new(); endfunction function bit[7:0] compare(ram_trans tr); bit result= 1'b0; if(tr.dout != dout ) result = 1'b1; return result; endfunction function print(bit ctrl,integer fid); if(ctrl[0]) begin $fwrite(fid,"s_data =%b\n",dout ); end endfunction endclass : ram_trans