Para preservar el sabor original de las subrutinas y evitar un mal nivel de traducción, todas las listas de subrutinas conservan las descripciones en inglés. Se recomienda estudiar detenidamente los tipos correspondientes de subrutinas al usarlas. Tampoco se han verificado todas las subrutinas; debido a problemas de versión o transcripción, puede haber omisiones. Se agradecen las correcciones.
Las subrutinas TF se utilizan comúnmente para la transferencia bidireccional de datos entre Verilog y las subrutinas C del usuario. Cuando una subrutina con prefijo tf_ tiene una subrutina correspondiente con prefijo tf_i, el puntero de instancia de la operación en la subrutina correspondiente con prefijo tf_i debe pasarse como una variable adicional al final de la lista de variables.
Las subrutinas TF no tienen una marca de clasificación clara en su forma de nomenclatura. A continuación se hace un breve resumen.
Obtener información de tareas y funciones
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| char * | ◆tf_getinstance() |
| Get a pointer to the current instance of a user-defined system task or function. | |
| char * | ◆tf_mipname() ◆tf_imipname(char *instance_p) |
| Get the hierarchical module instance path name as a string. | |
| char * | ◆tf_spname() ◆tf_ispname(char *instance_p) |
| Get scope hierarchical path name as a string. |
Obtener información de la lista de variables
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int | ◆tf_nump() ◆tf_inump(char *instance_p) |
| Get number of task or function arguments. | |
| int | ◆tf_typep(int narg) ◆tf_itypep(int narg, char *instance_p) |
| Get a system task/function argument type. | |
| int | ◆tf_sizep(narg) ◆tf_isizep(int narg, char *instance_p) |
| Get the bit length of a system task/function argument. | |
| t_tfexprinfo * | ◆tf_exprinfo(int narg, t_tfexprinfo *exprinfo_p) ◆tf_iexprinfo(int narg, t_tfexprinfo *exprinfo_p, char *instance_p) |
| Get system task/function argument expression information. t_tfexprinfo is a data structure, defined in veriuser.h. | |
| t_tfnodeinfo * | ◆tf_nodeinfo(int narg, t_tfnodeinfo *nodeinfo_p) ◆tf_inodeinfo(int narg, t_tfnodeinfo *nodeinfo_p, char *instance_p) |
| Get system task/function argument node information. t_tfnodeinfo is a data structure, defined in veriuser.h. |
Obtener valor de parámetro
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int | ◆tf_getp(int narg) ◆tf_igetp(int narg, char *instance_p) |
| Get a system task/function argument value as an integer or character string pointer | |
| double | ◆tf_getrealp(int narg) ◆tf_igetrealp(int narg, char *instance_p) |
| Get a system task/function argument value as a double-precision value. | |
| int | ◆tf_getlongp(int *aof_highvalue, int narg) ◆tf_igetlongp(int *aof_highvalue, int narg, char *instance_p) |
| Get system task/function argument value as a 64-bit integer. | |
| char * | ◆tf_strgetp(int narg, int format) ◆tf_istrgetp(int narg, int format, char *instance_p) |
| Get formatted system task/function argument values. | |
| char * | ◆tf_getcstringp(int narg) ◆tf_igetcstringp(int narg, char *instance_p) |
| Get system task/function argument value as a string. | |
| int | ◆tf_evaluatep(int narg) ◆tf_ievaluatep(int narg, char *instance_p) |
| Evaluate a system task/function argument expression. |
Establecer valor de parámetro
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int | ◆tf_putp(int narg, int value) ◆tf_iputp(int narg, int value, char *instance_p) |
| Put an integer value to a system task/function argument or function return. | |
| int | ◆tf_putrealp(int narg, double value) ◆tf_iputrealp(int narg, double value, char *instance_p) |
| Write a real value to a system task/function argument or function return. | |
| int | ◆tf_putlongp(int narg, int lowvalue, int highvalue) ◆tf_iputlongp(int narg, int lowvalue, int highvalue, char *instance_p) |
| Write a 64-bit integer value to a system task/function argument or function return. | |
| int | ◆tf_propagatep(int narg) ◆tf_ipropagatep(int narg, char *instance_p) |
| Propagate a system task/function argument value. | |
| int | ◆tf_strdelputp(int narg, int bitlength, char format, char *value_p, int delay, int delaytype) ◆tf_istrdelputp(int narg, int bitlength, char format, char *value_p, int delay, int delaytype, char *instance_p) |
| Write a value to a system task/function argument from string value specification, using a 32-bit integer delay. | |
| int | ◆tf_strrealdelputp(int narg, int bitlength, char format, char *value_p, double realdelay, int delaytype) ◆tf_istrrealdelputp(int narg, int bitlength, char format, char *value_p, double realdelay, int delaytype, char *instance_p) |
| Write a value to a system task/function argument from string value specification, using a real number delay. | |
| int | ◆tf_strlongdelputp(int narg, int bitlength, char format, char *value_p, int lowdelay, int highdelay, int delaytype) ◆tf_istrlongdelputp(int narg, int bitlength, char format, char *value_p, int lowdelay, int highdelay, int delaytype, char *instance_p) |
| Write a value to a system task/function argument from string value specification, using a 64-bit integer delay. |
Monitorear cambios de valor de parámetro
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int | ◆tf_asynchon() ◆tf_iasynchon(char *instance_p) |
| Enable asynchronous calling of the misctf application for system task/function argument value changes. | |
| int (always 0) | ◆tf_asynchoff() ◆tf_iasynchoff(char *instance_p) |
| Disable asynchronous calling of the misctf application. | |
| int | ◆tf_synchronize() ◆tf_isynchronize(char *instance_p) |
| Synchronize to end of simulation time step. | |
| int | ◆tf_rosynchronize() ◆tf_irosynchronize(char *instance_p) |
| Synchronize to end of simulation time step. | |
| int | ◆tf_getpchange(int narg) ◆tf_igetpchange(int narg, char *instance_p) |
| Get the index number of the next system task/function argument that changed value. | |
| int | ◆tf_copypvc_flag(int narg) ◆tf_icopypvc_flag(int narg, char *instance_p) |
| Copy system task/function argument value change flags. | |
| int | ◆tf_movepvc_flag(int narg) ◆tf_imovepvc_flag(int narg, char *instance_p) |
| Move system task/function argument value change flags. | |
| int | ◆tf_testpvc_flag(int narg) ◆tf_itestpvc_flag(int narg, char *instance_p) |
| Test system task/function argument value change flags. |
Sincronización de tareas
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int | ◆tf_gettime() ◆tf_igettime(char *instance_p) |
| Get the current simulation time as a 32-bit integer. | |
| double | ◆tf_getrealtime() ◆tf_igetrealtime(char *instance_p) |
| Get the current simulation time in double-precision format. | |
| int | ◆tf_getlongtime(int *aof_hightime) ◆tf_igetlongtime(int *aof_hightime, char *instance_p) |
| Get current simulation time as a 64-bit integer. Return least significant (right-most) 32 bits of simulation time | |
| char * | ◆tf_strgettime() |
| Get the current simulation time as a string. | |
| int | ◆tf_getnextlongtime(int *aof_lowtime, int *aof_hightime) |
| Get next time at which a simulation event is scheduled | |
| int | ◆tf_gettimeprecision() ◆tf_igettimeprecision(char *instance_p) |
| Get the timescale precision of a module or a simulation. | |
| int | ◆tf_gettimeunit() ◆tf_igettimeunit(char *instance_p) |
| Get the timescale unit of a module or a simulation. | |
| int | ◆tf_setdelay(int delay) ◆tf_isetdelay(int delay, char *instance_p) |
| Activate the misctf application at a particular simulation time. | |
| int | ◆tf_setlongdelay(int lowdelay, int highdelay) ◆tf_isetlongdelay(int lowdelay, int highdelay, char *instance_p) |
| Activate the misctf application at a particular simulation time. | |
| int | ◆tf_setrealdelay(double realdelay) ◆tf_isetrealdelay(double realdelay, char *instance_p) |
| Activate the misctf application at a particular simulation time. | |
| void | ◆tf_scale_longdelay(char *instance_p, int delay_lo, int delay_hi, int *aof_delay_lo, int *aof_delay_hi) |
| Convert a 64-bit integer delay to the timescale of the module instance. | |
| void | ◆tf_scale_realdelay(char *instance_p, double realdelay, double *aof_realdelay) |
| Convert a double-precision floating-point delay to the timescale of the module instance. | |
| void | ◆tf_unscale_longdelay(char *instance_p, int delay_lo, int delay_hi, int *aof_delay_lo, int *aof_delay_hi) |
| Convert a delay from internal simulation time units to the timescale of a particular module. | |
| void | ◆tf_unscale_realdelay(char *instance_p, double realdelay, double *aof_realdelay) |
| Convert a delay expressed in internal simulation time units to the timescale of a particular module. | |
| int | ◆tf_clearalldelays() ◆tf_iclearalldelays(char *instance_p) |
| Clear all scheduled reactivations by tf_setdelay() or tf_isetdelay(). |
Operaciones aritméticas
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int (always 0) | ◆tf_add_long(int *aof_low1, int *aof_high1, int low2, int high2) |
| Add two 64-bit integers. | |
| int (always 0) | ◆tf_subtract_long(int *aof_low1, int *aof_high1, int low2, int high2) |
| Subtract two 64-bit integers. | |
| void | ◆tf_multiply_long(int *aof_low1, int *aof_high1, int low2, int high2) |
| Multiply two 64 bit integers. | |
| void | ◆tf_divide_long(int *aof_low1, int *aof_high1, int low2, int high2) |
| Divide two 64-bit integers. | |
| int | ◆tf_compare_long(int low1, int high1, int low2, int high2) |
| Compare two 64-bit integer values. | |
| char * | ◆tf_longtime_tostr(int lowtime, int hightime) |
| Convert 64-bit integer time value to a character string. | |
| void | ◆tf_real_to_long(double realvalue, int *aof_low, int *aof_high) |
| Convert a real number to a 64-bit integer. | |
| void | ◆tf_long_to_real(int low, int high, double *aof_real) |
| Convert a 64-bit integer to a real number. |
Mostrar información
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| void | ◆io_printf(char *format, arg1, ..., arg12) |
| Print a formatted message to the output channel of the software product which invoked the PLI appcation and to the log file of the product. | |
| void | ◆io_mcdprintf(int mcd, char *format, arg1, ..., arg12) |
| Write a formatted message to one or more files. | |
| int (always 0) | ◆tf_error(char *format, arg1,..., arg5) |
| Report an error message. | |
| int (always 0) | ◆tf_warning(char *format, arg1, ..., arg5) |
| Report a warning message. | |
| int (always 0) | ◆tf_message(int level, char *facility, char *code, char *message, arg1,..., arg5) |
| Report an error or warning message with software product interruption control. | |
| int (always 0) | ◆tf_text(char *message, arg1,..., arg5) |
| Store error message information. |
Mantenimiento de tareas internas
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int (always 0) | ◆tf_setworkarea(char *workarea) ◆tf_isetworkarea(char *workarea, char *instance_p) |
| Store user data pointer in work area. | |
| char * | ◆tf_getworkarea() ◆tf_igetworkarea(char *instance_p) |
| Get work area pointer. |
Otras subrutinas
| Tipo de retorno | Formato de llamada y descripción |
|---|---|
| int (always 0) | ◆tf_dostop() |
| Cause software product to enter interactive mode. | |
| int (always 0) | ◆tf_dofinish() |
| Exit software product execution. | |
| char * | ◆mc_scan_plusargs(char *startarg) |
| Scan software product invocation command line for plus (+) options. | |
| int | ◆tf_write_save(char *blockptr, int blocklen) |
| Append a block of data to a save file. | |
| int | ◆tf_read_restart(char *blockptr, int blocklen) |
| Get a block of data from a previously written save file. |