vcsuser.h 6.23 KB
/*
 * vcsuser.h - Chronologic Simulation pli-tf routine include file
 $Header: /root/leakn64/depot/rf/sw/bbplayer/lib/librcppli/vcsuser.h,v 1.1.1.2 2002/10/29 08:06:41 blythe Exp $
*/

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

typedef struct t_tfexprinfo {
    unsigned short expr_type;
    unsigned short padding;
    struct t_vecval *expr_value_p;
    double real_value;
    char *expr_string;
    int expr_ngroups;
    int expr_vec_size;
    int expr_sign;
    int expr_lhs_select; /* not used */
    int expr_rhs_select; /* not used */
} s_tfexprinfo, *p_tfexprinfo;

#define tf_nullparam 0
#define TF_NULLPARAM 0
#define tf_string 1
#define TF_STRING 1
#define tf_specialparam 2
#define TF_SPECIALPARAM 2
#define tf_readonly 10
#define TF_READONLY 10
#define tf_readwrite 11
#define TF_READWRITE 11
#define tf_rwbitselect 12
#define TF_RWBITSELECT 12
#define tf_rwpartselect 13
#define TF_RWPARTSELECT 13
#define tf_rwmemselect 14
#define TF_RWMEMSELECT 14
#define tf_readonlyreal 15
#define TF_READONLYREAL 15
#define tf_readwritereal 16
#define TF_READWRITEREAL 16


typedef struct t_tfnodeinfo
{
    short node_type;
    short padding;
    union {    
        struct t_vecval *vecval_p;
        struct t_strengthval *strengthval_p;
        char *memoryval_p;
        double *real_val_p;
    } node_value;
    char *node_symbol;
    int node_ngroups;
    int node_vec_size;
    int node_sign;
    int node_ms_index; /* not used */
    int node_ls_index; /* not used */
    int node_mem_size; /* not used */
    int node_lhs_element; /* not used */
    int node_rhs_element; /* not used */
    int *node_handle; /* not used */
} s_tfnodeinfo, *p_tfnodeinfo;

#define tf_null_node 100
#define TF_NULL_NODE 100
#define tf_reg_node 101
#define TF_REG_NODE 101
#define tf_integer_node 102
#define TF_INTEGER_NODE 102
#define tf_time_node 103
#define TF_TIME_NODE 103
#define tf_netvector_node 104
#define TF_NETVECTOR_NODE 104
#define tf_netscalar_node 105
#define TF_NETSCALAR_NODE 105
#define tf_memory_node 106
#define TF_MEMORY_NODE 106
#define tf_real_node 107
#define TF_REAL_NODE 107


typedef struct t_vecval {
    int avalbits; /* '0':0  '1':1  'z':0  'x':1 */
    int bvalbits; /*     0      0      1      1 */
} s_vecval, *p_vecval;

typedef struct t_strengthval
{
    int strength0;
    int strength1;
} s_strengthval, *p_strengthval;


/*** misctf callback reasons ***/
#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_interactive 18
#define REASON_INTERACTIVE 18


/*** levels for tf_message() ***/
#define ERR_MESSAGE  1
#define ERR_WARNING  2
#define ERR_ERROR    3
#define ERR_INTERNAL 4
#define ERR_SYSTEM   5


/*** this structure is provided to allow compilation of pli applications ***/
/*** containing s_tfcell arrays; these arrays are not used by VCS ***/
typedef struct t_tfcell {
    short type;
    short data;
    int (*checktf)();
    int (*sizetf)();
    int (*calltf)();
    int (*misctf)();
    char *tfname;
    char *fill1;
    char *fill2;
    int fill3;
    struct t_tfcell *fill4;
    struct t_tfcell *fill5;
    char *fill6;
    int fill7;
} s_tfcell;

#define usertask         1
#define userfunction     2
#define userrealfunction 3


#ifdef VCSXLIF
#include "vcsuserxlif.h"
#endif

/*** utility routine declarations ***/

int              io_printf();
int              io_mcdprintf();
char            *mc_scan_plusargs();
int              tf_asynchoff(); int tf_iasynchoff();
int              tf_asynchon(); int tf_iasynchon();
int              tf_clearalldelays(); int tf_iclearalldelays();
int              tf_copypvc_flag(); int tf_icopypvc_flag();
int              tf_dostop();
int              tf_dofinish();
int              tf_error();
p_tfexprinfo     tf_exprinfo(); p_tfexprinfo tf_iexprinfo();
char            *tf_getcstringp(); char *tf_igetcstringp();
char            *tf_getinstance();
int              tf_getlongtime();
int              tf_getlongp(); int tf_igetlongp();
int              tf_getnextlongtime();
int              tf_getp(); int tf_igetp();
int              tf_getpchange(); int tf_igetpchange();
char            *tf_getroutine(); char *tf_igetroutine();
char            *tf_gettflist(); char *tf_igettflist();
int              tf_gettime();
int              tf_gettimeprecision(); int tf_igettimeprecision();
int              tf_gettimeunit(); int tf_igettimeunit();
char            *tf_getworkarea(); char *tf_igetworkarea();
char		*tf_longtime_tostr();
int              tf_message();
char            *tf_mipname(); char *tf_imipname();
int              tf_movepvc_flag(); int tf_imovepvc_flag();
p_tfnodeinfo     tf_nodeinfo(); p_tfnodeinfo tf_inodeinfo();
int              tf_nump(); int tf_inump();
int              tf_putlongp(); int tf_iputlongp();
int              tf_putp(); int tf_iputp();
int              tf_rosynchronize(); int tf_irosynchronize();
void             tf_scale_longdelay();
int              tf_setdelay(); int tf_isetdelay();
void             tf_setworkarea(); void  tf_isetworkarea();
void             tf_setroutine(); void tf_isetroutine();
void             tf_settflist(); void tf_isettflist();
int              tf_sizep(); int tf_isizep();
char            *tf_spname(); char *tf_ispname();
int              tf_strdelputp(); int tf_istrdelputp();
char            *tf_strgetp(); char *tf_istrgetp();
char            *tf_strgettime();
int              tf_setlongdelay(); int tf_isetlongdelay();
int              tf_strlongdelputp(); int tf_istrlongdelputp();
int              tf_synchronize(); int tf_isynchronize();
int              tf_testpvc_flag(); int tf_itestpvc_flag();
int              tf_text();
int              tf_typep(); int tf_itypep();
void             tf_unscale_longdelay();
int              tf_warning();