RSpice

RSPICE / DOCS / VERILOG-A

Verilog-A.

In RSpice a Verilog-A module is a view of a cell, beside its schematic and symbol. Create one or import a file, compile it in the Design workspace, and place it like any other cell.

NEW
File › New Verilog-A device…
IMPORT
File › Import › Verilog-A…
COMPILE
Design › Compile Verilog-A
LANGUAGE
Verilog-AMS, LRM 2.4; .va and .vams

01 / CREATE A DEVICE

A new cell with a starter module and a symbol.

  1. Choose File › New Verilog-A device….
  2. Pick the Library and type a Cell name (letters, digits and underscores).
  3. List the Ports, for example inp:in inn:in out:out vdd vss. A direction after the colon is in, out or inout, and a bus is written like d[7:0].
  4. Choose Create. The cell gets a veriloga view holding a starter module, and a symbol generated from the module's ports.

To add a Verilog-A view to an existing cell instead, use File › New cell view… and choose the Verilog-A view type.

02 / IMPORT A FILE

One cell per top module.

File › Import › Verilog-A… reads a source file. Each top module the file declares becomes a cell with a veriloga view that owns a copy of the file. Choose the library, review what the import creates, and choose Create cells.

03 / EDIT AND COMPILE

The source editor in the Design workspace.

A Verilog-A view opens in the Design workspace as a source editor, and the inspector shows the module's facts: its ports, its symbol, and, once compiled, the parameters an instance takes with their type, default, range and units.

  • Design › Compile Verilog-A compiles the view. The status reads Compiling…, then the errors and advisories found, or Compile failed; after an edit it reads Edited since the last compile. Diagnostics beyond the first few are listed in View › Problems.
  • When the module's ports differ from the cell's schematic or symbol, the editor says so, and Update symbol brings the symbol's pins in line.
  • Replace source from file swaps one file of the view's source for a file from disk. The dialog says whether the text it replaces can be restored from the source's revision history.

04 / BUILD SETTINGS

Design › Build settings…

How the open Verilog-A view compiles. Save keeps the settings; Save & compile also compiles.

SETTINGCHOICES
Entry moduleWhich top module the view compiles; offered only when the source declares more than one.
TargetsGenerated Rust; Native x86-64 JIT.
If a target failsUse the interpreter, or Fail the compile.
Include pathsRelative paths inside the source, such as include/models.
Defines and undefinesPreprocessor symbols, written NAME or NAME=value.
ChecksUnits and ranges, Convergence, Discontinuities, Hidden state, Portability.

05 / PLACE IT

Use the module on a schematic.

Once compiled, the editor reports that the cell is ready to place and offers Place in the open schematic. The cell can also be placed from Design › Place › Instance… (Shift+I) like any other cell.

06 / GENERATED MODELS

43 compact models, compiled ahead of time.

Compact-model families with redistributable Verilog-A sources, such as BSIM-CMG, PSP104, HICUM and MEXTRAM, are generated to Rust and compiled into builds made with the generated-veriloga-catalog feature. A deck reaches one by its model name on an X line, or through an ordinary element whose .model card names the model's type or a LEVEL routed to it. Reaching a model proves it is wired in, not that it is numerically qualified; see validation for what has been compared.

Beyond the analog subset, RSpice compiles the digital and real-number parts of Verilog-AMS too, so digital and wreal modules simulate alongside the analog solve, with connect modules inserted where a deck node joins analog and discrete ports.

07 / COMMAND LINE

Compile a module on its own.

rspice compile-va compiles an external Verilog-A model without the application. The source repository's models/veriloga/ holds examples.