[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openip] Vera Query



Hello Friends,

In Vera, I have some queries.

Suppose there are two classes defined; with one task in each, say, 
class1 has a task defined task1,
 and class2 has a task defined as task2.

Now, can task1 be called in task2? 

In class2, I have declared an object, say obj1 of type class1, as below:
        	          class class2 {
		 class1 obj1;
		     ----
		     ----
	                task2 ( ) {
                                      -----
		  ----
                            	 obj1.task1( );
			
	                 } //end task2

	          }//end class2

Then I called the task1, of class1, as shown above.
Now the query is that, is this allowed or not? Is there any better way of 
calling task1?

If say, there are more variables and other data types defined in class1. 
Then just by defining an 
object "obj1" of class1, as shown above, do the memory is allocated for 
all these variables and other 
data types in class1?? Or the memory is allocated only for the task1 
which called as shown in the code 
example shown above?

If instead of this, along with defining the object "obj1" it is 
assigned "new" then what difference does 
it make? Like this,
	
        	          class class2 {
		 class1 obj1 = new;	////change made
		     ----
		     ----
	                task2 ( ) {
                                      -----
		  ----
                            	 obj1.task1( );
			
	                 } //end task2

	          }//end class2

Thanks in advance,

Regards,

VLSI CHAMP....
--
To unsubscribe from openip mailing list please visit http://www.opencores.org/mailinglists.shtml