following shuntys explanation from : http://www.ovmworld.org/forums/showthread.php?757-Is-quot-assign_vi-quot-the-only-way-to-pass-interface-to-the-components-from-environment&p=2763
doing the third step I did :
`ovm_object_utils(wrapper, OVM_ALL_ON )
and got :
Error-[MAM] Macro argument number mismatch
i2c_env.sv, 34
Macro argument number mismatch for macro 'ovm_object_utils'
"i2c_env.sv", 34: token is ')'
`ovm_object_utils(wrapper, OVM_ALL_ON )
code is :
^
class i2c_env extends ovm_env;
`include "ovm_macros.svh"
// Virtual Interface variable
virtual i2c_if xi0;
// Components of the environment
i2c_if_wrapper wrapper;
// Provide implementations of virtual methods such as get_type_name and create
`ovm_object_utils(wrapper, OVM_ALL_ON )
any help?

You are using ovm_object_utils incorrectly. ovm_object_utils() is designed to provide generic functionality for the specific class (hence it only takes one argument).
If you want to use the field automation macros, you need to use ovm_object_utils_begin and ovm_object_utils_end along with ovm_field_object() for the specific object.
Chuck Gales
Applications Engineer
Mentor Graphics
What should be written for [10][4]x and [10]x[4], in ovm_field_?
I tried with
ovm_field_int and ovm_field_array_int , but still getting error.
Need help.......
Thanks
SMB