problem with ovm object utils

3 posts / 0 new
Last post
zgluzer
Offline
Academy Total Access User
Joined: 08/09/2010
Posts: 12
problem with ovm object utils

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?

cgales
Offline
Academy Total Access User
Joined: 03/12/2010
Posts: 211
Re: problem with ovm object utils

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

SMB
Offline
Academy Forum User
Joined: 02/15/2012
Posts: 1
Re: problem with ovm object utils

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