Number of DMA FIFO of items to read mismatch in the FPGA and RT

Hi all

I use myRIO, LV14 to run my application.

Request: I have to continuously acquire data via FPGA and host RT process once every 2000 samples are taken. I use DMA FIFO (size 8191) to acquire data, use timeout property in the FPGA to eliminate the buffer overflow. I had followed cRIOdevguide to implement this part. An excerpt of what I put in place is attached. All code runs in the SCTL at 50 MHz.

Question: Two or three times I met with this strange behavior, the FPGA FIFO gives continous timeout and the RT is unable to read the FIFO. The number of elements to set the property in the FPGA VI gives 0 showing that FIFO is full and no more can be written, but the RT, remaining items gives 0, so it is reading 0 (none) elements.

Solution: I put a case where I'll write to FIFO (under the code) and if the number of elements to write is different from zero. It seems to work fine, from now.

What confuses me, is that my FPGA VI said that FIFO is full (number of items to write 0 = FIFO) and gives a timeout error, but RT VI said that number of items remaining in the FIFO is 0 and therefore no data is read. No idea why this is so? My RT and FPGA VIs continues to run, but with no gains or to read data.

A few minutes after you run the code, I've seen this behavior. No idea why this happens? I try to reproduce the behavior, and will update if I meet with her again. Sorry, I can't post my code here, but I guess the code snippets to explain some extend.

Thank you

Arya

Edit: Even with the mentioned workaround solution, the problem persists, now that the FPGA written any of FIFO. And the RT VI is not able to read all the elements he sees 0 items in the FIFO. The FIFO continues to be in a State of timeout. So I guess that the problem is on the side of RT.

