Fpga FFT input data type

I am using the FFT on a 9076 FPGA, in a single cycle loop, and I will be processing data from both a 9205 and a 9235.
The 9205 FXP is 26,5, while the 9235 is 24,-4.  What is the best way to deal with this?
I am not sure what will fit (I am finally compiling as I type this), but I am hoping to have 4-8 multiplexed FFT pipelines running in parallel.  While I understand FXP, I am a little shaky when it comes to how and when to handle conversions.
Thanks!

To handle both with the same precision as you would get individually, you would need to use the superset of the two FXP types. One trick to figure that type out is wire a control of each FXP type to the inputs of a Select function and observe the resulting output type (<s,33,5> in this case).
That is likely larger than you need, so options include using a dedicated FFT for each type, reducing the types to the minimum precision required, and/or scaling one of the channels to align with the other. You can check the specs for those two modules to get an idea of what precision they actually provide. A 16-bit module with calibration applied normally needs 20 bits to meet the hardware specs, so you could try a type of <s,20,5> for that one, discarding 5 LSBs.
For the scaling idea, use Reinterpret Number to cast the <s,24,-4> type to <s,24,5> to align with the other type (essentially a free multiply by 2^9). Since the FFT is a linear operation, you can simply correct the output with another cast in the opposite direction by subtracting 9 from whatever the output IWL is.
Finally, keep in mind that all coercions default to saturate and round to nearest even, so use explicit conversions if you want to save resources by truncating when operating on mismatched types.

