User guide

18-2
DirectC Interface
Similarly you can use DirectC to develop applications to run with VCS
to which you can pass pointers to the location of simulation values
for your design.
DirectC is an alternative to, but not a replacement for, the PLI. You
can do things with the PLI that you cannot do with DirectC. For
example there are PLI TF and ACC routines to implement a callback
to start a C/C++ function when a Verilog signal changes value. You
cannot do this with DirectC.
You can use direct C/C++ function calls for existing and proven C
code as well as C/C++ code that you write in the future. You can also
use them without much rewriting of, or additions to, your Verilog code.
You call them like you call (or enable) a Verilog function or Verilog
task.
This chapter describes the DirectC interface in the following sections:
Using Direct C/C++ Function Calls
Using Direct Access
Using Abstract Access
Enabling C/C++ Functions
Environment Variables
Extended BNF for External Function Declarations