Why it looks like you read from the FIFO even in two different places in the same VI, at the same time? If the lower reading throws the FIFO, it will never trigger the reset, which could lead to the situation you describe, I think (it's hard to tell from a few screenshots).

Also, your logic seems too complicated. I immediately noticed that there is no reason to select the entry, the output of = 0 - simply use the 'equal to zero' output directly. On the side of FPGA, why you need check the number of items that you want to write? There's nothing wrong with writing in a FIFO that is already full. just the data won't get written.

Tags: NI Software

Similar Questions

  • As I try to enter the serial number of my first sweet item that I just downloaded, the system tells me that I am not connected to the internet and I can't finalize the instrallation

    As I try to enter the serial number of my first sweet item that I just downloaded, the system tells me that I am not connected to the internet and I can't finalize the instrallation

    Please see:

    Solutions to connection errors, activation and connection with creative Cloud applications and Creative Suite

    'Please connect to the Internet to continue' error keeps popping up.

    Error: "could not connect to the server.

    I hope this helps.

    Concerning

    Megha Rawat

  • How to use the same point of view as read only in the ADF and editable

    Hello

    How to use the same point of view as read only in the ADF and editable? How can we succeed in TF?

    -James

    Hello

    Steven Davelaar wrote a presentation on this 'building highly reusable Taskflows.

    From slide 14, that's where your use case comes into play

    Frank

  • Why my forums is no longer show them not to read items as read after viewing the thread?

    When I go to a forum thread to appear in bold if it is unread since my last visit. After viewing the thread and return to the list the item used to change the non-bold meaning there is none unread in the thread. Now, it remains "BOLD" unless I leave the forum and then come back.

    By using the previous button to return to the page previous risk of Firefox display the version previously cached this page without updating the status of visited link.

    You can try to open links in a new tab with a middle click and close the tab to go back.

  • Hardware implementation of the controller DMA using the FPGA and LABVIEW

    Respected Sir/Madam

    I am simulating the DMA using LABVIEW7.1 controller and I am fresher to this tool, please suggest me how to do this

    You can go through the FPGA tutorial.

    For specific information on DMA you can see this.

  • Read data from the Table and load it into the csv file

    Hello

    I would like to read a table (select * from employees) and load the data into a csv file.

    What methods are available?

    Records will be at high volume.

    Thank you

    If it is to do a lot, use APEX.

    Create a new page with an interactive report based on the SQL code you want. When you go to download Excel, it is actually a CSV file.

    If it is large, you may need to go on the FILE_UTL road.

    If it is only once, use an interface such as SQL tool * or SQL * Developer.

    If it's a learning experience, you must do all three.

    MK

  • Reading files from the internet and write them on a computer

    Hello

    I'm working on a program to copy files from a location on the internet to a local file on a computer.
    The file is a .swf file, so I read the data of the file on the internet in a ByteBuffer and then write it to a file on the computer...
    But it does not work... It copies the file, but the .swf run right
    However, when I use essentially the same procedure to copy a file from a local file to a local file on the same computer, it copies very well...
    As far as I know I'm copying the files in these two circumstances the same way, with only a few changes to connect to a URL...

    I can publish the source code in a day or two if it would help to explain better...

    Any help would be greatly appreciated!

    in. Read (Byte []) is not guaranteed to fill the table. You read in a loop until it returns-1.

    At the very least, check the return value from read() call. If it does not say that you have read the full file, there is your problem. If she says that you have it done read the complete file, then there is another issue that is not immediately obvious to me. I just hooked this one because he jumped in the eyes me like an obvious no-no.

  • Number of items in the target to host DMA FIFO

    Hello world

    I would like to transfer a set of datapoints of an FPGA to a RT-host controller using a fifo DMA. If I use the 'Get number of items to write' function on the FPGA target, can I get the total number of items in the two buffers, or just one on the FPGA target?

    (see http://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgaconcepts/fpga_dma_how_it_works/)

    markus_a wrote:

    If I use the 'Get number of items to write' function on the FPGA target, can I get the total number of items in the two buffers, or just one on the FPGA target?

    The FPGA will have no idea how big the DMA is on the side of the host.  He can't see his own DMA buffer.

    Get the number of items to write just tells you how many items are not used by the DMA (ie the number of items that currently write to the DMA without waiting for items to be offered by the host reading).

  • How to choose the maximum number of items for DMA FIFO to the R series FPGA

    Greetings!

    I'm working on a project with card PCIe-7842R-R series FPGA of NOR. I use to achieve the fast data transfer target-to-host DMA FIFO. And to minimize overhead costs, I would make the size of the FIFO as large as possible. According to the manual, 7842R a 1728 KB (216KO) integrated block of RAM, 108 000 I16 FIFOs items available in theory (1 728 000 / 16). However the FPGA had compilation error when I asked this amount of items. I checked the manual and searched online but could not find the reason. Can someone please explain? And in general, what is the maximum size of the FIFO given the size of the block of RAM?

    Thank you!

    Hey iron_curtain,

    You are right that the movement of large blocks of data can lead to a more efficient use of the bus, but it certainly isn't the most important factor here. Assuming of course that the FIFO on the FPGA is large enough to avoid overflowing, I expect the dominant factor to the size of reading on the host. In general, larger and reads as follows on the host drive to improve throughput, up to the speed of the bus. This is because as FIFO. Read is a relatively expensive operation software, so it is advantageous to fewer calls for the same amount of data.

    Note that your call to the FIFO. Read the largest host buffer should be. Depending on your application, you may be several times larger than the size of reading. You can set the size of the buffer with the FIFO. Configure the node.

    http://zone.NI.com/reference/en-XX/help/371599H-01/lvfpgaconcepts/fpga_dma_how_it_works/ explains the different buffers involved. It is important to note that the DMA engine moves data asynchronously read/write on the host nodes and FPGAs.

    Let me know if you have any questions about all of this.

    Sebastian

  • What would be the effect of the adjustment of the depth of DMA FIFO before every read?

    I'm using a PXI-7813R FPGA board using a 3rd party API. I had a few problems during playback. I looked in their API (LabVIEW) code and realized that they were in DMA FIFO depth before each reading of the FIFO. This apparently does not cause a failure of catastrphic issues I have observed are only transitional in nature.

    What kind of problems, if everything can these operations cause or will be ignored because the FIFO is already running?

    Thank you...

    mgerceker,

    According to the help file , that should be OK to do even though I could see it being a problem if it is not set correctly before performing an operation. What kind of symptoms do you observe?

    Greetings from Austin,

  • SMU FlexRIO DMA FIFO host read the FIFO overflows broadband bandwidth/DMA issues

    I'm working on an application that uses 2 modules FlexRIO, and 2 LVDS digital I/O adapters.  I'm driving each of the SDC A/SDC B ports on LVDS 16-bit data at 50 MHz adapters.  The FlexRIOs are expected to receive the data and write down them on four targets-to-host DMA FIFO (one per connector SDC), or two by FlexRIO.  The host reads the FIFO and brings together a series of tables each FIFO output 2D.  Ultimately, the individual tables (we're each a quarter of single image) will be assembled in simple images, but I haven't gotten that far yet.

    The duty cycle for the data is about 80% (in other words, I'm only transmit data to the FlexRIOs 80% of the time, the rest of the time the transmitters are disabled), so the flow is about 80 Mbytes/sec/port total invasion, or 320 MB/s on the four FIFOs DMA.  I find that the acquired data gaps sometimes inside that line up along the length of the material part of the DMA FIFO in FlexRIO modules.  In other words, if my memory FIFO DMA are set to 65535 length, I'll see a break in the data acquired at the word of data 65536th.  Data is a waveform of sight, which is essentially just a counter, so it's easy to see the break in the model.  For the words of first 65535, adjoins the data, then from Word 65536 model is discontinuous and starts counting again from there, contiguously.  At the beginning of the acquisition, the FIFO is erased: the beginning data read from the FIFO is always aligned correctly, so I know that the process starts at a good point.

    The error is not always the case: sometimes I get continuous data through the point 65536.  In addition, the error occurs independently between the four FIFO: on a particular race, a FIFO could have data of interest and some bad.  Rarely, all four FIFOs have good data.

    The fact that the gap of the configuration is to the point even the depth of the FIFO DMA tells me that fills the FlexRIO FIFO, the FPGA hardware without the system managing to move to read, which means that the data gets dropped during the period that the FIFO is full.  Then transfer to the host comes into action, there again is the space in the FIFO, and the data is once more contiguous in FIFO memory for a large amount of data (I have not yet tried to locate a second gap in the data of a single acquisition).  It seems therefore that the host doesn't have enough bandwidth between the FlexRIOs and the host of RAM to prevent the filling FIFO, or comes along some software process on the host that is temporarily stop the ability to instantly transfer.

    Are at - it a specification for the SMU flow system that would indicate that we are trying to use too much bandwidth?  Or are there priority controls on DMA FIFO that would allow us to raise the priority of the FIFO transfers as they are guaranteed to go in preference to other system tasks?

    System Specs:

    SMU-1075 chassis

    SMU-8135 CPU

    2 SMU-7962R FlexRIO modules

    2 digital i/o modules of NOR-6585

    LabView 2012 32-bit SP1 version 12.0.1

    A suggestion of an applications engineer of NOR and some experimentation has solved the problem. It turns out that I was calling the method FIFO of DMA stop just before the outbreak of the transmission of the data via a control for the FPGA FPGA VI. I did this in order to clear the FIFO before you begin data acquisition, but I didn't know that this method disables also transfer data between the memory FlexRIO and host. Following this call, I trigger the FPGA code to start filling its FIFO and then begin reading. Calling the Read of FIFO of DMA apparently light up the transfer back, but it seems that the host VI has been randomly slow down enough to move to the bed such as filling the side FlexRIO FIFO and dat would be lost. I changed the host VI to insert a FIFO method call start before the trigger for the FPGA signal, and the problem is now gone.

  • Transmission of data to the host of RT to the FPGA via DMA FIFO

    Hello

    I try to write data from a host of RT on target FPGA using DMA FIFO and then process these data and read then return of the FPGA target to the host of the CR through an another DMA FIFO. I'm working on the NI SMU chassis 1062 q, with the built-in NI SMU-8130 RT controller and target FPGA NI SMU-7965R.

    The problem I face is that I want to send three different tables, two of the same size and the third with different size, and I need one more small to be sent first to the FPGA. I tried to use encode dish with two executives in the FPGA VI. In the first image, I read and write the first table in a while loop which is finite (that is, a finite number of iterations). The second frame contains the process of reading and writing the second two tables (of the same size) in a while loop that can be finite or infinite (depending on a control). The problem is that it does not work. 2 arrays are displayed on the front panel of the RT VI host and works well, however, the table that should have been read in the first sequence does not appear on the front panel of the RT VI host. It is not sensible because if it is not passed from the host to the fpga and vice versa then the second image should not have been executed. Note that I'm wiring (-1) for the time-out period to block the while loop iterations until the passage of each item is completed. So the first while loop has only 3 iterations. Could someone help me undersdtand why this happens and how to fix this?

    I enclose a picture of the host and the fpga vi.

    Thank you.

    If you vote for my idea here and it is implemented, you can even omit the loop FOR fully.

    (I also propose the RE / IM divided inside the loop FOR and perform operations on complex table before the loop the transpose and reshape .) In this way, you only need one instance of these operations. You might even save some unnecessary allocations table in this way)

  • Two DMA FIFO fill and asynchronous playback?

    Hello

    I work lately on the Labview for my system which includes the acquisition of data from two sensors in FPGA vi and communicate to RT vi, where I treat the two sensor data and subtract. I am facing a problem of synchronization. I tried 4 data points, 2 of each sensor to each 25th microsec. Here I attach a pseudo-code that is just one of my original code that shows the same problem.

    When we run the code, acquire US 4 data points each 25 microsecs in the FPGA vi and storing in the fifo DMA 2.

    Then, I read this in RT vi and display them.

    When I have a single loop in the FPGA and RT vi. the number of elements left in the two fifo should be identical, I perceive.

    But in this case, it is not. Please enlighten me why?

    Concerning

    Intaris is right. How work DMA FIFO is that they fill a small pad on the FPGA, and when this buffer is almost full, the data is copied (automatically and at the bottom) of a larger buffer in the memory of the host. The remaining items is the amount of data is left in the buffer of the host. The automatic copy of the FPGA to the host will happen precisely at the same time to the two FIFOs, so you will get different amounts of data in each. The total number of items (between the pads FPGA and host) should be the same, although there is no way to see that, except for read all data (until the two buffers are empty) and confirm that the total number of items of reading was the same.

  • Using TWO DMA FIFO target host

    Hi, I use a unit 9004 cRIO for the purpose of data acquisition. I try to get signals analog (NI 9221) and CAN (NI 9853) modules and transfer them from the fpga VI VI in real time using DMA FIFO, that is to say, target to the host. I thought I should use 2 DMA FIFO, one for analog and CAN signals. When I tried to put them, I put the two FIFO in the same loop. I don't know if that's the only reason, but it would generate overflow error 50400. When I removed a FIFO and put the single FIFO, it worked fine. So, I thought they must perform independent while loops and implemented two while loops that would be run in parallel. And it worked. I don't know if this is how it is supposed to work? Is this that FIFO DMA should be run in parallel loops? Are they written in such a way that the FIFO function cannot be called for more of an instance in the same loop? This seems odd.

    I should also mention that I reconnected it the wires on analog, digital and CAN modules before putting them in separate loops. And I know for a fact that the FIFO CAN show underflow error if the entry of the threads on the port CAN are not connected. Also, I don't use mode Scan Engine (I think that its not available in 9004)

    You are right about the 9004 and Scan Engine - or the lack of support, I say...  Regarding the error of underflow, this behavior is expected when you have two Scriptures DMA FIFO the same loop.  What is happeing, it is that the two FIFOs write in true parallel.  Thus, when you write to FIFO1, FIFO2 expected FIFO1 finish. Then, when you write to FIFO2, FIFO 1 must wait on FIFO2 and the while loop to reiterate before he can write more data.  So, on your VI in real time, if you try to access one of these FIFO that has no data in there because it is waiting to write the next block of data, then an overflow error will happen.

    When you separate the two FIFOs, both can run independently from each other and write at a much faster pace.  In this way, your FIFO reads on the realtime VI will not be stuck in a State of negative overflow where a FIFO is waiting for data queued.

    I hope this helps!

  • DMA FIFO and node VHDL

    Hi guys!

    I am writing here after many days of attempts without success...

    My request is 'simple', send data from the Panel of Labview RT within a DMA FIFO target host. Then the FPGA core receives data and imported through a knot of VHDL processes, and then after the data is pointing to the Labview RT through a target to host DMA FIFO.

    I tested my node VHDL simulation mode in Labview FPGA where data sent by a target scope THAT FIFO and just work fine.

    But when I try to run the node VHDL in the real target with data from the RT by DMA FIFO basis, it won't. I already do some checks:

    -Data are properly sent through the host target DMA FIFO;

    -The data are correctly received in the FPGA base;

    -The data are correctly sent to the node VHDL;

    -Result of the node VHDL are correctly sent to the heart of the RT through the target to host DMA FIFO;

    -Result are correcly received in the heart of the RT, , but the result is false and absurd. But I have proof that my node is semanticly correct with my mock test

    So my question: are there reasons to see my work VHDL nice knot in simulation mode and not in mode real target with data from the base RT by DMA FIFO taking into account data Transfer between DMA FIFO work well in both sides? Is there some sample available with data send RT FPGA-based via DMA and data processing with a knot of VHDL and returned to the RT kernel to inspire me?

    I can't post my screw here because I work for a company, I use a MyRIO with Labview FPGA 2014 target.

    Thank you guys! I am available for some details on my implementations.

    Afghow.

    Hey!

    Thank you for your answer but I solved my problem. Indeed, at first, I tried to make a knot of Combinatorics (without clock) pure, but the problem seemed to come from that.

    I modified my node in order to incorporate a clock, according to the prescriptions of this white paper: http://zone.ni.com/reference/en-XX/help/371599K-01/lvfpgaconcepts/ipin_prepare_ip/ . And now, every thing seems to work well.

    The question remains why the combinatorial node has worked in simulation mode en not in the actual target?...

    But for people with the same problem, I suggest add them a CLK and check an edge of entry with rising_edge (CLK) and if it does not, add an input signal to check if the input signals are valid or not.

    Afghow.

Maybe you are looking for

  • Taskbar pinning

    My button for Firefox on Windows7 disappearing task bar when I open Firefox which allows to open several windows a pain. How can I keep always a button on the taskbar? Explore the fact. Thank you people.

  • Re: Erratic behavior on Satellite M40X

    Hello Very often but not always, when I start the laptop (Satellite M40X - 186 Windows XP SP3), after a while, the Windows Media Player popup window. I got close but it reappears etc... also very often, there's erratic behavior: the keyboard is unusa

  • McAfee VirusScan more

    Just update software McAfee VirusScan Plus 2008. During the installation of McAfee, I was forced to uninstall Spybot Search Destroy & before I could complete the installation again.  The message said that Spybot S & D is not compatible with VirusScan

  • Cisco ASA delay listening to the output of the command

    Dear, I use ASA5520 active failover / standby... when connect us via the console or telnet and write the command ant 'show', it's very slow displaying output! Thank you Majed

  • my computer is saying that I can not open micrpspft Word... no idea why?

    For some reason every time I have click on microsoft word Starter 2010 my computer always says this file might not open, try again or fix it in the Control Panel, but I have no idea what's wrong with it!Help please