DMA "Acquire Read Region" method

I've been meaning to ask this question for a while now.
I just came across the FPGA method mentioned in the title of this post.  I understand it gives a DVR pointing to the actual memory range for a DMA transfer but I have some questions regarding the implementation.
Does the function to return the DVR only return when the requested memory space is available AND the requested number of elements are already present?
Can this be used to speed up DMA transfer between loops?
Shane
Edit: What i mean by speeding up transfers between loops is the following: I would like to have the DMA read outside my time critical loop on RT and passing the data in via FIFO or QUEUE but when I try to do this with a standard DMA FIFO read, I get some not very good performance and a lot of jitter.  I am hoping this new method might be a step in improving that situation.
Say hello to my little friend.
RFC 2323 FHE-Compliant

There is method to my insanity.
We have an application where wa are running a RT loop at 20kHz including DMA transfers (25kHz is possible but with more jitter).  When looking at the RT execution trace toolkit we see that the DMA transfers are actually making up a rather large portion of our loop times.  The idea was to offload the actual DMA transfer to a seperate CPU core in order to allow for a data transfer method with a lower minumum runtime.
In our case our DMA transfers are taking approximately 10 us per call which actually ends up liniting our maximum loop rate "artiificially".  We have DMA transfers in both directions, so in essence we lose 20us through the DMA transfers.  Of course having the DMA transfer in the timed loop is great for jitter but the maximum loop rate is lower than it theoretically could be if the data transfer between RT and FPGA was faster.
I had a system up and running with the DMA transfers offloaded to a seperate CPU core but the jitter was too high.  I was hoping the ability to pass a DVR instead might help things in this regard.
Is there any way of offloading the DMA transfers in this way, essentially "pipelining" the DMA transfers to allow for higher RT Loop rates but without introducing some nasty jitter?
Shane.
Say hello to my little friend.
RFC 2323 FHE-Compliant

