Vrq plugins are independently compiled as standalone DLLs.
A detail description of how to create plugins can be found in the following sections:
Vrq plugins are created by creating a subclass of type CBackend. This class should then be compiled in a standalone dll and placed in the the plugin directory.
The input to a plugin is a vector of CElement. Each CElement represents a unit of compilation. Each unit can be as trivial as a module, the code in a file or the entire design.
The output of a plugin is a vector of CElement. Each CElement again represents a unit of compilation. Note the number of input elements need not match the number of output elements. If a plugin does not modify the compilation units the plugin output may have no elements. In this case the input vector is passed to the next plugin in the processing pipeline.
A code in a compilation unit is represented by a tree of CNode. Each node of the tree represents a statement or operation. Short cut constructors should be used to create nodes. A list of node types can be found in Parse Tree Nodes . A list of constructors can be found in Node Constructors . A list of utility routines for operating on CNode can be found in Node Utilities . A list of general purpose function can be found here: Utility Routines .
Parse tree nodes may point to auxillary objects that represent elements of the parsed code such as variables, etc. See the following list of classes:
Additionally these class provide support functions for object info:
The plugin pipeline is specified on the command line using the on the command line. The output of one plugin is applied to the next.
In the case that a plugin produces an output vector but there are no remaining plugins to process the output, the dump tool is invoked to convert the parse trees back to textual verilog.
Example plugins can be found here:
This class should then be compiled in a standalone dll and placed in the default plugin directory. The default plugin directory configured at vrq build time can be determined by executing: vrq --pkglibdir
Alternately the plugin directory can be overriden by setting the environment variable PLUGIN_DIR with a ':' seperated list of paths to search.