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.

_______________________________________________
Gnucap-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnucap-devel

Reply via email to