View Full Version : Migrating from AVM3.0 to OVM1.0
rahulv.shah
01-17-2008, 09:51 PM
Hi All,
One of the way to migrate existing AVM3.0 code to OVM1.0 code is to replace "avm_" with "ovm_". OVM is 100% backward compatible. The migration works well with the name change, but we found one issue as listed below
Changed return type of clone() function:
AVM:
virtual class avm_transaction;
pure virtual function avm_transaction clone();
OVM:
virtual class ovm_transaction extends ovm_object;
virtual class ovm_object extends ovm_void;
extern virtual function ovm_object clone();
There are few other small differences, but since they are in the classes which are suppose to be invisible for the user hence it should not matter.
Regards
Rahul
jggray
01-29-2008, 09:30 AM
I'm trying to migrate the avm cookbook 07_complete_testbenches/01_scoreboard_sv example. I changed the avm compile_sv.f file to point to the ovm src directory and to compile ovm_pkg.sv. The p2s_pins_if.sv file is included as a file to compile but I get the following warning repeated a number of times
svpp: *W,MISDECL: unknown type 'p2s_pins_if' in file=/home..../p2s_bit_monitor.svh, line=25 Skipping.
This is after, apparently successfully, processing the file p2s_pins_if.sv only a couple of lines above.
Later on a number of errors are generated with regard to other p2s_ items the first of which is
typedef class p2s_transaction;
|
ncvlog: *E, TYDMSC (./INCA_libs/..../_p2s_transaction.svi,107|28): The class specified in the typedef was never declared.
Again after processing p2s_transaction.svh successfully.
Any ideas I can try?
John
divyeshg
01-29-2008, 08:49 PM
Hi John,
are you running example using irun ?
As ovm1.0 examples are causing compliation errors when run with ncvlog.
Similarly avm example should be run with irun command.
dave_59
01-30-2008, 12:04 AM
Hi All,
One of the way to migrate existing AVM3.0 code to OVM1.0 code is to replace "avm_" with "ovm_". OVM is 100% backward compatible. The migration works well with the name change, but we found one issue as listed below
Changed return type of clone() function:
AVM:
virtual class avm_transaction;
pure virtual function avm_transaction clone();
OVM:
virtual class ovm_transaction extends ovm_object;
virtual class ovm_object extends ovm_void;
extern virtual function ovm_object clone();
There are few other small differences, but since they are in the classes which are suppose to be invisible for the user hence it should not matter.
Regards
Rahul
Rahul,
This is OK because avm_transaction is just defined as a typedef for ovm_object; so the virtual function prototypes are equivalent. The fact that clone() is no longer pure is not a problem for backward compatibility.
Dave
jggray
01-30-2008, 02:03 AM
Hi,
Yes I am using irun, apparently that's the only way to get svpp to pre-process the SystemVerilog, and it works fine on a lot of the examples supplied with OVM 1.0, I haven't run them all. But I'm trying to run examples from the MentorGraphics AVM Cookbook, hence a post on this thread.
John
pdk111
05-07-2008, 02:37 PM
On a somewhat related topic, I am working through an example of migrating an AVM
test environment to OVM using both Questa and Cadence.
It appears that in the avm_compatibility.svh file, many of the macros are ifndef'd out
for Cadence. What is the reasoning for this? Is there a fundamental issue with
these constructs and the Cadence simulator, requiring me to change the source?
Thanks
Patrick
dave_59
05-07-2008, 02:44 PM
The problem is the Cadence flow cannot handle macros that create parametrized classes.
Dave
pdk111
05-08-2008, 05:54 AM
So isn't the obvious solution to expand out the avm_compatibility.svh file to
not use macros. Is this expanded out file available somewhere, or do I need to type
from scratch.
I must be missing something?
Thanks
Patrick
Powered by vBulletin™ Version 4.0.3 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.