[sv-bc] [sv-ec] Query regarding Macro substitution

From: Steven Sharp <sharp_at_.....>
Date: Thu Jun 29 2006 - 11:20:34 PDT
Found the original email on this:


------------- Begin Forwarded Message -------------

X-Authentication-Warning: server.eda-stds.org: majordom set sender to 
owner-sv-ec@eda-stds.org using -f
From: "Kausik Datta" <kausikd@cal.interrasystems.com>
To: <sv-ec@eda-stds.org>
Subject: [sv-ec] Query regarding  Macro substitution 
Date: Wed, 21 Jun 2006 18:10:54 +0530
MIME-Version: 1.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
thread-index: AcaVL++Kq6Aj/ih/SDCHZtG5NXjMPQ==
X-Virus-Scanned: ClamAV 0.88/1558/Wed Jun 21 02:31:22 2006 on 
server.eda-stds.org
X-Virus-Scanned: ClamAV 0.88/1558/Wed Jun 21 02:31:22 2006 on 
server.eda-stds.org
X-Virus-Status: Clean
X-pstn-levels: (S:99.90000/99.90000 R:95.9108 P:95.9108 M:96.8350 C:98.4741 )
X-pstn-settings: 3 (1.0000:1.0000) s gt3 gt2 gt1 r p m c 
X-pstn-addresses: from <kausikd@cal.interrasystems.com> [145/6] 
X-Received: By mx-sanjose2.Cadence.COM as k5LCftgb017184 at Wed Jun 21 05:41:55 
2006


------------- End Forwarded Message -------------


Steven Sharp
sharp@cadence.com


Hi,

LRM is not clear about how "``" will be interpreted within escaped
identifier.
I have the  query on how the macros defined in the following testcase will
look like after substitution.

Thanks
Kausik


Kausikd: cat mag1.v 

`timescale 10s/100ns

`define X(f) \m[ake_``sd    

`define Y    \m[ake_``sd    

module M;

    `X(kd) I1();
    `Y     I2();

endmodule


Output of VCS is as follows, but I think that is not correct:

Kausikd: cat output.v 

`timescale 10 s / 100 ns
module M;

        \m[ake_sd  I1();
        \m[ake_``sd  I2();
endmodule





 

Query regarding Macro substitution

Hi,

LRM is not clear about how "``" will be interpreted within escaped identifier.
I have the  query on how the macros defined in the following testcase will look like after substitution.

Thanks
Kausik


Kausikd: cat mag1.v

`timescale 10s/100ns

`define X(f) \m[ake_``sd   

`define Y    \m[ake_``sd   

module M;

    `X(kd) I1();
    `Y     I2();

endmodule


Output of VCS is as follows, but I think that is not correct:

Kausikd: cat output.v

`timescale 10 s / 100 ns
module M;

        \m[ake_sd  I1();
        \m[ake_``sd  I2();
endmodule





<<...>>

Received on Thu Jun 29 11:20:41 2006

This archive was generated by hypermail 2.1.8 : Thu Jun 29 2006 - 11:20:57 PDT