NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
kentyman
Posts: 33
0 Kudos

Re: Re : Re: Re : Re: Re : Re: C Interface to LabVIEW FPGA

julesjay,

 

I think I know where the confusion is. NiFpga_ConfigureFifo only configures the host memory side of the FIFO. But the FIFO on the FPGA holds elements as well. So the total number of elements your FIFO can hold is essentially the sum of the host memory side and the FPGA side. The size of the FIFO in the FPGA is configurable from the LabVIEW Project, and defaults to 1029. Does this make more sense?

Member
julesjay
Posts: 137
0 Kudos

Re : Re: Re : Re: Re : Re: Re : Re: C Interface to LabVIEW FPGA

Yes I was confuse but still I don't understand what is this for?

 

I've cheched NI-RIO FIFO example and there isn't any FPGA_ConfigureFifo function? Is this function needed?? 

 

My DMA Fifo is configured in my LabVIEW project (4095 U8). Then I compile FPGA VI and then generate C API files (LVbitx). 

 

Is this enough to work properly Or do I need to configure something in C application?

 

When I use an FPGA card using LabVIEW I don't need to configure a FIFO DMA in the host! Or maybe it's automatic?

 

Thanks

 

James

Member
kentyman
Posts: 33
0 Kudos

Re: Re : Re: Re : Re: Re : Re: Re : Re: C Interface to LabVIEW FPGA

julesjay,

 

This function is optional, which is why you don't see it used in the example. Please see my reply on 9-11-2009 for more documentation on this function.

Member
julesjay
Posts: 137
0 Kudos

Re : Re: Re : Re: Re : Re: Re : Re: Re : Re: C Interface to LabVIEW FPGA

Ok for this point.

 

Can you explain this : 

 

I've configure a DMA FIFO with 255 U8.  In My FPGA I placed the function : Get Number of Elements to Write.

I run the code in simulation mode and it returns 10255? 

 

Any explaination? Shouldn't it be 255? and 254 after I put one element in the FIFO and so on?

 

Thanks

 

James

Member
kentyman
Posts: 33
0 Kudos

Re: Re : Re: Re : Re: Re : Re: Re : Re: Re : Re: C Interface to LabVIEW FPGA

julesjay,

 

That actually makes sense, as the minimum size is 10000, and it looks like the numbers were just added together.

 

These questions are actually not specific to the C API, but the FPGA Interface in general. I suggest you try the general LabVIEW FPGA forum: http://forums.ni.com/ni/

Member
harBenger
Posts: 5
0 Kudos

Re: C Interface to LabVIEW FPGA

I am trying to read a FIFO and am getting a status error of -50400. Any idea what this is?

 

I can verify the status error -63101 by misplacing the bit file, so I'm pretty sure the error is correctly displaying.

Member
kentyman
Posts: 33
0 Kudos

Re: C Interface to LabVIEW FPGA

harBenger,

 

Yes, that is an error code that we forgot to document! It's the error you get when a FIFO operation times out. This happens when you specify a finite timeout and the operation does not complete in time. We will be documenting this error in the next release. Sorry about the confusion.

Member
harBenger
Posts: 5
0 Kudos

Re: C Interface to LabVIEW FPGA

I found another one...

 

-52012.  The error explanation (Help>>>Explain Error) says "There is no more data available to read or no more space available in which to write." This is pretty vague...

 

Since I'm playing with IRQ's now, I'm assuming it's an IRQ issue. 

Member
kentyman
Posts: 33
0 Kudos

Re: C Interface to LabVIEW FPGA

harBenger,

 

I think I found the problem. It looks to me like you may be calling NiFpga_WaitOnIrqs on an NiFpga_IrqContext that was never reserved with NiFpga_ReserveIrqContext. In future releases, this will probably return a more descriptive error like NiFpga_Status_ResourceNotInitialized.

 

Let me know if this isn't what's happening, and thanks for the feedback!

Member
Ching-Yu
Posts: 111
0 Kudos

回應: C Interface to LabVIEW FPGA

Hi,

 

I'm AE in NI Taiwan.

Many of our customers want to use "C interface to labview FPGA" in Borland C++.

Could this API be used in Borland C++?

 

Thanks,

Ziva

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page