Cadence stops support for importing packages in class ?

Compilation Errors, Did you know ...

I was compiling a piece of code

class myClass;
      import myEnum::*;

      …

endclass

when I got this warning

import myEnum::*;
|
ncvlog: *W,INOSTD (pkgEnum.sv,30|15): An import declaration shall not be used inside a class declaration.

ncvlog/INOSTD =
The SystemVerilog standard recently made a clarification regarding the use of imports inside
class declaration: using imports inside classes is not compliant with the 1800 standard.
The support of imports inside classes will be removed in a future release. The recommendation
is to use explicit full package references inside classes or move the imports outside the
class declaration.

Well, I think this sucks. Anyhow, here’s a nice article on the usage of packages and `includes.

http://blogs.mentor.com/verificationhorizons/blog/2010/07/13/package-import-versus-include/

PS : If you don’t like the *W messages in your compilation log, add “-nowarn INOSTD” as a compilation argument and it will stop showing you that particular warning.

that you can get more information on compilation errors ?

Did you know ...

My colleague asked me about this and I thought I’ll post it here. Let’s say you get an error like

ncvlog: *E,NOTCLM (myXtr.sv,62|29): Regrite_t is not a class item

You can do

% nchelp ncvlog NOTCLM

and you’ll get

nchelp: 12.20-s008: (c) Copyright 1995-2013 Cadence Design Systems, Inc.
ncvlog/NOTCLM =
The specified name is not an item (property or method, for example) in the class.

This works for ncelab as well

% nchelp ncelab <ERROR_CODE>