From 1c26bcef2d5604e3400e922fb4f5381d3ae45496 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 23 Oct 2019 10:04:58 +0100 Subject: [PATCH] Update vpi.txt. --- vpi.txt | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/vpi.txt b/vpi.txt index 27cfb3830..d19a2f28a 100644 --- a/vpi.txt +++ b/vpi.txt @@ -4,13 +4,16 @@ HOW IT WORKS The VPI interface for Icarus Verilog works by creating from a collection of PLI applications a single vpi module. The vpi module includes compiled code for the applications linked together (with any -other libraries that the applications need) into a module with a -single exported symbol, the vlog_startup_routines array. +other libraries that the applications need) into a module with two +exported symbols, the vpip_set_callback function and the +vlog_startup_routines array. -The product that wishes to invoke the module (normally at run time) -loads the module, locates the vlog_startup_routines table, and calls -all the startup routines contained in that table. It is possible for a -product to link with many modules. In that case, all the modules are +The product that wishes to invoke the module (normally at run time) loads +the module, locates and calls the vpip_set_callback function to pass the +the module a jump table that allows the module to access the VPI routines +implemented by the product, then locates the vlog_startup_routines table +and calls all the startup routines contained in that table. It is possible +for a product to link with many modules. In that case, all the modules are linked in and startup routines are called in order. The product that uses vpi modules uses the environment variable @@ -19,9 +22,11 @@ module search path. When a module is specified by name (using whatever means the product supports) the module search path is scanned until the module is located. -The special module name "system.vpi" is part of the core Icarus -Verilog distribution and includes implementations of the standard -system tasks/functions. +The special module names "system.vpi", "v2005_math.vpi", "v2009.vpi", +and "va_math.vpi" are part of the core Icarus Verilog distribution and +include implementations of the standard system tasks/functions. The +additional special module names "vhdl_sys.vpi" and "vhdl_textio.vpi" +include implementations of private functions used to support VHDL. COMPILING A VPI MODULE @@ -40,4 +45,3 @@ This tracing is pretty verbose, so you don't want to run like this normally. Also, the format of the tracing messages will change according to my needs (and whim) so don't expect to be able to parse it in software. -