Creating PLI Applications Using TF and ACC Routines
Kluwer Academic Publishers eBooks · 2005
This chapter has presented two short examples which illustrate how PLI applications are created using the TF and ACC routine libraries in the PLI standard. The $hello PLI application showed how a Verilog simulation can execute another C program. The $show_value application illustrated how arguments can be passed from a Verilog simulation to a PLI application, and how the application can access information about the arguments. The principles illustrated by the $show_value example can be readily expanded to provide much more powerful and useful capabilities. In Chapter 14, the functionality of $show_value will be extended to create an application called $list_nets, which automatically finds all nets in a module and prints the values of each net. Another example in the same chapter extends $show_value to create $list_signals, which automatically finds all nets, regs and variables in a module and prints the values of each one. The next chapter presents much greater detail on how PLI application interact with Verilog simulations. Subsequent chapters in Part Two of this book will discuss the complete TF and ACC libraries, and include many examples of how the TF and ACC routines to create PLI applications which to interact with Verilog simulators.