View Full Version : using ovm_recorder
Amrutha
02-11-2008, 04:07 AM
Hi All,
Can someone please tell me the exact usage and necessity of ovm_recorder?
File ovm_misc.sv contains methods ovm_begin_transaction and ovm_set_attribute_by_name used for recording which are empty.So how does a default implementation of ovm_recorder work?
I also get a display "tr handle 0 not valid! " on enabling recording for any transaction as function "ovm_begin_transaction" always return tr_handle as 0(in ovm_transaction).
Also what is the significance of variable "recording_detail" ?
Regards,
Amrutha
jlrose
02-11-2008, 03:27 PM
Hi Amrutha,
OVM does not implement any recording functionality. The api is in place to allow a vendor to supply some kind of vendor specific implementation.
The error message you are seeing is a bug in the stub. The stub should be returning a 1 instead of a 0. The message you are getting can safely be ignored. This will be fixed in the update release that should be out soon.
For the specific issue you are having, src/base/ovm_misc.sv:418 needs to be change to:
return 1;
john
rex89072
07-19-2009, 08:14 PM
Hi John,
Since I need to know more about ovm_recorder, I searched and found this post. As you mentioned before, OVM does not implement any recording functionality. However, I do find some codes about ovm_recorder in ovm_object.sv.
function void ovm_recorder::record_field (string name,
ovm_bitstream_t value,
int size,
ovm_radix_enum radix=OVM_NORADIX);
if(tr_handle==0) return;
scope.set_arg(name);
if(!radix)
radix = default_radix;
case(radix)
OVM_BIN: ovm_set_attribute_by_name(tr_handle, scope.get_arg(), value, "'b",size);
OVM_OCT: ovm_set_attribute_by_name(tr_handle, scope.get_arg(), value, "'o",size);
OVM_DEC: ovm_set_attribute_by_name(tr_handle, scope.get_arg(), value, "'s",size);
OVM_TIME: ovm_set_attribute_by_name(tr_handle, scope.get_arg(), value, "'u",size);
OVM_STRING: ovm_set_attribute_by_name(tr_handle, scope.get_arg(), value, "'a",size);
default: ovm_set_attribute_by_name(tr_handle, scope.get_arg(), value, "'x",size);
endcase
endfunction
function void ovm_recorder::record_object (string name,
ovm_object value);
int v;
string str;
if(scope.in_hierarchy(value)) return;
if(identifier) begin
`ifdef INCA
$swrite(str, "%0d", value);
`else
str = "";
`endif
v = str.atoi();
scope.set_arg(name);
ovm_set_attribute_by_name(tr_handle, scope.get_arg(), v, "'s");
end
if(policy != OVM_REFERENCE) begin
if(value!=null) begin
scope.down(name, value);
value.record(this);
scope.up(value);
end
end
endfunction
It looks like the ovm_recorder binds the attributes on the tr_handle. Isn't it the recording functionality?
Thanks for your reply!
Best regards
rex
jlrose
07-20-2009, 06:29 AM
Hi Rex,
OVM uses the recording stubs in places where it would be recording information. In the code snip you show, it is recording the attributes of an object.
However, the recording functions, like ovm_set_attribute_by_name() are stub functions in ovm. It is up to individual vendors to provide implementations. For example, Cadence provides an implementation for recording stubs with the IES simulator product.
john
Divyang
07-27-2009, 01:12 AM
Hi Rex,
OVM uses the recording stubs in places where it would be recording information. In the code snip you show, it is recording the attributes of an object.
However, the recording functions, like ovm_set_attribute_by_name() are stub functions in ovm. It is up to individual vendors to provide implementations. For example, Cadence provides an implementation for recording stubs with the IES simulator product.
john
Hii
You require cdns_recording file in src.
Powered by vBulletin™ Version 4.0.3 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.