Depending on the design structure and your port mapping requirements, you can apply port mapping inside an amsd block in two ways:
-
Implicit portmap: For SPICE-in-Middle and SPICE-on-Leaf design flows in Verilog-AMS, port mapping can be achieved without using the
portmapstatement. Only theconfigstatement would suffice. The tool automatically generates implicit portmaps, with default values, for the subcircuits or modules referred to in theconfigcard. In the autogenerated portmap statement, the cell name used in theconfigstatement is used as the SPICE subcircuit name or the Verilog module name, and the default values are be assumed for all other parameters of theportmapstatement.
Examples- If the
configstatement isconfig cell=divider use=hdl, the followingportmapstatement would be autogenerated.portmap module=divider - If the
configstatement isconfig cell=analog_top_a use=spice, the followingportmapstatement would be autogenerated.portmap subckt=analog_top_aThe tool assumes the followingportmapparameter default values for autogenerating skeletons, commfile, or the portbind file:autobus=yesbusdelim="[] <>"refformat=veriloginterconnect=mixed
- If the
- Explicit portmap: In most situations,
portmapandconfigstatements are required in pairs to specify cell bindings. One pair ofportmapandconfigstatements can bind multiple instances of the same cell to either a SPICE port in a Verilog block or a Verilog port in a SPICE block.
Example portmap subckt=foo autobus=yes portcase=lower busdelim=_ refformat=verilog config inst="top.inst1 top.inst2 top.inst3" use=spice Here, inst1, inst2, and inst3 are instances of foo in the Verilog module top, which needs to be configured to SPICE.
