Error regarding macro and field method

`include “ovm.svh”
class BIP8_trans extends ovm_sequence_item;
rand logic [7:0] Data_in1;
rand logic [7:0] Data_in2;

logic reset;
logic [7:0]OPU[3:0][3824:16];
bit [7:0] Data_out;
ovm_object_utils_begin(BIP8_trans) ovm_field_int(Data_in1, OVM_ALL_ON);
ovm_field_int(Data_in2, OVM_ALL_ON); ovm_field_int(reset, OVM_ALL_ON);
ovm_field_array_int(OPU,OVM_ALL_ON); ovm_field_int(Data_out, OVM_ALL_ON);
`ovm_object_utils_end

function new(string name = “BIP8_trans”);
super.new(name);
endfunction: new
function void display();
$display(“Data_in1=%b,Data_in2 = %b,reset = %b,OPU = %p,Data_out=%b”,Data_in1,Data_in2,reset,OPU,Data_out);
endfunction: display

function void post_randomize(); //randomize the data after simulation is done
this.display();
endfunction: post_randomize

endclass: BIP8_trans

while i am compiling getting below error

** Error: trans.sv(13): ‘new’ must be used to assign to a dynamic array.

** Error: trans.sv(13): Field/method name (size) not in ‘OPU’

** Error: trans.sv(13): function calls an object that is not a function.

** Error: trans.sv(13): Field/method name (delete) not in ‘OPU’

** Error: trans.sv(13): task enable calls an object that is not a task.

** Error: trans.sv(13): Field/method name (size) not in ‘OPU’

** Error: trans.sv(13): function calls an object that is not a function.

** Error: trans.sv(13): Field/method name (size) not in ‘OPU’

** Error: trans.sv(13): function calls an object that is not a function.

** Error: Verilog Compiler exiting

C:/questasim_6.4c/win32/vlog failed.

so how to solve above problem ??

Thanks & Regards
Manda Swamy

The ovm_field_array_* macros are for one-dimensional dynamic arrays. The ovm_field_sarray_* macros are for one-dimensional fixed-sized arrays. The macros have no support for multidimensional arrays.

As a general rule, we do not recommend using the field automation macros in the OVM/UVM. Although very clever, they are a tremendous performance bottleneck. See the Best Paper from DVCon2011 "Are Macros in OVM & UVM Evil? – A Cost-Benefit Analysis" for some alternative implementations.

For MDAs, you can use do_copy() - see an example at:

Though it is on UVM, hope you can port it yourself to OVM

HTH,
Ajeetha, CVC