Downcasting DMA data from U16 to U8

Hi Everyone,
I have a situation that I hope someone can shed some light on. Currently I have an FPGA design that collect highspeed data does some processing on it and spits out the results over DMA for the host to read out and save to TDMS files. Currently I am reading 4MB worth of I16 data from the DMA every 25-30 ms, the current design is able to keep up with the data rate just fine. My next task is to allow the FPGA to collect the same type of data, with the same processing, only providing the data back in I8 format, which means one of the following design decisions:
1- keep existing FPGA code/FW and cast the data to I8 on the host side.
               The downside to the first option, is the high data rate. I did some benchmark testing with a couple of different methods to do the I16 to I8 cast (Number Split, to I8 cast, and Typecast). Needless to say the Typecast was too slow for my operations averaging about 35-40 ms to cast the 4MB worth of I16 data to I8. The number split and to I8 cast both came with an average time of approximatly 15ms but with a max time of 23 ms. These times were obtained with a system with very little load, which will not be the case on the final design.
2- develop/compile a new FPGA VI that does the exact same operations except convert the data to I8 on the FPGA and send it over a DMA defined with I8 datatype.
The downside here is the need to maintane two versions of the FPGA code as well as two versions of the driver code, this is since the DMA used to transfer the data has changed datatype from I16 to I8 which prevents me from using a dynamic refrence when operating with the FPGA.  I also am using all the available DMA channels on board so I cannot just declare both I16 and I8 DMAs and read from the appropriate one on the driver side.
My question is, is there a cheap way of doing the cast operation on the host side? It was mentioned that LV FPGA will use U64 to transfer the data internally and only cast it to the required data type at the end, is it possible to leverage this operation to get it to cast to a differnt data type on the driver side, if this is true? Otherwise is there a fourth method of doing the cast that is cheaper? any other ideas are welcome.
Sorry for the long post.
Solved!
Go to Solution.

Update your FPGA to be configurable to either pack I16s or I8 into its DMA stream, that way you have one FPGA to maintain and you have a reduced stream from the I8 configured FPGAs (i.e. half the number of DMA values should be sent).  Send your DMA values to always be some multiple of I16 so you can easily pack and unpack once they are in TDMS files.  The host side always receives the same DMA element (e.g. I16) and doesn't really care that in some cases it contains two I8s.

