(筆記) t_vpi_value struct (SOC) (Verilog PLI)

Abstract
寫Verilog PLI,最常遇到的就是t_vpi_value這個struct, 每次都要特別翻書,因此特別記下來。

Introduction

1 typedef struct t_vpi_value {
2   PLI_INT32 format; /* vpiBinStrVal,   vpiOctStrVal,
3                        vpiDecStrVal,   vpiHexStrVal,
4                        vpiScalarVal,   vpiIntVal,
5                        vpiRealVal,     vpiStringVal,
6                        vpiVectorVal,   vpiTimeVal,
7                        vpiStrengthVal, vpiSuppressVal,
8                        vpiObjTypeVal */
9   union {
10     PLI_BYTE8 *str;                     /* if any string format */
11     PLI_INT32 scalar;            /* if vpiScalarVal: one of vpi0, vpi1,*/
12                                  /*  vpiX, vpiZ, vpiH, vpiL, vpiDontCare*/
13     PLI_INT32 integer;                  /* if vpiIntVal format */
14     double real;                        /* if vpiRealVal format */
15     struct t_vpi_time *time;            /* if vpiTimeVal */
16     struct t_vpi_vecval *vector;        /* if vpiVectorVal */
17     struct t_vpi_strengthval *strength; /* if vpiStrengthVal */
18     PLI_BYTE8 *misc;                    /* not used */
19   } value;
20 } s_vpi_value, *p_vpi_value;

posted on 2009-05-06 17:36  真 OO无双  阅读(8551)  评论(0编辑  收藏  举报

导航