Similar Messages

  • Reading DMA FIFO using Invoke method node

    Hi
    I am trying to read a DMA FIFO using invoke method node to read the data in the FIFO on RT.
    It works fine but the problem is that it consumes a lot of CPU if the timeout is increased. Can
    anyone tell why this is happening and if this is the desired behaviour then what other methods i can
    use to avert this.
    Please help at the earliest
    Regards
    Amit

    Hi
    Can anybody help me as it is urgent ,
    What i further found out is that is that it is eating up a lot of meory when continuosly polled up in a looop....
    Regards
    Amit Ahuja

  • How to read the method and put that code in 1 internal table

    Hi,
    Actually in the normal ABAP, if we want to read the report,  then we will write read report statement.
    If we want to read method then this statement will not work.
    So, to read the method and put that code in 1 internal table , which statement we need to write?
    Regards,
    Radhika

    Hi Naimesh,
    Thanks for your reply.
    As, i am not aware of ABAP Objects i am having some issues:
    Actually that is working for some methods in some classes.
    Here 1 issue is there:
    In se24 1 method is there in 1 class.
    Even by using that FM in SE37 i am able to get the program name by giving class and method name,
    but while using that FM in the program i am not able to get that program name.
    so, i am unable to read the source code of the program?
    1 example here:
    Class name is CL_GUI_FRONTEND_SERVICES.
    in this class, methods like FILE_EXIST , FILE_GET_SIZE, etc are there.
    By giving the class name and method name i am able to get the program name also,
    but while using that FM in the program i am not able to get that program name.
    so, i am unable to read the source code of the program?
    Here is my code:
    REPORT  Z16059_SCAN_METHOD.
    DATA: BEGIN OF I_PROGRAM OCCURS 0,
          LINE(256) TYPE C,
          END OF I_PROGRAM.
    DATA METHOD TYPE PROGRAM.
    DATA: BEGIN OF I_STRUCTURE,
          CLS_NAME(30) TYPE C,
          METH_NAME(61) TYPE C,
          END OF I_STRUCTURE.
    I_STRUCTURE-CLS_NAME = 'CL_GUI_FRONTEND_SERVICES'.
    I_STRUCTURE-METH_NAME = 'CL_GUI_FRONTEND_SERVICES-FILE_EXIST'.
    CALL FUNCTION 'SEO_METHOD_GET_INCLUDE_BY_NAME'
      EXPORTING
      MTDKEY             =  I_STRUCTURE
    IMPORTING
       PROGNAME          = METHOD
    EXCEPTIONS
       INTERNALMETHOD_NOT_EXISTING      = 1
       OTHERS                             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ REPORT METHOD INTO I_PROGRAM.
    Please help me out in this regard.
    Thanks & Regards,
    Radhika

  • Problem while using read(char[]) method of stream

    Hi I am trying to read different xml files, , hence i am using a buffered reader, and the read(char[]) method in the bufferereader.
    //rawContent - is the xml file content
          BufferedReader br = new BufferedReader(new InputStreamReader(rawContent,
              ENCODING_FORMAT));
          int ascii = 0;
          char ch[]= new char[200];
          while((ascii = br.read(ch)) != -1) {       
            rawContentBuffer.append(ch);
          }This is the error that i get when i execute the above piece of code. I have checked the files they have no white spaces after the xml contents.
    Please tell me how i can overcome this.
    2006-02-17 19:43:52,826 ERROR [com.test.web.taglib.LightTag] - Error in parsing the XHTMLContent is not allowed in trailing section.
    org.xml.sax.SAXParseException: Content is not allowed in trailing section.
          at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
          at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
          at com.test.web.taglib.LightTag.renderField(LightTag.java:293)
          at com.test.web.taglib.LightTag.doStartTag(LightTag.java:128)

    Maybe it isn't. I don't know what 'rawContentBuffer' is, but you're assuming that 'ch' is always full when you call rawContentBuffer.append(ch). You need to call rawContentBuffer.append(ch,0,ascii) or some such form if there is one, or make some other arrangement for handling short reads.

  • Need info about DataInputStream - read (byte[] ) method

    Hi all,
    I would like to know when does
    datainputStream.read(byte[] buffer) method return?
    Here dataInputStream is an object of type DataInputStream.
    Does the method return only after buffer.length bytes are read from the input stream? or Will it return after some bytes are read , even if the number of bytes read is less than buffer.length?
    I need this info because while developing a J2ME application and running it in an emulator , the above method seems to return even if some bytes are read.But when the application is transferred to a Mobile device, the method does not seem to return if some bytes are read, and seems to wait until buffer.length is reached.

    one more?

  • URGENT!! - Bug on read (readLine) method?

    Hello to all, I have need of a large aid.
    I need to know if There is the possibility that the method read() or readLine(), than I use for reading data from a socket from a PLC, has a Bug.
    This why, with the socket opened and of the data in arrival from the PLC (than does not give to errors), the method read() raises the "Connection exception reset by peer."
    The Technicians of the PLC say not to have errors but and I am surest of the correct operation of the server socket, also why it has been tested with telnet, hyperterminaly and others client without problems.
    I do not know that what to say and what to try.
    Thanks for every eventual aid.

    I don't think there is a bug with BufferedReader. But instead of using buffered reader, you can try using the socket input stream directly for reading to see if it makes any difference:
    try {
      // if the PLC is a client:
      ServerSocket serverSocket = new ServerSocket(...);
      Socket socket = serverSocket.accept();
      // or if the PLC is a server:
      Socket socket = new Socket(...);
      // and the rest of the code to test with
      InputStream in = socket.getInputStream();
      byte[] buffer = new byte[1024];
      int length;
      while ((length = in.read(buffer)) != -1) {
        System.out.println("Read "+length+" bytes");
      System.out.println("Connection closed");
    } catch (Exception e) {
      e.printStackTrace();
    }See if that little example works.
    Is the PLC i client or server? Is the PLC the first to write something to your java program or do you have to write something to it first (maybe it doesn't understand what you write to it).
    If you use reader/writer classes, there could be problems with the character encoding you use. If you don't specify any with InputStreamReader/OutputStreamWriter, then you will use the default platform encoding. I don't know which character encoding the PLC use, but if the characters are between 0 and 255, and you really want to use reader and writer classes, then use the ISO 8859-1 encoding.

  • Read only method arguments

    Can I make method arguments read only?? I want to send an object to a method and make it read only. i dont want a method to change public varables of the mthod argument object.
    Can anyone help me on this??
    Thanks,
    Vaijayanti

    Not possible, but you can pass a copy of the object, so that even if it's changed the changes aren't reflected to the original object.

  • HT3650 Glitches exporting aux channels using the blank region method. Any solutions?

    I've ended up with LOTS of glitches in the output from the stems. Does anyone have a reliable way to use this method? E.g., one aux track was receiving a left channel only track and a right channel track but the exported file only had the right channel!

    Yes my particular issue is not like yours. However, there have been many other laptop users experiencing similar problem to yours after 3.10 kernel. Mostly it seems to be bumblebee users that experience your problem with the blank screen. We do know that nvidia have yet to make their official drivers work with kernel 3.10 and up. The drivers in the Arch repository have been patched to work with 3.10. From what I have seen, this also only seem to be affecting laptops with newer nvidia gpu's. I fear there is not much to do with this problem until nvidia give official 3.10 kernel support.
    My suggestion would be to stick with 3.9.9 kernel and the drivers that work with it, and don't upgrade those packages until nvidia has addressed these issues. If you have a look at the nvidia forums you will see quite a number of topics mentioning black screen when starting x on 3.10 kernel, and also a thread for the system dying. Reading some of the threads there may help you keep up to date on whether or not the issue seem to be solved.
    https://devtalk.nvidia.com/default/board/98/

  • How to read Inspection Method classificatino data

    Hi all,
    Can anyone let me know about how to read the Inspection Method Classification data.The transaction code for Inspection Method Classification is QS34.
    Thanks,
    Balaji

    Hello gopi,
                  i know that but I am asking whether there is any FM to read just like for Material classification,Batch classification etc we have FM's.
    Thanks,
    Balaji

  • How to read inspection method classification data?

    Hi all,
            Can anyone let me know about how to read the Inspection Method Classification data.The transaction code for Inspection Method Classification is QS34.
    Thanks,
    Balaji

    Hello gopi,
                  i know that but I am asking whether there is any FM to read just like for Material classification,Batch classification etc we have FM's.
    Thanks,
    Balaji

  • How to get/read region item value in java script

    Hi All,
    i have text item on a page.
    how to read the item value in java script
    EXAMPLE
    P10_RESULT IS ITEM IT HAS VALUE "38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888"
    NOW I WANT TO REFER ABOVE ITEM VALUE IN JAVA SCRIPT LIKE
    var myPoints=new Array(&P10_RESULT.);
    SO I CAN POPULATE ARRAY WITH CORDINATES
    IT IS NOT WORKING
    WHAT IS THAT I AM MISSING.
    PLESE HELP .
    ThankS
    Rk

    region header code....
    <script src="http://maps.google.com/maps?file=api&v=2&key=&API_KEY." type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    //globals
    var bounds = new GLatLngBounds();
    var map;
    var centerPoint = new GLatLng(38.984898,-76.854549);
    var gmarkers = [];
    //var x= ""38.956472,-77.447777","38.999123,-//77.026184","12.951497,70.668646","17.459075,78.456888"";
    //var myPoints=new Array(x);
    //var myPoints=new Array($x('P10_RESULT').value);
    var myPoints=new Array(document.getElementById('P10_RESULT').value);
    //var myPoints=new Array("38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888");
    function initMap()
              doLoad();
                        addMarkers();
    function doLoad()
         if (GBrowserIsCompatible())
                   map = new GMap2(document.getElementById("map"));
                   map.setCenter(centerPoint, 7);
                   map.addControl(new GScaleControl());
                   map.addControl(new GLargeMapControl());
                   map.addControl(new GMapTypeControl());
    function myclick(i) {
    GEvent.trigger(gmarkers, "click");
    function addMarkers() {
         if (myPoints.length) {
              var bounds = new GLatLngBounds();
              for (n=0 ; n < myPoints.length ; n++ ) {
                   var mData = myPoints[n].split(',');
                   var point = new GLatLng(mData[0],mData[1]);
                   bounds.extend(point);
                   var marker = createMarker(mData[1],point, mData[0]);
         map.addOverlay(marker);
              map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
    function createMarker(i,point, title) {
         var marker = new GMarker(point,{title:title});
         GEvent.addListener(marker, "click", function() {
              marker.openInfoWindowHtml('<div style="width:250px;">' + title + '<hr>Lat: ' + point.y + '<br>Lon: ' + point.x + '</div>');
         gmarkers[i] = marker;
         return marker;
    //]]>
    </script>
    page body code
    onload="initMap()" onunload="GUnload()"

  • Error reading contructor method

    Hey there, an error occurs when I try to make an instance of a contructor class file. Can you see what I'm doing wrong?
    John
    public class SavingsAccount {
         private String firstName;
         private String lastName;
         private String holderAddress;
         private Date dateOfBirth;
         private int accountNumber;
         private double savingsBalance;
         static double annualInterestRate = 0.04;
         public SavingsAccount(String first, String last, String address, Date DOB,
                                       int account, double balance){
              first = firstName;
              last = lastName;
              address = holderAddress;
              DOB = dateOfBirth;
              account = accountNumber;
              balance = savingsBalance;           
    public class SavingsAccountTest {
         public static void main(String args[]){
              SavingsAccount account1 = new SavingsAccount();
    Error Message: cannot find symbol contructor | SavingsAccountTest.java | Line 5

    SavingsAccount account1 = new SavingsAccount();Should have a constructor...
    public SavingsAccount() {
        // Do some default processing here...
    }

  • Memory leak in Digital Waveform

    I have a program with a pretty serious memory leak that uses up all my system RAM and crashes my computer within a few hours of running the program.
    The program takes an array of U16s where each bit represents a digital signal. The VI converts each U16 to a digital array and groups the resulting 16 digital signals into different busses for display on a Digital Waveform Graph. The profiler doesn't show any excessive memory usage in the VI. I put the whole VI into a Diagram Disable structure and moved a few pieces out at a time, and eventually the only thing inside the disable structure was the Digital Waveform Graph indicator. When this indicator is enabled, the memory usage of my system rises slowly and steadily until it uses all available RAM and crashes the system.
    If I replace the Digital Waveform Graph indicator with a cluster, the memory leak still occurs (but much more slowly). I thought using the cluster fixed the leak until I reran the VI overnight while using the cluster instead of the Graph.
    If I stop the VI before all the RAM is used, the RAM will not release until I close LabVIEW entirely. Once LabVIEW closes, the memory is released slowly and exponentially unless I use the "End Process" option in Task Manager.
    This is a continuation of a previous post I made where I thought the memory leak was due to problems transferring data from an FPGA for display.
    I ran the MemLeak vi (attached) on two separate systems, both running LV 2013 SP1, and got the same results. The memory leak is noticeably fast when using the enable structure connected to the Digital Waveform Graph but still present when using the cluster of Digital Waveforms.
    Attachments:
    MemLeak.vi ‏33 KB
    LV shutdown.PNG ‏101 KB

    Thanks for the replies.
    In response to John's points:
    1. The attached VI is a simplification of an FPGA VI that read a fixed number of samples from a DMA FIFO using an FPGA Interface Invoke Method approach. I'm using a card (PXI-7842R) that doesn't allow use of the Acquire Read Region method. In order to allow people without an FPGA card to hopefully see the issue, I replaced it with the for loop. Assuming that this for loop does leak (which I don't believe it does; as altenbach said, it's a fixed size allocation that LV should be able to reuse), why would I see a difference in the leak magnitude depending on which indicator I connect to the array?
    2. I've previously reviewed the document you referenced, and I don't see any errors from it present in my code; do you? I have no global/local variables, strings/arrays displayed on front panel, property nodes, coercion dots, altered memory sizes, resizing/reallocations, etc. I don't see any weird buffer allocations. I used to have the conversion from U16 array to digital waveforms in a subVI but placed it on the same diagram to allow incremental use of the Diagram Disable structure.
    3. The forum post you referenced had many of the items discussed above, plus it was solved using an RT FIFO. I'm not passing data from a producer to a consumer; I'm just displaying acquisition results. I guess you could say I'm processing the data, but I'm really only converting it to a format that the indicator will take; I'm not operating on the data.
    It's good that the leak doesn't show up in 2014, but my SSP runs out in a couple of days; I never got an upgrade to 2014. This is the last item remaining on the development path, and we've already spent ~$4k to upgrade the controllers enough to display the acquisition without dragging down the CPU. I will be in hot water if I spent all that money and then end up having to scrap the display...

  • High Speed Streaming with Multiple FPGA FIFOs and TDMS Advanced Asynchronous (Data Ref)

    I am using an FPGA with adapter card (7962 with 5751) for data acquisition and signal processing. I have adapted the FlexRio example "High Throughput Streaming," which works very well for a transferring data from the FPGA via a single FIFO. This example uses the TDMS Advanced Asynchronous Write (Data Ref). The "High Throughput Streaming" example is similar to "Streaming External Data to a TDMS File (Windows)" but includes more code to prep the FIFO buffer size and TDMS size.
    My question is how can I adapt this code to incorporate multiple FIFOs that write data to different channels in the TDMS file? Can I use multiple instances of  TDMS Advanced Asynchronous Write (Data Ref) in a single VI for each FIFO Acquire Read Region? If so, how do I insure that the correct data is written to the correct channel in the TDMS file?

    Thank you DeppSu for your explanation, I will look into that.
    But first, I want to be sure that the FPGA and the Hot general designs are correct, which for the moment I am not sure. So I have included my code.
    I tried the Host vi several times, and it seems that it works sometimes and sometimes not, like there are some communication problems between the fpga and the host on the "read acquire region" method which is not executed. I managed to make it work randomly before, but not now. Maybe it is because of the reset that I added?
    If someone could check my code and help me, I would really appreciate it since nobody in my workplace has the expertise to do so :-) If you see some obvious mistake, please share with me, I also added some comment boxes in the code with questions.
    Delphine
    Attachments:
    thoughput.zip ‏1261 KB

  • MessageException when trying to access method 'read'

    Hi
    I am new to BlazeDS and have hit a problem trying to invoke a method on my service implemented in Java.
    I get a flex.messaging.MessageException complaining that a method 'read' is not avilable. The immediate problem is for me is that there is indeed no 'read' method defined on this service but I do not understand why it is expecting one.
    My environment is Flex Builder 3.0.2, Java 1.5 running on Websphere 6.1.1
    Any help gratefully received - thanks
    The full exception trace is as follows:
    [18/08/09 12:53:02:652 UTC] 00000024 SystemOut O [Flex]12:53:02.652 Exception when invoking service 'application-rpc': flex.messaging.MessageException: Cannot invoke method 'read'. Method 'read' not found.incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage)
    operation = read
    clientId = E23FB654-E60B-6ED3-8747-6E23EF67FC1A
    destination =
    myService
    messageId = 8CBB8802-AA69-C283-0537-2D9148EEF85B
    timestamp = 1250599979590
    timeToLive = 0
    body = null
    hdr(DSId) = E23FB596-780E-B204-350B-54B006CD5CDF
    hdr(DSEndpoint) = amf
    Exception: flex.messaging.MessageException: Cannot invoke method 'read'. Method 'read' not found.at flex.messaging.util.MethodMatcher.methodNotFound(
    MethodMatcher.java:355)at flex.messaging.util.MethodMatcher.getMethod(
    MethodMatcher.java:163)at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(
    JavaAdapter.java:420)at flex.messaging.services.RemotingService.serviceMessage(
    RemotingService.java:183)at flex.messaging.MessageBroker.routeMessageToService(
    MessageBroker.java:1503)at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(
    AbstractEndpoint.java:884)at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(
    MessageBrokerFilter.java:121)at flex.messaging.endpoints.amf.LegacyFilter.invoke(
    LegacyFilter.java:158)at flex.messaging.endpoints.amf.SessionFilter.invoke(
    SessionFilter.java:44)at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(
    BatchProcessFilter.java:67)at flex.messaging.endpoints.amf.SerializationFilter.invoke(
    SerializationFilter.java:146)at flex.messaging.endpoints.BaseHTTPEndpoint.service(
    BaseHTTPEndpoint.java:278)at flex.messaging.MessageBrokerServlet.service(
    MessageBrokerServlet.java:322)at javax.servlet.http.HttpServlet.service(
    HttpServlet.java:856)at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(
    ServletWrapper.java:966)at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(
    ServletWrapper.java:478)at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(
    ServletWrapper.java:463)at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(
    CacheServletWrapper.java:92)at com.ibm.ws.webcontainer.WebContainer.handleRequest(
    WebContainer.java:744)at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(
    WebContainer.java:1425)at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(
    WCChannelLink.java:92)at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(
    HttpInboundLink.java:465)at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(
    HttpInboundLink.java:394)at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(
    HttpICLReadCallback.java:102)at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
    AioReadCompletionListener.java:152)at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(
    AbstractAsyncFuture.java:213)at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(
    AbstractAsyncFuture.java:195)at com.ibm.io.async.AsyncFuture.completed(
    AsyncFuture.java:136)at com.ibm.io.async.ResultHandler.complete(
    ResultHandler.java:193)at com.ibm.io.async.ResultHandler.runEventProcessingLoop(
    ResultHandler.java:725)at com.ibm.io.async.ResultHandler$2.run(
    ResultHandler.java:847)at com.ibm.ws.util.ThreadPool$Worker.run(
    ThreadPool.java:1498)

    Apologies: bad typing on my part. PRoblem solved.
    Rgds

Maybe you are looking for