Re: reducing warning messages

From: Kevin Cameron <Kevin.Cameron_at_.....>
Date: Wed Jul 02 2008 - 14:24:20 PDT
I'd say just (a) of that list. Generally in C/C++ you do an #ifdef based 
on the compiler version, and I'd probably do that for this too e.g.:

    (*
    `ifdef __ADMS__
     type="instance" ask="yes"
    `else
    ...
    ` endif
    *)

or

    `ifdef __ADMS__
    `define ATTRIBUTES(a,b) type=a ask=b
    `else
    `define ATTRIBUTES(a,b)
    `endif

    ....

    (* `ATTRIBUTES("instance","yes") *)

[Is a null attribute list allowed?]

Something to argue about with the vendors rather than special casing in 
the language (IMO).

It might be a good idea to start adding "standard practice" items to the 
Wiki which people can use for reference.

If you want a syntax suggestion: you could make the attribute syntax 
recursive so that you can specify extra stuff like the application it's 
intended for -

     (* type (* owner="ADMS") ="instance" ask (* owner="ADMS") ="yes" *)
       // attributes only for ADMS

- that also translates into some other attribute schemes.

Kev.

Geoffrey.Coram wrote:
> In developing Verilog-A compact models, I sometimes have to introduce
> special syntax for one compiler to get the model to run, but the same
> syntax causes trouble in another.
>
> For example, ADMS likes to have attributes like
>  (* type="instance" ask="yes" *)
> but some compilers issue warnings to tell me that they don't recognize
> the attributes "type" and "ask" -- perhaps in case I mis-typed some
> attribute that they do recognize.
>
> Once I have reviewed these warnings, I would like to suppress them when
> I distribute the model for other users.  What is the correct mechanism
> to suppress these warnings?
>
> a) a command-line argument to the simulator: this is not ideal, because
>    the user might need to review warnings for her own modules
>
> b) a "magic comment" like //SUPPRESS_WARNINGS at the top of the file
>
> c) an attribute like (* suppress_warnings *) module r3_cmc(n1,nc,n2);
>
> d) a macro like `define suppress_warnings
>
> These mechanisms won't be in the AMS LRM, but it would be nice to have
> some simulator vendors agree.
>
> -Geoffrey
>


-- 
True Circuits Inc. - http://www.truecircuits.com
Tel: (650) 949 3400 Ext 3415


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Jul 2 14:25:04 2008

This archive was generated by hypermail 2.1.8 : Wed Jul 02 2008 - 14:25:57 PDT