Similar Messages

  • Passing data from RT host to FPGA through DMA FIFO

    Hello,
    I am trying to write some data from an RT host to FPGA target using DMA FIFO then process this data and then read them back from the FPGA target to the RT host through another DMA FIFO. I am working on NI PXIe chassis 1062Q, with NI PXIe-8130 embedded RT controller and NI PXIe-7965R FPGA target.
    The problem I am facing is that I want to send three different arrays, two of the same size and the third one with different size, and I need the smaller one to be sent to the FPGA first. I tried using flat sequece with two frames in the FPGA VI. In the first frame I read and write the first array in a while loop which is finite (i.e., finite number of iterations). The second frame contains the process of reading and writing the second two arrays (of the same size) in a while loop that can be finite or infinite (according to a control). The problem is that this didn't work. The 2 arrays are displayed on the front panel of the RT host VI and are working fine, however, the array that should have been read in the first sequence doesn't show up on the front panel of the RT host VI. This doesn't make sense because if it is not passed from the host to the fpga and vice versa then the second frame shouldn't have been executed. Note that I am wiring (-1) to the timeout to block the while loop iterations till the passing of each element is complete. Thus the first while loop has 3 iterations only. Could someone help me undersdtand why this happens and how to solve this problem?
    I am attaching a picture of both the host and the fpga vi.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    RT host vi.png ‏102 KB
    FPGA vi.png ‏28 KB

    No need to initalize the arrays with values that you will immediately overwrite.  Here's what I believe to be equivalent code:
    The array outputs should be wired directly to the FPGA FIFO writes.  Do not use local variables when you can wire directly.
    If you know that you want to transfer the Temp Data Array first, why not make your code do that?  Eliminate the sequence structure, and put the functions in the order in which you want them to execute.  Use the FPGA reference and error wires to enforce that order.  You might consider writing the Temp Data Array, reading it back, then writing the Real and Imag A arrays, to see if that gets you the results you expect.  Run the code in simulation (in the project, right-click on the FPGA target and execute on the host with simulated IO) so that you can use execution highlighting and probes to see what is happening.  Wire the error wires through and see if you get an error anywhere.  Make sure you're not missing something simple like looking at the wrong starting array index.

  • How to get data from a pointer to an array using dlportio?

    I use DLPORTIO.DLL to access the parallel port on a WinXP. The purpose is to read data coming from an fpga.
    The transfer rate is quite high (more than 500kB/s).
    DLPORTIO.DLL can buffer data from the parallel port.
    I would like to use this fonctionality to speed up the data transfer by ready 16 x 8 bits that have been buffered. I get the pointer to the element from the dll. 8bits means U8 in Labview and, of course, 16 => U16 and 32bits => U32. But what to connect when I want 128bits??? How to use the pointer cominf from the dll and say to Labview it is the pointer to the first element of my 16 element array??
    Thanks to all
    Dai Tran Duy
    Dai
    LV 7.1 - WIN XP - RT - FP
    Attachments:
    dlportio.zip ‏852 KB

    LabVIEW does not have a 128 bit numeric so you will need to create a work around of sorts. What I would suggest is creating some wrapper dll functions. These funcitons would take say an array of U8s from LabVIEW, convert them into your 128 bit number and then call your dll with that.
    In addition take a look at the manual on exteranl code in LabVIEW, Using External Code in LabVIEW, which discusses how to pass arrays to a dll. In addition there is a shipping example in LabVIEW 7.0 that shows how to pass all sorts of LabVIEW and C data types. The example even includes C code snipits.

  • Connect a tablet as input method or push asynchronously data from the WebAs

    If have to connect a tablet to a WebDynpro application. Not a tablet PC or something, just an ordinary tablet. This is one of those big plates with hundreds of imaginary buttons.
    The user pushes with a pen some imaginary buttons on the tablet and the WebDynpro program should act accordingly. E.g. the user pushes in the oder entry WebDynpro the button "TheMP3Player" and directly after that the button "colour green", then pushes two time the "battery pack" button and then "type enhanced capacity". The WebDnypro component should react accordingly. Should jump between field, etc.
    Do we have the possibility to add an input device like this to the WebDynpro application or are we stuck with mouse an keyboard? At least, I could not find a way to do this in WebDynpro.
    If I would use an ordinary, classical Dynpro, I would write and RFC server, write the data from the tablet to the WebAs and from there write the data directly to the Dynpro.
    Since WebDynpro is more or less stateless, we can do this here, right? Or is there some "add on" that I could use to poll on a regular or on an event basis (an event not triggered by mouse or keyboard though) data from the WebAs?
    Any help would be appreciated.
    Thank you!
    Kind regards,
    Andreas

    Hi Maaniks,
    I'm a little puzzled by step 5. The return from the tpcall() will be TypedBuffer, so you shouldn't need to create another TypedBuffer. You may need to downcast it to the particular type of TypedBuffer returned, but you shouldn't need to create a new TypedBuffer or TypedFML32.
    Otherwise what you are doing is probably pretty reasonable and common. I'm not aware of any general purposes classes that do what you are looking for, although creating one probably wouldn't be hard. Using reflection you could make it such that the same converter class could handle any POJO or Bean, assuming you can easily map the field IDs to attributes or properties of the POJO or Bean.
    The only comment I might have is whether you use an iterator or look for specific fields is largely going to depend on which there are fewer of. If the class you are populating only takes a few fields from the FML32 buffer, you might just extract those fields instead of iterating through the entire FML32 buffer.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Alternative to DMA transfers from Host to FPGA in cRIO 9004

    Hi,
    We are using a cRIO 9004 + 9104 FPGA Chassis + 8x NI 9505 modules to replace an 8 axis Scorbot educational robot controller by a cRIO, but we found some troubles:
    - We are using FPGA IPs for Encoder reading, PWM signal generation and PID control, for the 8 axis. This is done using 3 SCTLs for each axis: one SCTL for encoder reading, one for PWM generation and one for NI Softmotion Splines and PID position control.
    The FPGA VI is successfully deployed.
    - We are using the NI Soft motion in the Real Time controller for trajectory generation and user interface. We are not using another VI on the Windows PC for user interface, just the Real Time processor.
    Here we get the R-T error -63001 (NI RIO FPGA Communications) when deploy the Real Time VI. It seems that our controller doesn't support DMA transfers from the Host to the FPGA.
    Questions:
    - If we cannot use DMA transfers from Host to FPGA, is there any other way to communicate the Host to the FPGA avoiding the R-T error -63001?
    - Is a good idea to use indexed IPs to reduce the amount of SCTLs in the FPGA to just 3 (instead of 24 SCTLs)?
    - Do you have any suggestion?
    Regards,
    Manuel

    Hey there.
    Indeed cRIO 900x series does not support DMA transfers from the Host to the FPGA; that is the reason you are getting an error 63001.
    However it does support data transfer from the FPGA to the Host You can find that information in this KB.
    To transfer information from the host to the rt and to the fpga you can use:
    Host <--> RT
    Network shared variables
    TCP
    UDP
    Data socket
    RT --> FPGA
    Front panel communication
    FPGA -->RT
    User defined variables
    Direct memory access
    DMA FIFOs
    I added some links with examples of each type of communication
    Hope this info helps
    Good luck

  • Send data from AXI to AXIS

    I want to send data from AXILite to AXI Stream with a simple example.The Data are from GPIOs and to DMA. But data transmission failed since the protocols are not the same.I've tried to use protocol converter IP in Vivado but it cannot be used for AXIS. Can anyone tell me what to do next to improve the dataway? 

    Well, I met with troubles writing logics. I create an custom IP with a Master Stream output and make a 8bit input wire pin-out to connect it with switch. I once wanted to change stream_data_out from the generated
     stream_data_out <= read_pointer + 32'b1;
    to
     stream_data_out <= switch_in;
    the simulating result is not good.
    Then I directly make the connection by
    assign switch_in =m_axis_tdata;
    in the top file of my ip, and the Synthesis's OK. However, when I connect it to DMA IP & PS and use xdc file to make pin constraints, Synthesis's OK but Implementation's fails for multi-driver net problems in SWs. I've no ideas what to do next. Is my IP's logic too simple?

  • DMA Data Logging

    Does anyone know of a data logging product that uses DMA? I want to record data from a DAQ card(PCI 6534)directly to a hard disk drive without involving the processor.

    The 6534 IS capable of DMA.
    The OS may be part of the issue.
    Could you please provide more info to allow us to be of greater assistance?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Refreshing the Data from a embed view in a view container

    Hi everybody
    I would like to know how can I do to refresh all data from a View with a view container the problem is:
    that I have a window that has a view at the same time this has a view container.  The Main view brings the data of editable elements when I select one element of the main view the view container brings a list for that element (dependencies) but only the first time a choose an element loads the correct data, when I choose another one it brings the same old data and doesn't make the call for the wdDoInit() method.
    The question is:
    How do I force the view to refresh all the data or call again the wdDoInit() method?
    Thank you for your help

    Aida,
    Lets say you have two components C1 and C2 and you want method from C1 to be available in C2 then follow these steps:-
    1) Goto the Interface Controller of C1 and create a method there lets say doSomething
    2) Then goto C2. There you can see Used Web Dynpro Components --> Right click Add Used Component --> Give some name say C1Comp --> Click browse and select C1 --> Click Finish.
    3) Next goto Component Controller of C2 --> Properties --> Click Add and check if C1 is added. If not then select the checkbox and select OK.
    4) Now goto Implementation tab of C2 and lets say wdDoInit you can write following code:-
    wdThis.wdGetC1CompInterface().doSomething();
    Chintan

  • Issue when uploading Sales data from DSO to Cube.

    Dear All,
    I have an issue when I am uploading Sales data from DSO to Cube.  I am using BI 7.0 and I have uploaded all sales document level data to my DSO.  Then I use a transformation rule to calculate the Sales Value when I am doing DTP to cube.  Cube has customer wise aggregation data.
    In DSO I have NetPrice(KF) and Delivered_QTY(KF).  I do a simple multiplication routine in the transformation from DSO to Cube.
    RESULT =   SOURCE_FIELDS-NET_PRICE * SOURCE_FIELDS-DLV_QTY .
    At the moment I use Active Table(With out Archive) on the DSO to get the data since this is my first load.
    Issue is that the figure (Sales Value) in the cube is incorrect. I am getting a very large values which is impossible.
    Can someone please help me.
    Shanka

    Hi,
    are you sure that cube has customer wise aggregated data..since it will always aggregate the values of the key figures for the same set of characters...
    did you checked the values for the key figures as well and if even they are inflated or is the problem with this key figure only.
    During the data load the records may aggregates first for the same values of characters and then multiplication will be happening....if that is the case then you may have to multiply the values before storing it in the data package and then let it aggregate....can be achived through start routine...
    but first verify if other key figures are also having the same issue.
    Thanks
    Ajeet

  • How to create a report to bring all data from two different Info providers

    Hi All,
    I have a peculier problem while creating a report. I have two custom info providers one DSO and another Cube. There are only two common fields between these two Info providers . I need to create a report such that the report displays all the values from DSO but user can have the selection option on one of the fields in the Cube.
    Here is an example
    DSO Contents:
    DocNum-     DocItem-     DocText-     Amount-      Quantity
    10000----     10----            ABC----          100----           10
    10001----     20----     DSN----     200----     10
    10005----     20----     DSN----     200----     10
    Z1003----     10----     CAN----     500----     1
    Cube Contents
    DocNum-     DocItem-     Date-----          InvoiceAmt
    10000----     10----     1/10/2009----         50
    10001----     20----      2/20/2009----        100
    10005----     20----      2/25/2009----        100
    The report needs to be displayed as shown below when the user selects value for date from 1/10/2009 to 2/20/2009
    DocNum-     DocItem-     DocText-     Amount-      Quantity
    10000----     10----     ABC----     100----     10
    10001----     20----     DSN----     200----     10
    I hope this was clear for you to understand. I would really appricate if any one can answers about how to resolve this problem. I cannot add the date filed to DSO and I also have Doc Num and Item as the user selection fields in the report.
    Thank you all in advance and i would really appreciate for your suggestions.
    Regards
    Chinna
    Edited by: chinna2479 on Mar 3, 2009 7:38 PM
    Edited by: chinna2479 on Mar 3, 2009 7:39 PM

    Hi chinna,
    Two possible options, I can think of now, but both of them may be a compromise with performance.
    1. create an infoset and then a query on top of it, provided we have a one to one relation in both the targets. That is, the combination of doc and item number is not duplicate in either cube or ODS.
    2. Create a master data object of doc and item number and have date as an attribute. Load that from cube data and make date as navigational attr.
    Use this navgntal attr for selection in your report.
    Let us know, if you require any further info.
    Naveen.A

  • Upload data from Excel to BI

    Hi 2 all,
    Can anyone please send me the complete steps for uploading of data from excel to BI??
    Also tell me that when we use DSO or when we use infocube? and if we design query in query designer then we use info cube fields or DSO fields??
    Please respond.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi,
    there is no separate Tcode for 3.5 environment... but in RSA1 itself they give 3.X functionality also.. So, if you want to follow the 3.5 procedure you can go thru that... in the Infosource tab--> select your info area -->and right clcik it.. ->in that create INFOSOURCE 3.X.. for that just right clcik ur CUBE or DSO and --> Additional functions --> Update Rules.. and like that you can follow the same procedure which you done in 3.5..
    and for data loading in BI 7.0 from fla file means
    fisrt create one Cube or DSO with the same structure which you have in flatfile..
    and activate it..
    ->now comes to Datasource tab> create one Datasource here you need to select type of data for example.. select Transactional data --> and menntion your flatfile name in extraction tab- and file type and eneter your info object names in FIELDS tab --> and load preview data Activate it..
    now select your datasource and create info package and schedule it.. now your data will loded in to PSA level...
    > and now comes to info provider select your cube.. and right clcik it.. and create transformations.,. and activate it..
    > and create DTP -- Activate it.. and Execute it..
    1)Create datasource. Here u can set/check the Soucre System fields.
    2)Create Transformation for that datasource. (no more update rules/transfer rules)
    2.1) While creating transformation for DS it will ask you for data target name, so just assign where u want to update ur data.
    DataSource -> Transformation -> (DTP)-->Data Target
    Now if you want to load data into data target from Source System Datasource:
    1) Create infopackage for that data source. If you are creating infopackage for new datasources, it will only allow you update upto PSA, all other options u can see as disabled.
    2)Now Create DTP (Data Transfer Process) for that data source.
    3) NOw schdule the Infopackage, once the data is loaded to PSA, you can execute your DTP which will load data to data target.
    Data Transfer Process (DTP) is now used to load data using the dataflow created by the Transformation. Here's how the DTP data load works:
    1) Load InfoPackage
    2) Data gets loaded into PSA (hence why PSA only is selected)
    3) DTP gets "executed"
    4) Data gets loaded from PSA into the data target once the DTP has executed
    1) Create a data source
    RSA1->Source Systems->FILE(File)->PC_FILE(Filesourcesystem)->Create Application Component(optional)-Create Data source
    2) Create the data provider
    3) Create Transformation
    Right click on the data provider, choose 'create transformation' and choose your data source (give relevant data source and its type)
    Just connect the relavant fields between your data source and data provider.
    4) Create DTP
    Then Double click on the DTP node created under yous transformations. choose the extraction mode
    5) Load the data: there are 2 ways:
    you can run the infopackage and DTP separately or create a process chain consisting of these infopackage and DTP and run.
    Also check /people/sankar.kumar/blog/2006/10/11/loading-text-filestxt-into-bw-with-hex-option for hex option
    Thanks,
    Sankar M

  • How can I Move data from one column to another in my access table?

    I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
    I understand how to drop a column or add a column, how do I transfer data from one column to another.
    Here is my trial code:
    <cfquery name="qQueryChangeColumnName" datasource="#dsn#">
      ALTER TABLE leaderboard
      UPDATE leaderboard SET  points2 = points3
    </cfquery>
    Unfortunately, I get the following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
    How can I transfer my data with the alter table method?

    I looked up the Access SQL reference (which is probably a
    good place to start when having issues with Access SQL), and
    it suggests you probably need a WHERE clause in there.
    I agree the documentation is a good place to start. But you should not need a WHERE clause here.
    Too few parameters. Expected 1.
    If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message..

  • How do i transfer data from one internal tabe to another.

    Hi All,
             How do i transfer data from one internal tabe to another.
             Can i do it ebven if he tables are different in structure.
    Please Advice.
    Thanks in advance.

    Hi Saket Tiwari,
    I hope the earlier post by kashyap is good enough an answer. anywas in addition to it let me give a detailed
    explanation of how you can populate an internal table.
    1) Append data line by line.
         Syntax :  APPEND [<wa> TO / INITIAL LINE TO] <itab>.
    this appends new line to internal table <itab>.
    2) Using COLLECT statement.
                 COLLECT is another form of statement used for populating the internal tables.  Generally COLLECT is used while inserting lines into an internal table with unique standard key. The syntax for COLLECT statement is as shown
         Syntax : COLLECT [<wa> INTO] <itab>.
    3) Using INSERT statement
         Syntax  INSERT [<wa> INTO / INITIAL LINE INTO] <itab> [index <idx>].
    INSERT statement adds a line/work area to the internal table. You can specify the position at which the new line is to be added by using the INDEX clause with the INSERT statement.
    Now coming to your request..
    To append part or all of an internal table
         Syntax
                  APPEND LINES OF <itab1> [FROM <n1>] [TO <n2>] TO <itab2>.
    *     Note:
    Without the FROM and TO options, this statement appends the entire table <itab1> to <itab2>.*
    b) To insert part or all of an internal table into another internal table
         Syntax
              INSERT LINES OF <itab1> [FROM <n1>] [TO <n2>]
              INTO <itab2> [INDEX <idx>].
    c) Using Move statement.
    To copy entire contents of one table into another in one execution
         Syntax MOVE  <itab1> To <itab2>.
                   OR
              <itab1> = <itab2>.
    but u hav to be careful because he contents of itab2 will eb overwritten on the execution of this statement.
    These copy the contents of ITAB1 to ITAB2. Incase of internal tables with header line we have to use [] inorder to distinguish from work area. So, to copy contents of internal tables with header line  the syntax becomes,
    ITAB1[] = ITAB2[].
    Coming to the letter part of your question, Yes, we can copy values between tables having different structures.
    for this we use    
                                MOVE-CORRESPONDING <itab1> TO <itab2>
        this executes the statement for their header lines. Searches for the sub-fields which occur both in itab1 and itab2 and then generates, for all relevant field pairs which correspond to the
            sub-fields ni , statements of the form MOVE itab1-ni TO itab2-ni. The other fields remain unchanged.
    I hope the information provided has been of your help.
    Reward if useful.
    Regards,
    Jose

  • How do I transfer data from one exterior harddrive to another?

    How do I transfer data from one exterior harddrive to another when they are both connected to our Imac Desktop?

    Depends what you want to transfer...
    A few more Details about what you are trying to achieve would be good.

  • How can I transfer all my data from my current iCloud account to a new one?

    Hello,
    Please allow me to explain my situation:
    I currently use an iCloud account named, for example, [email protected]
    I have recently rebranded my business from www.current.com to www.new.com.
    Because of this, I would like to create a new iCloud account with an email account name of [email protected]
    I realize that I can achieve a similar result by adding an alias of [email protected] from my [email protected] email, but I would like to change my account name for the iCloud service itself as well, not just email. This is for aesthetic reasons because I would like to have the same login for everything I use.
    How I can transfer all my iCloud data from [email protected] to [email protected]? I would like to transfer all data completely, as I use every feature of iCloud extensively, including email folders, notes, Safari bookmarks, etc.
    Thank you very much, I look forward to your response.
    Edward

    I made a reply to your other post

