See below for man page (as of Nov '25). The current version is available [[https://git.savannah.gnu.org/cgit/gnucap/gnucap-modelgen-verilog.git/tree/man/gnucap-mg-vams.1?h=develop|here]]. Relevant [[gnucap:projects:nlnet:verilogams|project page]]. Modelgen-verilog implementation notes are [[gnucap:manual:tech:modelgen|here]]. GNUCAP-MG-VAMS(1) Gnucap Modelgen GNUCAP-MG-VAMS(1) NAME gnucap-mg-vams - GNU Circuit Analysis Package .vams translator SYNOPSIS gnucap-mg-vams { [OPTIONS] [ACTIONS] } DESCRIPTION Gnucap-Modelgen is a translator tool in the Gnucap suite. It will trans‐ form Verilog-AMS models into C++ code implementing Gnucap component plu‐ gins. Basic usage (with bash, on a posix system) may look as follows. For more examples, see the examples directory. $ gnucap-mg-vams -I path/to/include -o mymodel.cc --cc mymodel.vams $ g++ `gnucap-conf --cppflags` -fPIC -shared mymodel.cc -o mymodel.so $ gnucap -a ./mymodel.so -a mgsim gnucap> ... The mgsim directory contains the plugins used when simulating modelgen models. The following options, actions and pragmas are supported, they are processed in the order specified at the command line. OPTIONS -I path Set preprocessor include path, relative to cwd. -D "name value" | -D name=value Set preprocessor constant. -o "filename" Send output to filename (default: stdout). --flag | --noflag Various flags, under construction, see mg_options.{h,cc}. Also available through `pragma during preprocessing. -a plugin Load plugin, add and replace functionality. Example plugin: mgopt/nonoise.so. ACTIONS --pp dump preprocessor output --dump dump contents as parsed --cc generate c++ file PRAGMAS Pragmas control the behaviour of the program. The preprocessor supports the `pragma command, and will act upon pragmas directed to "modelgen". --{pragma_name} enables pragma the way `pragma modelgen {pragma_name} does. But in the order specified at command line. --gen-module | --nogen-module Affects --cc. Generate (no) code for devices specified in terms of a "module". --gen-paramset | --nogen-paramset Affects --cc. Generate (no) code for devices specified in terms of a "paramset". --dump-module | --nodump-module Affects --dump. Output (no) source for "modules". --dump-paramset | --nodump-paramset Affects --dump. Output (no) source for "paramsets". --dump-annotate | --nodump-annotate Affects --dump. Annotate verilog code. Mostly for testing and de‐ bugging. --debug | --log | --trace Set error level to "debug", "log" or "trace" respectively. [..] see mg_options.h COMPILER FLAGS These may be passed to a/the C++ compiler supplementing `gnucap-conf --cppflags`. -O0, -O2 Turn on, off optimisation respectively. For details, consult your compiler manual. -g Include debugging symbols. For details, consult your compiler manual. -DNDEBUG Drop debugging code, essentially run time assertions. This will speed up execution significantly. -DTRACE_UNTESTED Discover test status. Untested code notification will be printed to standard error output. -DTRACE_ITESTED Similar, but notify about interactively tested code. EXAMPLES Basic Verilog-AMS models are included with this package, covering some of the primitives listed in Table E.1 of the LRM 2.4.0. For general usage, see examples directory shipped with modelgen-verilog source code. BUGS This is under construction. Expect bugs, see BUGS. AUTHOR Gnucap-mg-vams is being written by Felix Salfelder and Albert Davis with financial support from NLnet Next Generation Internet programme. This manual page was written by Felix Salfelder . For the full documentation, visit http://gnucap.org. Gnucap Project May 2023 GNUCAP-MG-VAMS(1)