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

📄 pli01.c

📁 你自己漫漫理解吧
💻 C
字号:
/*///////////////////////////////////////////////////////////////////////
//
// title: C code for tf_putp() test to write a single simple value 
//
// This PLI C code uses tf_putp() to write a simple value to a Verilog
// system task/function argument (parameters).
//
///////////////////////////////////////////////////////////////////////*/

#include <stdio.h>
#include "veriuser.h"

extern int putp_01_calltf();

char *veriuser_version_str = "";

int (*endofcompile_routines[])() = 
{
    /*** my_eoc_routine, ***/
    0 /*** final entry must be 0 ***/
};

bool err_intercept(level,facility,code)
int level; char *facility; char *code;
{ return(true); }

s_tfcell veriusertfs[] = {
  {usertask,     0, 0, 0, putp_01_calltf,  0, "$putp_test", 1},
  {0}
};


/* Use tf_putp() with a single task/function argument */
int putp_01_calltf() 
{
  int val = 1;
  io_printf("PLI Code:   tf_putp(1, val) is writing a value of %x (hex)\n",
    val);
  tf_putp(1, val);
  return(0);
}

⌨️ 快捷键说明

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