Netlist File Reference

Purpose

Import a SPICE netlist from a file at runtime

Library

SPICE Components

Description

../../_images/netlist_file_reference.svg

This component is an alternative to the Netlist component. Instead of offering a netlist editor holding a hard copy of a previously imported netlist, this component imports netlists at runtime from a referenced file. See Netlist File Reference Component for a comparison against the Netlist component.

The Netlist File Reference dialog consists of five tabbed panes that are described below.

Reference

The Reference tab lets you specify a file, a type and a name for the netlist to be imported. During the initialization of a new simulation, the .subckt or .model (depending on the selected type) with the given name is automatically imported from the selected file. The import process works identical to the import functionality of the Netlist component (see Importing Netlists). File, type and name can be set via variables.

The file path can be absolute, relative to the current .plecs file or relative to any path specified as library search path in the preferences (see Library).

In contrast to the Netlist, detailed diagnostics are not shown. Should there be parsing errors while importing, the simulation will be aborted.

Terminals

In the Terminals tab, you need to define the nodes of the subcircuit that you wish to import. The node names in the table are compared against the nodes of the imported netlist. An error is thrown if they do not match. For each node, you must specify the name of the corresponding terminal in the schematic.

To move a terminal on the schematic, hold Shift and drag the terminal along the edges of the component.

Note

When importing a .model from a file, the import automatically generates a default .subckt containing a single element using the imported compact model description.

The node names are summarized in the following table.

Model type

Node names

Generated statement

D

+, -

D + - modelName

R

+, -

R + - modelName

C

+, -

C + - modelName

NMOS

d, g, s

M d g s s modelName

PMOS

d, g, s

M d g s s modelName

VDMOS

d, g, s

M d g s modelName

NPN

c, b, e

Q c b e modelName

PNP

c, b, e

Q c b e modelName

PJF

d, g, s

J d g s modelName

NJF

d, g, s

J d g s modelName

SW

+, -, c+, c-

S + - c+ c- modelName

VSWITCH

+, -, c+, c-

S + - c+ c- modelName

Probes

The Probes tab allows you to define probe signals based on the Netlist component’s terminals. In contrast to the Netlist component, only terminal-based probes are available.

Parameters

You can add parameters here that will be passed on to the imported subcircuit (see (X) Subcircuit Instance Statement). The values of these parameters can be set via variables. A warning is shown when a parameter is passed to a .subckt but is not defined following params: in the imported subcircuit.

Icon

You can define a custom icon for your Netlist File Reference component via this tab. Details regarding the supported Lua syntax can found in the description of the Mask Icon.

See also

Using PLECS Spice

How to use PLECS Spice.

Netlist

Alternative component that allows local in-place editing of a netlist.

Netlist File Reference Component

Comparison between the Netlist File Reference and the Netlist component.