首页 > Windows开发 > 详细

使用Visual Studio deploy NI FPGA板卡(采用FPGA Interface C API Generator)

时间:2017-07-16 09:34:33      阅读:307      评论:0      收藏:0      [点我收藏+]

安装了NI LabVIEW 2015 32bit版本,安装了NI FPGA Interface C API Generator,安装了硬件PCIe-7842R

  • 打开FPGA Interface C API Generator,导入之前用LabVIEW编译生成的FPGA bitfile; a.bitfile
  • 点击generate,生成了几个个文件:1.FPGA bitfile; 2.NiFpga.c;3.NiFpga.h;4.NiFpga_a.h;5.nidist.id。

其中NiFpga_a.h包含了应用程序中函数调用需要的常量,都是一些宏定义或枚举类型常量,如:

1 typedef enum
2 {
3    NiFpga_StepMode_ControlI16_FramAmp = 0x811E,
4    NiFpga_StepMode_ControlI16_FramOffs = 0x8122,
5    NiFpga_StepMode_ControlI16_FramStep = 0x811A,
6    NiFpga_StepMode_ControlI16_LineAmpl = 0x8132,
7    NiFpga_StepMode_ControlI16_LineOffs = 0x8136,
8    NiFpga_StepMode_ControlI16_LineStep = 0x812E,
9 } NiFpga_StepMode_ControlI16;

这些常量包括了bitfile名字,数字签名和FPGA中寄存器的偏移地址;

NiFpga.c和NiFpga.h对所有工程都是一样的,包含了调用NI FPGA的各种系统函数。

  • 新建visual studio控制台应用程序,

在电脑上有关于FPGA Interface C API Generator的example

技术分享


参考文献:

  • 官网给出的R系列FPGA的C API用法说明http://www.ni.com/tutorial/8638/en/
  • 电脑上给出的FPGA Interface C API Generator的example

 

使用Visual Studio deploy NI FPGA板卡(采用FPGA Interface C API Generator)

原文:http://www.cnblogs.com/yuesheng/p/7189496.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!