Re: errata/621: 19.3.1, one-line comments in macro arguments

From: Shalom.Bresticker@freescale.com
Date: Wed Sep 15 2004 - 00:40:00 PDT

  • Next message: Karen Pieper: "No ETF Meeting Monday"

    The following reply was made to PR errata/621; it has been noted by GNATS.

    From: Shalom.Bresticker@freescale.com
    To: Brad Pierce <Brad.Pierce@synopsys.com>
    Cc: etf-bugs@boyd.com
    Subject: Re: errata/621: 19.3.1, one-line comments in macro arguments
    Date: Wed, 15 Sep 2004 10:46:37 +0300 (IDT)

     It seems to me that you could not even embed a block comment into the macro
     via its argument. The block comment will be stripped out before the macro
     is substituted as well.
     
     Note that the BNF shows "actual argument" as "expression".
     Not everything can be used as an argument. Only expressions.
     
     Shalom
     
     
    > It's not clear from 19.3.1 whether one-line comments in a macro
    > argument are stripped out before the argument is substituted into
    > the text of the macro. I think they should be, for the same reasons
    > that one-line comments are not included in the text of the macro.
    >
    > In my opinion, if you want to embed a pragma in a macro argument,
    > then you need to use a /* block comment */.
    >
    > `define LOOP(I,X) for(I=0;I!=1;I=1) begin X end
    > module m;
    > reg i;
    > always
    > `LOOP( i,
    > /*
    > This is part of the begin-end block.
    > */
    > // Is this part of the begin-end block????
    > /*
    > This is part of the begin-end block.
    > */
    > )
    > endmodule
     
     --
     Shalom Bresticker Shalom.Bresticker @freescale.com
     Design & Verification Methodology Tel: +972 9 9522268
     Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890
     POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478
       
     [ ]Freescale Internal Use Only [ ]Freescale Confidential Proprietary
     



    This archive was generated by hypermail 2.1.4 : Wed Sep 15 2004 - 00:40:32 PDT and
    sponsored by Boyd Technology, Inc.