logo资料库

The Verilog PLI Handbook.pdf

第1页 / 共644页
第2页 / 共644页
第3页 / 共644页
第4页 / 共644页
第5页 / 共644页
第6页 / 共644页
第7页 / 共644页
第8页 / 共644页
资料共644页,剩余部分请下载后查看
Front-cover
Front-matter
Dedication
Table of Contents
About the Author
List of Examples
Foreword
Acknowledgments
Introduction
CHAPTER 1 Creating PLI Applications Using VPI Routines
CHAPTER 2 Interfacing VPI Applications to Verilog Simulators
CHAPTER 3 How to Use the VPI Routines
3.1 specification of $show_all_nets and $show_all_signals
3.2 The VPI routine library
3.3 Advantages of the VPI library
3.4 Verilog HDL objects
3.4.1 The vpiHandle data type
3.4.2 Object relationships
3.5 Obtaining object handles
3.5.1 Obtaining ahandle for a one-to-one relationship
3.5.2 Obtaining a handle for a one-to-many relationship
3.5.3 Comparing VPI handles
3.6 Accessing the arguments of asystem task/function
3.7 Printing messages from VPI applications
3.8 Accessing object properties
3.8.1 Object type properties
3.8.2 Object name properties
3.9 Reading the logic values of Verilog objects
3.10 Reading the current simulation time
3.11 Controlling simulation from PLI applications
3.12 A complete PLI application using VPI routines
3.13 Obtaining handles for reg and varibale data types
3.13.1 Acomplete PLI application for $show_all_signals
3.14 Obtaining a handle to the current hierarchy scope
3.15 Obtaining handles to multiple task/function arguments
CHAPTER 4 Details about the VPI Routine Library
4.1 PLI application performance considerations
4.2 The VPI string buffer
4.3 VPI error handling
4.4 VPI object diagrams
4.5 Obtaining handles for objects
4.5.1 Traversing one to one relationships
4.5.2 Traversing one to many relationships
4.5.3 When to use vpi_free_object() on iterator handles
4.5.4 Obtaining intermodule path object handles
4.5.5 Obtaining object handles using an object's name
4.5.6 Obtaining object handles using an object's index number
4.5.7 Obtaining handles for reg, variable and net arrays
4.6 System task and system function objects
4.6.1 System task/function arguments
4.6.2 Multiple instances of system tasks and system functions
4.6.3 Obtaining a handle for system task/function instance
4.6.4 Accessing the arguments of system tasks and system functions
4.7 Storing data for each instance of a system task/function
4.8 Traversing Verilog hierarchy using object relationships
4.9 Writing messages to files
4.10 Reading and using simulation times
4.11 User-defined invocation options
4.12 Controlling Simulations
CHAPTER 5 Reading and Modifying Values Using VPI Routines
5.1 Accessing objects which have logic values
5.2 Reading object logic values
5.2.1 Working with a 4 logic value multiple strength level system
5.2.2 The vpi_get_value() routine
5.2.3 Reading 2 state logic as 32 bit c integers
5.2.4 Reading 2 state logic as C doubles
5.2.5 Reading Verilog string values into C strings
5.2.6 Reading 4-state logic as c strings
5.2.7 Reading verilog 4-state logic vectors as encoded a val/bval pairs
5.2.8 Representing Verilog strength values in C
5.2.9 Reading verilog time variables
5.2.10 Reading verilog values without determining the verilog data type
5.3 Writing values to Verilog objects
5.4 Returning logic values of system function
5.5 Reading and writing automatic variables
5.6 Reading IEEE 1364-2001 verilog attributes
5.7 Reading IEEE 1364-1995 specparam constant attributes
5.8 Accessing verilog net, reg, memory and arrays
5.9 Reading and modifying delay values
5.9.1 Verilog objects which have delay values
5.9.4 Writing delay values into an object
CHAPTER 6 Synchronizing to Simulations Using VPI Callbacks
CHAPTER 7 Interfacing to C Models Using VPI Routines
CHAPTER 8 Creating PLI Applications Using TF and ACC Routines
CHAPTER 9 Interfacing TF/ACC Applications to Verilog Simulators
CHAPTER 10 How to Use the TF Routines
CHAPTER 11 Reading and Writing Values Using TF Routines
CHAPTER 12 Synchronizing toSimulations Using Misctf Routines
CHAPTER 13 Interfacing to C Models Using TF Routines
CHAPTER 14 How to Use the ACC Routines
CHAPTER 15 Details on the ACC Routine Library
CHAPTER 16 Reading and ModifyingValues Using ACC Routines
CHAPTER 17 Using the Value Change Link (VCL)
CHAPTER 18 Interfacing to C Models Using ACC Routines
The Verilog PLI Handbook A User's Guide Comprehensive Reference Verilog Programming Language Interface and on the Second Edition
THE KLUWER INTERNATIONAL SERIES IN ENGINEERING AND COMPUTER SCIENCE
The Verilog PLI Handbook A User’s Guide and Comprehensive Reference on the Verilog Programming Language Interface Second Edition by Stuart Sutherland Sutherland HDL, Inc. KLUWER ACADEMIC PUBLISHERS NEW YORK, BOSTON, DORDRECHT, LONDON, MOSCOW
CD-ROM available only in print edition. eBook ISBN: 0-306-47665-7 0-7923-7658-7 Print ISBN: ©2002 Kluwer Academic Publishers New York, Boston, Dordrecht, London, Moscow Print ©2002 Kluwer Academic Publishers Dordrecht All rights reserved No part of this eBook may be reproduced or transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without written consent from the Publisher Created in the United States of America Visit Kluwer Online at: and Kluwer's eBookstore at: http://kluweronline.com http://ebooks.kluweronline.com
Dedication To my wonderful wife, LeeAnn, and my children: Ammon, Tamara, Hannah, Seth and Samuel
Table of Contents Dedication Table of Contents About the Author List of Examples Foreword Acknowledgments Introduction Intended Audience: The IEEE 1364 Verilog PLI standard The history of the Verilog PLI 1985: The TF routines 1988: The ACC routines 1990: The OVI PLI 1.0 standard 1993: The OVI PLI 2.0 standard 1995: The IEEE 1364-1995 PLI standard and VPI routines 2001: The IEEE 1364-2001 PLI standard Ambiguities in the Verilog PLI standard Organization of this book About the PLI examples in this book Other sources of information v vii xv xvii xxi xxiii 1 1 2 2 2 3 3 3 4 4 5 5 6 7
viii Using The Verilog PLI Part One: The VPI Portion of the Verilog PLI Standard Creating PLI Applications Using VPI Routines CHAPTER 1: 1.1 1.2 1.3 1.4 1.5 The capabilities of the Verilog PLI General steps to create a PLI application User-defined system tasks and system functions The $hello PLI application example The $show_value PLI application example Interfacing VPI Applications to Verilog Simulators CHAPTER 2: 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 General PLI terms as used in this book System tasks and system functions Instantiated Verilog designs How PLI applications work calltf routines compiletf routines sizetf routines VPI Simulation callback routines PLI routine inputs and outputs A complete system function example — $pow Interfacing PLI applications to Verilog simulators Using the VPI user_data field Compiling and linking PLI applications How to Use the VPI Routines CHAPTER 3: 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 Specification of $show_all_nets and $show_all_signals The VPI routine library Advantages of the VPI library Verilog HDL objects Obtaining object handles Accessing the arguments of a system task/function Printing messages from VPI applications Accessing object properties Reading the logic values of Verilog objects Reading the current simulation time Controlling simulation from PLI applications A complete PLI application using VPI routines Obtaining handles for reg and variable data types Obtaining a handle to the current hierarchy scope Obtaining handles to multiple task/function arguments 11 11 13 14 15 19 27 27 29 31 34 36 37 39 41 42 42 46 51 53 55 55 56 57 59 62 65 66 67 69 71 73 74 78 85 91
分享到:
收藏