码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2017-07-16 09:57:04      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:generate   log   generator   fpga   枚举   文件   line   pga   控制台应用程序   

安装了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)

标签:generate   log   generator   fpga   枚举   文件   line   pga   控制台应用程序   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!