gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] language plugin help


From: al davis
Subject: Re: [Gnucap-devel] language plugin help
Date: Sun, 15 Apr 2012 17:34:16 -0400
User-agent: KMail/1.13.5 (Linux/2.6.32-5-amd64; KDE/4.4.5; x86_64; ; )

On Sunday 15 April 2012, al davis wrote:
> Maybe even ...
> 
> module RESISTOR (\2, \1);
>   parameter real r;
>   resistor #(.r(r)) R1 (\2, \1);
> endmodule
> 
> This isn't the permanent answer because it adds another level
> of  indirection, but maybe it will provide some insight.

I think the answer is "macromodule".

In the standard, section 6.2, it says ....

"The keyword macromodule can be used interchangeably with the 
keyword module to define a module.
An implementation may choose to treat module definitions 
beginning with the macromodule keyword
differently."

In Ken Kundert's book, page 226, he says:

"An implementation can choose to flatten the hierarchy of 
macromodules for efficiency".

In this case, what would be required is a simple substitution, 
where to flatten obviously what is needed.

A set of these macros could be in an include file that maps to a 
particular symbol library.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]