Similar Messages

  • Input data type of Matlab script node

    Hi,
    I have 1D array of complex number in single precision.
    Matlab script node is used to import data into Matlab and do some data processing, and then export.
    Data type of input is currently double precision.
    How to re-define this input data type of the Matlab script node?
    Thanks,

    Right, arrays of singles are not supported. See Comparison of MathScript RT Module and the MATLAB® Software Data Types in LabVIEW
    As for memory usage, Profiling the VI should let you know how much memory Labview uses when running your code. Communication with MATLAB® is done through ActiveX, and I'm actually not 100% sure whether it will reflect memory usage from script execution. I think it'll be simple enough to profile your VI with and without the MATLAB Script node and note the memory usage difference...
    Misha

  • Is there any password input data type?

    hi,
    I want to use the readLine() function to get a password from the user..
    however I want the user's input to show up as '*****' when they type that in.
    Is there any way to do that?
    Thanks
    Kal.

    I am not using any GUI.. sorry, but what do u mean by ECHO?
    Here is what I have so far..
    public static void getPassword() {
    System.out.print("Enter password-->");
    DataInputStream input = new DataInputStream(System.in);
    try{
    password = input.readLine();
    catch (IOException e) {
    System.out.println("ERROR " + e);
    Thanks
    Kal.

  • How to use the discrete unit delay block with the waveform as the input data type?

    Hi,
    I'm using LabView 2011 to implement a design system. I want to first downsample the input signal and then go through the discrete unit delay function. However, after the unit delay function, i don't get the right output, is there a way to fix that?
    The input is fixed to be the simulate signal since i'm using it for other implementation as well and i don;t want to change it.
    plz see the attachment , thx!
    Attachments:
    test2.vi ‏355 KB

    Hi Tim,
    Thanks for replying!
    What u did is exactly what I want except that I want to downsample the simulate signal first before I put it into a delay block.
    I tried what u said, however, it only works for very small frequency such as 0.01 Hz. When I set the input to 10 Hz, the delay block doesn't work at all. For the diagram u have, what is the input frequency u set to the simulate signal?
    The reason I'm use the Express VI is because I use it as the input of the frequency estimation block. So basicly what I'm doing is :
    sine wave ->downsample it->delay the downsampled signal and do some numerical calculation(adding,multipling) ->estimate the frequency of the output signal -> this frequency is used to determin the sample factor in the downsampling process.
    I attached the VI with the downsamped involved
    I can't copy the downsample.vi because I use the evaluation version 30 days for that toolkit .
    I attached the VI for frequency  estimation as well.
    Thanks so much!
    Ivy
    Attachments:
    Testing.vi ‏238 KB
    Frequency Estimation.vi ‏61 KB

  • How to bind complex input/output types in web service data control

    Hi,
    I have created data control using external web service for simple input & output data type and its working fine.
    But I don't know how it can be done for complex data types.
    My external Web services have complex input & output types. Such as java object which contains another java object again it contains another java object or arry or java collection etc.
    Each my service has one complex input data type and for this no user input is require so how I can do it without using any component for it.
    I want to bind my page components with this input & output type.
    What is the best approach to do this and how to bind screen component.
    Regards,
    Devang

    Hi,
    Thanks frank.
    I already check this link before posting this so if you have any other link then kindly reply.
    Regards,
    Devang

  • Regardibg double byte data type in Xi(japanese character)

    hi am giving japanese character(double byte) as a input data types, will you please tell me how to give whether as a string or constant ..etc. and please give information generally about double byte data type
    regards,
    S.K.Karthikeyan.

    Hi Stefan,
    I got your point it's really helpful for me.
    I have one more doubt;
    Is there any equivalent type for double byte char in XI ?
    regards,
    S.K.Karthikeyan.

  • Changing Chart Data Types

    Hi,
    I know this is a stupid question, but I can't figure for the life of me
    how to do it. I want to create a histogram, so I stick a waveform chart
    onto my VI. Fine, now I found the Moving Histogram PtByPt.vi example
    (ships with LabView 7). It creates a histogram and the data it sends to
    it is a cluster. This is very convenient because you just wrap your XY
    data up into a cluster and send it into the chart. Right now I can cut
    and paste the chart from this example, but if I didn't have the example
    I'd create a waveform chat, create my cluster with my xy data and pass
    it in. However, LabView complains about bad data types, because the
    default input data type is a 2D array of doubles. HOW DO I CHANGE THE
    DATA TYPE THE CHART ACCEPTS? I've been through every menu and property
    that I can think of, what's the secret? I've had this problem happen a
    couple of times and usually gotten around it by right clicking my lead
    and then picking to create something from a list and when it's created
    it's created with the right data type. However, it doesn't have that
    option in this situation. So what do I do? I've included a junk of my
    code for you to see if you want.
    Thanks for any help,
    Chris
    Attachments:
    Coincidence_v1.vi ‏53 KB

    You've got two different types of graphs. You have the XY graph wired to the cluster and you have a regular (not XY) graph. The regular graph does not accept the same type of input as the XY graph. It accepts a 1D  x array, 2D array (multichannel) a waveform data type, an array of waveforms (multichannels), and a cluster that contists of a y array, x0, and dx (essentially a waveform data type)

  • Fpga PID require more than 16 bits for data type

    Hi,
    So i am using Fpga PID block for a control task taht needs to be run at 1000hz. The problem I am having is that the FPGA PID block only accepts data types of 16bit length. This does not give me the range and accuracy that i require for the task. At a minimum i feel i would need 32 bits.
    Is there some way to achieve this; maybe dynamic scaling? custom blocks, some other operation? or a completely different control alternative?
    Any suggestions would be most welcome.

    In practice i know it matters a lot.  if you have a low value of an integrator and a high loop rate, then the integration accumulator never grows unless it has enough bits of resolution.  maybe this has not occured for you but it has happened with real use cases for me.
    I know this because i use closed loop control all the time.  if your suggestions revolve around "you can scale it so it doesn't matter" i would suggest that using the appropriate PID algorithm is even easier to do than figuring out how to use a poor algorithm.
    nathand wrote:
    The input to the FPGA PID is a 16-bit fixed-point value. You can represent 20.5 exactly in fixed point. I don't remember the exact format (number of integer bits) of the PID input and don't have the FPGA toolkit on this computer, but you can scale as necessary to make the input range match the fixed-point range.
    The coefficient (I assume you mean integral gain) has no bearing on whether or not it integrates, because the integration is done prior to multiplication by the gain. I understand your concern about the minimum you can integrate but I think in practice it turns out not to matter, if your input and output have the same precision (for example both 16-bit). You can pick your scaling and gains such that you need several counts of integrated error to get a one-count change in output if that's what you want.
    Stu McFarlane
    Viewpoint Systems, Inc.

  • How to change data type of input parameter

    Hi
    In my procedure i declared the data type of "Value Date" Input parameter as Date where as in CR it is showing data type as "Date Time". Can any one please specify how to change to Date.
    While prompting for input parameter in description it is showing message as
    Please enter Date time in format"yyy-mm-dd hh:mm:ss" . To change the content selected "format field" option. But is there any way to change input parameter data type.
    Please suggest how to change.
    Thanks Sruthi

    Hi Sruthi,
    all you need to do on this is open the report go to the parameters, select the parameter that you wish to change and click "Edit". This will allow you to change thefield to a date rather than a date time.
    Regards,
    Noel

  • Data Type Is Not Vailid for Input

    Hello,
    I'm new in (ABAP) WebDynpro and I have a problem with displaying data - particularly with HROBJECTs from our e-Recruiting system.
    In my WebDynpro-Component i read some data of candidates into my context. One table (with candidate-infos) which i save in my context includes a field which is datatype of HROBJECT. After I've read this infos into my itab, I bind this table to my context. All this works fine! But as soon as I bind this context to a table-ui-element in my layout, i get a error message "Data Type Is Not Valid for Input", when i start the application.
    If I delete the binding with the attribute which is a HROBJECT, it works.
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_WDR_CONVERSION_EXCEPTION
    Information on where terminated
        Termination occurred in the ABAP program "CL_WDR_CONVERSION_UTILS=======CP" -
         in "IF_WD_CONVERSION_UTILS~TO_STRING".
        The main program was "SAPMHTTP ".
        In the source code you have the termination point in line 138
        of the (Include) program "CL_WDR_CONVERSION_UTILS=======CM00G".
        The termination is caused because exception "CX_WDR_CONVERSION_EXCEPTION"
         occurred in
        procedure "IF_WD_CONVERSION_UTILS~TO_STRING" "(METHOD)", but it was neither
         handled locally nor declared
        in the RAISING clause of its signature.
        The procedure is in program "CL_WDR_CONVERSION_UTILS=======CP "; its source
         code begins in line
        1 of the (Include program "CL_WDR_CONVERSION_UTILS=======CM00G ".
    136     WHEN cl_abap_typedescr=>typekind_struct1    "'u'     " structure
    137     OR   cl_abap_typedescr=>typekind_struct2.   "'v'.    " structure
    >>>>       RAISE EXCEPTION TYPE cx_wdr_conversion_exception exporting textid = cx_wdr_conversion_
    139 *      raise exception type cx_wdr_conv_unsupported exporting type_name = l_type.
    Please Help.
    Thanks

    now i've tried it with a independent candidate node (without) supply funciton. =>
    The same error: "Data Type Is Not Vailid for Input"
    Here's the code of my supply-function:
    (probably not the best coding - but it works until i want to display a hro.)
    METHOD get_cand_info .
      DATA: lr_cdcy                    TYPE REF TO cl_hrrcf_candidacy_bl,
            lr_cand                    TYPE REF TO cl_hrrcf_candidate_bupa_bl,
            stru_requisitions          TYPE if_componentcontroller=>element_requisitions ,
            lt_h_cdcy_list             TYPE rcf_t_list_candidacies_x,
            ls_h_cdcy_list             TYPE rcf_s_list_candidacies_x,
            lt_cdcy_list               TYPE if_componentcontroller=>elements_candidate,
            ls_cdcy_list               TYPE if_componentcontroller=>element_candidate,
            lt_addr                    TYPE rcf_t_addressdata_bp,
            ls_addr                    TYPE rcf_s_addressdata_bp,
            lt_email                   TYPE rcf_t_emaildata_bp,
            ls_email                   TYPE rcf_s_emaildata_bp.
    * get all declared attributes
      parent_element->get_static_attributes(
        IMPORTING
          static_attributes = stru_requisitions ).
      CALL METHOD cl_hrrcf_candidacy_bl=>get_instance
        RECEIVING
          return = lr_cdcy.
      CALL METHOD cl_hrrcf_candidate_bupa_bl=>get_instance
        RECEIVING
          return = lr_cand.
    * Hole Kandidatur-Informationen der Kandidaten
      TRY.
          lr_cdcy->get_candidacy_list_x(
            EXPORTING
              ps_req_hrobject  = stru_requisitions-hrobject
    *    ps_cand_hrobject =
    *    ps_appl_hrobject =
    *    p_exclude_draft  = 'x'
            IMPORTING
              pt_candidacies_x = lt_h_cdcy_list
        CATCH cx_hrrcf .
      ENDTRY.
    * Ergänzen der Informationen mit BusinessPartner-Infos
      LOOP AT lt_h_cdcy_list INTO ls_h_cdcy_list.
        TRY.
            lr_cand->get_contact_data(
              EXPORTING
                ps_cand_hrobject = ls_h_cdcy_list-cand_hrobject
              IMPORTING
                pt_addressdata   = lt_addr
    *    pt_telefondata   =
    *    pt_faxdata       =
                pt_emaildata     = lt_email
          CATCH cx_hrrcf .
        ENDTRY.
        READ TABLE lt_addr INDEX 1 INTO ls_addr.
        READ TABLE lt_email INDEX 1 INTO ls_email.
        MOVE-CORRESPONDING ls_h_cdcy_list TO ls_cdcy_list.
        ls_cdcy_list-postcode1 = ls_addr-postl_cod1.
        ls_cdcy_list-city1 = ls_addr-city.
        ls_cdcy_list-email = ls_email-e_mail.
        APPEND ls_cdcy_list TO lt_cdcy_list.
      ENDLOOP.
      CALL METHOD node->bind_table
        EXPORTING
          new_items = lt_cdcy_list.
    ENDMETHOD.

  • Japanese characters alone are not passing correctly (passing like ??? or some unreadable characters) to Adobe application when we create input variable as XML data type. The same solution works fine if we change input variable data type to document type a

    Dear Team,
    Japanese characters alone are not passing correctly (passing like ??? or some unreadable characters) to Adobe application when we create input variable as XML data type. The same solution works fine if we change input variable data type to document type. Could you please do needful. Thank you

    Hello,
    most recent patches for IGS and kernel installed. Now it works.

  • Sysgen : How to read the input port data type, width and rate dynamically in a masked subsystem ?

    Hello everybody,
         I am designing a general purpose block in system generator. I pass the user parameters to the block through masking it. Some user parameters can change the block configuration. The input port data type, width and rate can also affect the block configuration.
         The problem is that these values (input port data type, width and rate) are subject to change. So I should read them dynamically, then change the block configuration through programming the "Initialization Commands" field. But unfortunately there is no straight way to read the input port information.
         There are some methods in for example the "Black Box". these are:
    input_width = this_block.port('din').width;
    input_rate = this_block.port('din').rate;
    But these methods are not applicable to a masked subsystem.
    I have tried other ways also. You can find them below. None of them worked.
    Does anybody know how can I solve this problem?
    Other ways I tried:
    1)
    design_name([],[],[],'compile')                                       
    q=get_param(gcb,'PortHandles');
    get_param(q.Inport,'CompiledPortDataType')
    get_param(q.Inport,'CompiledPortWidth')
    get_param(q.Inport,'CompiledPortDimensions')
    design_name([],[],[],'term')
    2)
    ssGetInputPortDataType
    3)
    ts = Simulink.Block.getSampleTimes([gcb '/Input'])
     

    Today we rely on Simulink to perform parameterization of your designs in two ways:
    Parameterizable Subsystems and Blocks : Parameters themselves can be MATLAB expressions that need to be evaluated for which we need the MATLAB interpreter
    The very useful Rate and Type propagation or Simulink compilation that allows us to specify types & rates in one location that gets systematically propagated to all.
    To truly make the HDL Netlist that is generated from SysGen parameterizable, we would have to implement some of this capability in the HDL netlist itself by:
    Using Generics(VHDL) or Parameters(Verilog) - We would have to capture the bit width(type) propagation through levels of hierarchies and finally parameterize the IP itself based on this value
    Since IP itself does not have this capability through generics, we would have to package a separate tcl script that updates the IP parameterization appropriately in response to top level parameters(or GUI parameters)
    Interpreting MATLAB expressions and translating them into VHDL/Verilog expressions (alternatively tcl expressions of IP). In simulink, mask parameters can be passed from one level to the next. Also parameterization of a block can be composed of Matlab expressions using variables from ancestor masks & the MATLAB interpreter – so we will need to somehow capture that as well.
     

  • Incorrect data type when writing to FPGA Read/Write Control

    I have run in to a problem this morning that is causing me substantial headache.  I am programming a CompactRIO chassis running in FPGA mode (not using the scan engine) with LabVIEW 2012.  I am using the FPGA Read/Write Control function to pass data from the RT Host to the FPGA Target.  The data the RT host is sending comes from a Windows host machine (acting as the UI) and is received by the RT Host through a network published variable.
    The network published shared variable (shared between the RT and Windows system) is a Type Def cluster containing several elements, one of which is a Type Def cluster of fixed point numerics.  The RT system reads this shared variable and breaks out the individual elements to pass along to various controls on the FPGA code's front panel.  The FPGA's front panel contains a type def cluster (the same type def cluster, actually) of fixed point numerics.
    The problem comes in the RT code.  After I read the shared variable I unbundle the cluster by name, exposing the sub-cluster of fixed point numerics.  I then drop an FPGA Read/Write Control on the RT block diagram and wire up the FPGA reference.  I left click on the FPGA Read/Write Control and select the cluster of fixed point numerics.  I wire these together and get a coercion dot.  Being a coercion dot hater, I hover over it the dot and see that the wire data type is correct (type def cluster of fixed point numerics), but the terminal data type is listed as a cluster containing a Boolean, code integer and source string, also known as an error cluster.  I delete the wire and check the terminal data type on the Read/Write Control, which is now correctly listed as a type def cluster of fixed point numerics.  Rewiring it causes the terminal to revert back to the error cluster.  I delete the wire again and right click on the terminal to add a control.  Sure enough, a type def cluster of fixed point numerics appears.  Right clicking and adding an indicator to the unbundle attached to the network shared variable produces the proper result.  So, until they are attached to each other, everything works fine.  When I wire these two nodes together, one spontaneously changes to a error cluster.
    Any thoughts would be appreciated.

    My apologies I never got back to responding on this.  I regret that now because I got it to work but never posted how.  I ran in to the exact same problem today and returned to this post to read the fix.  It wasn't there, so I had to go through it all over again.
    The manifestation of the problem this time was that I was now reading from the Read/Write FPGA front panel control and writing to a network published shared variable.  Both of these (the published shared variable and the front panel control) were based on a strict type defined cluster, just like in the original post.  In this instance, it was a completely different cluster in a completely different project, so it was not a one-off thing.
    In addition to getting the coercion dot (one instance becoming an error cluster, recall), LabVIEW would completely explode this time around.  If I saved the VI after changing type definition (I was adding to the cluster) I would get the following error:
    Compile error.  Report this problem to N.I. Tech Support.  Copy cvt,csrc=0xFF
    LabVIEW would then crash hard and shutdown without completing the save.  FYI, I'm running LabVIEW 12.0f3 32-bit.
    If I would then reopen the RT code, the same crash would occur immediately, ad nauseam.  The only way to get the RT code to open was to change the type defined cluster back to the way it was (prior to adding the new element).
    I didn't realize it last time around (what originally prompted this post), but I believe I was adding to a type def cluster when this occurred the first time.
    So, how did I fix it this time around? By this point I tried many, many different things, so it is possible that something else fixed it.  However, I believe that all I had to do was to build the FPGA code that the RT code was referencing.  I didn't even have to deploy it or run it... I just had to build it.  My guess is that the problem was the FPGA Reference vi (needed to communicate with the FPGA) is configured (in my case) to reference a bit file.  When the development FPGA Main.vi ceases to match the bit file, I think that bad things happen.  LabVIEW seems to get confused because the FPGA Main.vi development code is up and shows the new changes (and hence has the updated type def), but when you ask the RT code to do something substantial (Open, Save, etc), it refers to the old bit file that has not yet been updated.  That is probably why the error getting thrown was a compile error.
    I'm going to have to do an additional round of changes, so I will test this theory.  Hopefully I will remember to update this post with either a confirmation or a retraction.

  • Data type determined at run time, how to provide the input type in advance

    Hi all,
    Here I have a requirement:
    on my UI, there is an inputfield which receives user's input. But the data type can't be known at design time.
    But I need to bind a context attribute to the inputfield first at design time, which data type should I use( the inputfield can recevie
    data of any type ) ?
    and how to convert the this data type into different data type( can be any type )?

    Hello Aaron,
    There can be a workaround for your requirement.
    you can assign a char data type to that field since Char can accept all characters, numbers, special symbols.
    But, you need to do validations later on the see if it is a number or all alphabets and accordingly you can assign that field to any data type  by doing little bit of manipulations.
    Hope this helps.
    Regards,
    Anand

  • Static input help for DATS type

    Hello,
    I'd like to link static input help for screen field of DATS type. If I click on help linked to this screen field I get CONVT_NO_NUMBER error: 'Unable to interpret "=2" as a number.'
    My steps:
    - In Screen Painter I selected desired screen field and selected DATS type and "1 Show at selection" in its details.
    - I defined global variable with same name as desired screen field
    What's the problem?
    Best regards,
    Josef Motl

    Hi,
    do this way.....
    first declare the variable in program as
    1. data: date type sy-datum.
    2. now go to your screen,(click on F6) use get from Program
    now choose date form it , and say ok, now save it and activate it.
    delete the old one..
    now you will be able to get all the things which you want.
    automatical validation also possible, and F4 also possible.
    Regards
    vijay

Maybe you are looking for