Wednesday, February 08, 2012     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: Declaring class outsside program block
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
sundar_80
Posts: 20
Online: User is Offline
7/28/2007 3:10 AM  
Hello, Is it possible to declare class outside the program block like bellow? class gen; endclass program test; endprogram;
sundar_80
Posts: 20
Online: User is Offline
7/28/2007 3:14 AM  
Sorry for my earlier code for not following the rules, i have correct the format of the code now.

 class gen; 
 endclass 
 program test; 
 endprogram;  
Sundar
ajeetha
Posts: 97
Online: User is Offline
7/28/2007 4:40 AM  
Sundar,
 >> Is it possible to declare class outside the program block like bellow?

Yes, language allows it though I personally discourage it - atleast encapsulate them under packages. I know some debug tools today work best if classes are declared inside program.

HTH
Ajeetha, CVC
www.noveldv.com  
sundar_80
Posts: 20
Online: User is Offline
7/29/2007 11:28 PM  
Hello Ajeetha,
Thanks a lot for your mail, as you mentioned its always better to encapsulate it in package, i also feel that's the good practice.
But one query, if a class is encapsulated inside package is it possible to use the class itself, as far my knowledge about SV(i have very little knowledge) only task defined in the package can be used not the class is that correct?

Sundarraj
jagvinder
Posts: 8
Online: User is Offline
7/29/2007 11:34 PM  
Hi Sundar,
You can encapsulate the class inside a package and whenever you want to use this class, just "import" that package. You can import the package using following

import ::*;

then you can easily use the class and its all properties and methods which were declared in that package.


regards
Jagvin
jagvinder
Posts: 8
Online: User is Offline
7/29/2007 11:36 PM  
The command for importing the package is

import package_name::*;

sorry, i missed it in last mail.


regards
Jagvinder
sundar_80
Posts: 20
Online: User is Offline
7/29/2007 11:53 PM  
Hello Jagvinder,
Thanks a lot for your mail. I will try to use as you mentioned.

Sundarraj
Posting to forums is available to community members only.
Login or Register

Forums > Functional Verification > SystemVerilog > Declaring class outsside program block


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.