PDA

View Full Version : ovm_in_order_class_comparator help



drmr4leyefe
03-09-2008, 10:46 AM
I'm new not only to OVM but SV as well and I'm having issues with getting the ovm_in_order_class_comparator to work. Whether I declare in a class that has been extended from ovm_env or ovm_scoreboard, when I "vsim" using Questa 6.3e I receive the following error:
# Loading sv_std.std
# Loading work.ovm_pkg(fast)
# Loading work.my_pkg(fast)
# Loading work.my_ovm4_top(fast)
# ** Error: (vsim-3567) /ovm-1.0.1/src/methodology/ovm_pair.svh(65): No field named 'comp'.
# Region: /ovm_pkg: ovm_class_pair: ovm_class_pair__1

The declaration code is:
ovm_in_order_class_comparator #(my_transaction) tw_comparator;

I've downloaded the AVM cookbook examples and ran the scoreboard example fine (with AVM libraries). Does the ovm_in_order_class_comparator work or am I just inexperienced and am missing something (most likely)?

Thanks in advance for any help offerred.

tfitz
03-10-2008, 05:42 AM
Most likely, you have neglected to define a comp() method for one or both transaction objects that make up the pair.

drmr4leyefe
03-10-2008, 08:39 AM
tfitz,
Thanks for the reply, but I'm confused. If I'm using the ovm classes (extended) and I'm registering with the "factory" and I'm creating an object (ovm_in_order_class_comparator #(type) object_name;), why do I need to provide a comp() method? What would be in this method?

For clarification: I haven't even connected the "comparator" yet. It doesn't even know about "both transaction objects".

Is there an OVM example using ovm_in_order_class_comparator? Not snippets of code, but an actual complete working example.

drmr4leyefe
03-10-2008, 02:31 PM
The avm_transaction header defines that:
// In addition, it must also provide:
// function void copy( input T t );
// function bit comp( input T a , input T b );

The ovm_transaction header has nothing but a disclaimer - Apache license. The ovm class also contains many functions as compared to the avm class.

In addition, what is comp()? I can assume (not a good idea) that comp is short for compare. But compare is spelled out fully in the ovm_object class.

roger
04-25-2008, 06:56 AM
Hi, I am using the 0ovm_in_order_class_comparator in my scoreboard.
Anybody an idea why it reports a warning when two elements are not equal, and why not a fatal???

roger
04-25-2008, 07:15 AM
verbosity --> severity