Maybe you are looking for

  • Submix into 5.1

    I got a problem and could not find any answer yet. I got a project in Premiere CC with 3 camera-views and several aditional sound-tracks. I started off in stereo (as all of them are in stereo) and now I am reediting it into 5.1. The current situation

  • DVD Player can't read files burned in Finder

    Hello all, I had an avi file that I converted to play as a DVD using ffmpegx. I burned it to a DVD-R in the Finder, ejected it, popped it back in and the DVD player says "supported disc not available." It plays fine in one of my DVD players (curiousl

  • How does the y550p do with Ubuntu

    Has anybody tried Ubuntu 9.10 on an Ideapad y550p? Would be nice to hear if everything works. Is the casing of the laptop actual metal or is it plastic, I've never had on in my hands, the pictures look like metal Thanks Andreas

  • Data Type Convertion in ABAP

    Hi, i want to convert a numeric type field to character type field in ABAP, and also i want to concatenate some set of different types of field to a character type field at last if i give just like this <b>CONCATENATE '   ' it_pa0000-pernr it_pa0105-

  • Problems with displaying pictures for albums on iPod screen

    Hello! I have an iPod with 60gigs and since I've updated to software version 1.1 I couldn't display any new CD-covers on the iPod screen related to the album that is playing. Strange thing is that when I play the same song from the iPod in my iTunes,