A "representation stop" mechanism indicates what a module call represents to different simulator kernels or secondary tools. In particular it allows netlists translated from Spice to be used with different simulator models for transistors or used in a digital simulator with switch level models.
An official "representation stop" mechanism also allows different versions to be simultaneously visible (unlike `ifdef) and declares them to be different views of the same object which makes it is easier for a smart tool to check that they are consistent.
<repstop> ::= (extern module|macromodule)
[<simulator class::>]<module name> [(<ports>)];
....
See also the "external module" proposal.
extern module spice::nmos(drain,gate,source,back);
parameter model = "NMOS3";
parameter l = length ; // translate parameter
parameter w = width ; // translate parameter
// this component is primitive of the simulator
endmodule;
The simulator would use the parameters "model","l" and "w" as stated and calculated
from the actual instance.
Alternative "digital" transistor version of the above for pure digital simulation:
macromodule digital::nmos(drain,gate,source,back);
rnmos(drain, source, gate); // use digital primitive
endmodule;
Simulators and tools would ignore class definitions that they do not understand, and
would default to a particular behavior as directed by the user (or Verilog 2000
configuration directives, considering the "simulator class" as the view), if they
can handle more than one.
<repstop> ::= repstop <module name> [(<ports>)];
{<parm>}
{<alias>{[,<alias>]}} endrepstop
<alias> ::= alias [<tool>::]<alt module name> [(<alt ports>)];
{<parm>} endalias
See message #104 for an
example.
#include <repstop.h>
Example contents:
repstop sp_nmos(d,g,s,b);
alias spectre::mos(d,g,s,b);
parameter device = "NMOS";
parameter model = "BSIM3.3";
endalias;
endrepstop
A translated Spice netlist may include a default rep-stop:
repstop sp_nmos(d,g,s,b);
parameter length;
alias spice::mos(d,g,s,b); // if we are handling spice
parameter model = "NMOS3";
parameter l = length ; // translate parameter
endalias;
endrepstop
The tool 'spectre' would use the spectre definition, others may
take the 'spice' definition. As with proposal A, simulators and tools
would ignore class definitions that they do not understand, and would default
to a particular behavior as directed by the user or configuration.
"Aliases" without a tool specified are potential substitute (macro) modules that tools should search for in the order presented. Any module reference that is not a known primitive or described in a repstop would be illegal.