Re: language plugin help

al davis <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.