⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 veriuser.h

📁 你自己漫漫理解吧
💻 H
📖 第 1 页 / 共 2 页
字号:

/*
 _______________________________________________________
 |
 |       Verilog Release Number   :   1.6a.4
 |                    File Name   :   veriuser.h
 |                      SCCS ID   :   5.2
 |     SCCS Delta Creation Date   :   11/8/91
 |     SCCS Delta Creation Time   :   16:40:59
 |   SCCS Delta Extraction Date   :   11/8/91
 |   SCCS Delta Extraction Time   :   16:47:56
 |
 -------------------------------------------------------
 */

/* Filename: veriuser.h */

#ifdef __cplusplus
extern "C" {
#endif /* cplusplus */


/* general defines */

#define true 1
#define false 0
#define TRUE 1
#define FALSE 0
#define bool int

/* defines for error interception */

#define ERR_MESSAGE  1
#define ERR_WARNING  2
#define ERR_ERROR    3
#define ERR_INTERNAL 4
#define ERR_SYSTEM   5


/* VERILOG user tasks and functions C header file */

typedef struct t_tfcell
{
    short type;         /* either usertask or userfunction */
    short data;         /* parameter for the following routines */
    int (*checktf)();   /* routine for checking parameters */
    int (*sizetf)();    /* for providing size of function return value */
    int (*calltf)();    /* routine called during simulation */
    int (*misctf)();    /* miscellaneous routine (see below) */
    char *tfname;       /* the name of the system task or function */
    int forwref;       /* indicates special parameters allowed */
    char *tfveritool;   /* Which Veritool owns the task */
    char *tferrmessage; /* An optional special case error message
                          which will be printed if the task is skipped */

    /* these components are for system usage only */
    int hash;
    struct t_tfcell *left_p;
    struct t_tfcell *right_p;
    char *namecell_p;
    int warning_printed;  /* Flag is set when skipping warning is printed */
} s_tfcell, *p_tfcell;


/* values for component 'type' in tfcell structure */
#define usertask 1
#define USERTASK 1
#define userfunction 2
#define USERFUNCTION 2
#define userrealfunction 3
#define USERREALFUNCTION 3


/* The routines checktf, sizetf, calltf and misctf are always
passed two arguments: 'data' and 'reason'.
The value for 'data' is defined as the second component
supplied by the user in the above table structure.
The value for 'reason' is defined as follows:

   reason_checktf    for checktf
   reason_sizetf     for sizetf
   reason_calltf     for calltf
   reason_save       for misctf during $save
   reason_restart    for misctf during $restart
   reason_disable    for misctf during disable
   reason_paramvc    for misctf at a parameter value change (when enabled)
   reason_synch      for misctf at end of time slot for synchronisation
   reason_finish     for misctf at finish of simulation
   reason_reactivate for misctf at a delayed reactivation event
   reason_rosynch    for misctf at end of time slot read-only synchronisation
   reason_paramdrc   for misctf at a driver value change (when enabled)

(see below for the #defines on these)

Note that any of the routine pointers maybe 0, in which
case the calls from VERILOG are not made.

For the misctf at a parameter value change, the parameter
number is passed as the 3rd argument.
*/

/* values for 'reason' passed as 2nd argument */
#define reason_checktf 1
#define REASON_CHECKTF 1
#define reason_sizetf 2
#define REASON_SIZETF 2
#define reason_calltf 3
#define REASON_CALLTF 3
#define reason_save 4
#define REASON_SAVE 4
#define reason_restart 5
#define REASON_RESTART 5
#define reason_disable 6
#define REASON_DISABLE 6
#define reason_paramvc 7
#define REASON_PARAMVC 7
#define reason_synch 8
#define REASON_SYNCH 8
#define reason_finish 9
#define REASON_FINISH 9
#define reason_reactivate 10
#define REASON_REACTIVATE 10
#define reason_rosynch 11
#define REASON_ROSYNCH 11
#define reason_diverge 12
#define REASON_DIVERGE 12
#define reason_converge 13
#define REASON_CONVERGE 13
#define reason_vld_interact 14
#define REASON_VLD_INTERACT 14
#define reason_paramdrc 15
#define REASON_PARAMDRC 15
#define reason_endofcompile 16
#define REASON_ENDOFCOMPILE 16
#define reason_scope 17
#define REASON_SCOPE 17
#define reason_interactive 18
#define REASON_INTERACTIVE 18
#define reason_reset 19
#define REASON_RESET 19
#define reason_endofreset 20
#define REASON_ENDOFRESET 20
#define reason_force 21 /* for 'force' and procedural 'assign' */
#define REASON_FORCE 21
#define reason_release 22 /* for 'release' and 'deassign' */
#define REASON_RELEASE 22
#define reason_snapsave 23
#define reason_endofsnapsave 24
#define reason_snaprestart 25
#define reason_endofsnaprestart 26
#define reason_startofsave 27    /* for $save and $incsave */
#define reason_startofrestart 28 /* only for $restart, not '-r' restart */
#define REASON_FAULTSIM_DONE 60 /* HyperFault */
#define reason_faultsim_done 60
#define REASON_MAX 60

/* NOTE: Whenever updating the reasons please update the name list
   called rstr in tf_ctest.c and the REASON_MAX number */

#ifdef IBMC
#if IBMC
/* this header file to be included for compiling on IBM 370 machines only */
#include "ibmc1.6_beta.h"
#endif
#endif

/* user error message string */
extern char *tf_error_message;

/******** utility routines *********************/
extern char *tf_getinstance();

extern int tf_nump();
extern int tf_inump();

extern int tf_typep();
extern int tf_itypep();

extern int tf_getp();
extern int tf_igetp();
extern void tf_putp();
extern void tf_iputp();

extern double tf_getrealp();
extern double tf_igetrealp();
extern void tf_putrealp();
extern void tf_iputrealp();

extern char *tf_strgetp();
extern char *tf_istrgetp();

extern struct t_tfexprinfo *tf_exprinfo();
extern struct t_tfexprinfo *tf_iexprinfo();
extern struct t_tfnodeinfo *tf_nodeinfo();
extern struct t_tfnodeinfo *tf_inodeinfo();

#ifdef ANSI
/* Solaris 2.2 compiler complains if "void" is left out */
extern void tf_evaluatep();
extern void tf_ievaluatep();
#else
extern tf_evaluatep();
extern tf_ievaluatep();
#endif /* !ANSI */

#ifdef ANSI
extern int tf_propagatep();
extern int tf_ipropagatep();
#else
extern tf_propagatep();
extern tf_ipropagatep();
#endif

#ifdef ANSI
/* Solaris 2.2 compiler complains if "void" is left out */
extern void tf_asynchon();
extern void tf_iasynchon();
extern void tf_asynchoff();
extern void tf_iasynchoff();
#else
/*
 * This is the declarations from OVI.
 */
extern tf_asynchon();
extern tf_iasynchon();
extern tf_asynchoff();
extern tf_iasynchoff();
#endif

#ifdef ANSI
/* Solaris 2.2 compiler complains if "void" is left out */
extern void tf_synchronize();
extern void tf_isynchronize();
#else
/*
 * This is the declarations from OVI.
 */
extern tf_synchronize();
extern tf_isynchronize();
#endif

extern int tf_gettime();
extern double tf_getrealtime();
extern double tf_igetrealtime();

extern int tf_igettimeprecision();
extern int tf_gettimeprecision();

#ifdef lint /* Placate LINT */
extern void io_printf(); 
#else
#ifdef ANSI
#ifdef PLI_VA_ARG
extern void io_printf(char *fmt, ...); 
#else /* !PLI_VA_ARG */
/* Solaris 2.2 compiler complains if "void" is left out */
extern void io_printf(); 
#endif /* !PLI_VA_ARG */
#else
/*
 * This is the declarations from OVI.
 */
extern io_printf(); 
#endif
#endif

#ifdef ANSI
/*
 * Solaris 2.2 compiler complains if "void" is left out
 */
#ifdef PLI_VA_ARG
extern void tf_text(char *fmt, ...);
extern void tf_error(char *fmt, ...);
extern void tf_warning(char *fmt, ...);
extern void tf_message(int level, char *facility, char *code, char *fmt, ...);
#else /* !PLI_VA_ARG */
extern void tf_text();
extern void tf_error();
extern void tf_warning();
extern void tf_message();
#endif /* !PLI_VA_ARG */
extern void tf_dostop();
extern void tf_dofinish();
#else
/*
 * These are the declarations from OVI.
 */
extern tf_error();
extern tf_warning();
extern tf_text();
extern tf_message();
extern tf_dostop();
extern tf_dofinish();
#endif

extern char *tf_dumpfilename();

extern char *tf_getcstringp();
extern char *tf_igetcstringp();

extern int tf_setdelay();
extern int tf_isetdelay();
extern int tf_setlongdelay();
extern int tf_isetlongdelay();
extern int tf_setrealdelay();
extern int tf_isetrealdelay();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -