FPGA quick questions: High Throughput Division vs. Multiplication Implementation (rounding?)

Hi all,
I'm trying to implement a simple routine where I divide a FXP by the number 7 in FPGA. I wanted to use the high throughput division but it seems to only round to the nearest integer although the output is capable of representing fractions. Alternatively, I could multiply my number by 1/7 using the high throughput multiplication and I get what I want. I'm not too familiar with FXP arithmetic. Without fully understanding the problem, I at least have a solution which is to use the multiplication. I'd just like to know a little more. Can anyone please shine some insight on why the division rounds even though it can handle fractions?
Thanks for your help
Jeffrey Lee
Solved!
Go to Solution.
Attachments:
highthroughputdivisionormultiply.png ‏31 KB

Thanks for the suggestions. I recreated this and indeed was able to get the correct results! So what happened?
This may blow your minds, but there is something inherently wrong with my x/y indicator. I have it on "adapt to source". I created another supposedly identical indicator ("x/y 2") off the same wire and get the correct result with that indicator. This seems like some kind of bug but it worries me because I should have never run into it.
I've attached a screenshot of the code in action as well as the VI (i'm using 2011)
Thanks
Jeffrey Lee
Attachments:
highthroughputdivisionormultiply_2.png ‏52 KB
highthroughputdivideIssue.vi ‏21 KB

Similar Messages

  • 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

  • Questions about the High Throughput Math Functions

    Hello,
    i am just trying to unterstand what advandages the High Troughput Math Funtions have. So i have to ask some Questions.
    I always talk about beeing inside a SCTL.
    1. In the Image you can see four Add Functions. One with U32 which should use more Ressouces than the one with the U16Datatype which uses mor than the U8. But does my FXP High Througput Math Function use less Ressources than the U8 Version?
    2. Which of this four Add Functions will take less time for Execution?
    3. If I would Add two 32bit Numbers one with the normal Add and one with the High Throughput Add. Which of the Functions will use less Resources and which will be faster?
    4. How would it bee if i had a Multiplication instead? When i unterstand the concept of a Multiplication right it will be done with a DSP48E. This Logic Block is able of Multiplying a 25bit Number with a 18bit Number. So the U32 Multiply will use 2 DSP48Es and the other three Functions would use one DSP48E.
    I guess the U32 Version will have the slowest Execution?
    Whats about the other three will their execution speed be equal or will the Versions with smaller Datatypes be faster?
    With kind regards
    Westgate
    Solved!
    Go to Solution.

    I don't see a big rush to answer this, so I'll give it a shot:
    1. The HT version uses less resources, but only because it is configured with the smallest data types. You should get exactly the same results with the same data types and an Add function. The only difference with the HT version is the ability to specify an output register, and the handshaking signals that account for that delay. IF the add is implemented in a DSP48, the integrated register can result in better timing, but in practice it is usually equivalent to an Add function followed by a feedback node.
    2. The actual delay through an add is proportional to the number of bits, where the critical path is the sequentially computed carry chain. So you could run the last one at the highest clock rate. The FPGA has dedicated fast carry logic, so the difference isn't too significant.
    3. The first one will be VERY slightly smaller and faster, just because you're computing one extra output bit on the second one.
    4. I would expect the speed to depend only on the number of DSP48s used, so the last 3 should be similar. You'd be likely to see different results in practice, though, due to routing differing numbers of bits to registers for the indicators. This assumes you're not taking advantage of any of the pipelining configuration options in the HT Multiply. Those options, and the associated handshaking signals, are really what differentiates the HT versions from the regular numeric functions. They allow you to achieve higher clock rates and throughput at the expense of latency (ie, it will take more clock cycles to produce a valid result but you can get more data through the function in a given amount of time).
    Caveats: All your examples have constant inputs, so the LabVIEW compiler and/or Xilinx tools can and will optimize them to no ops. Small multiplies, multiplies with one constant input, or those just larger than 25x18 may also use some non-DSP48 logic for all or part of the implementation. Note that the HT palettes provide a DSP48E function in case you want control over exactly how a multiply and/or add gets implemented. Placing and routing can result in unexpected behaviors, so estimating timing is much more difficult than simply adding up component delays.

  • How can i do a sine wave with High Throughput Sine for fpga?

    I try to do a sine wave looking the examples but i can't. I have a sbRio 9606. 
    I need to do a sine wave with high throughput block. In my exercise i have 2 inputs (amplitude and frecuency) and i have to look the output (sinewave)
    I need help!!

    Hi pablosan,
    If I understood correctly, you want to generate a sine wave with a high throughput block in Labview FPGA.
    I'm afraid you won't e able to do this, as these blocks are specifically designed for other FPGA targets with better features for high performance. So instead of using the example named "Sine and Cosine.lvproj" under High Throughput examples, you can use the "Sine Wave.lvproj" under Signal Generation and Processing examples, which is more adequate to your Single-Board RIO.
    Regards.

  • Fpga high throughput multipliers

    When should you use these multipliers rather than ordinary multiplies? Is there any drawbacks if using these ie do they take more gates to implement?
    What about high throughput additions?
    Thanks
    Solved!
    Go to Solution.

    You might find this link from the help information: Using the High Throughput Math Functions
    In particular: "National Instruments recommends that you use the LabVIEW Numeric functions unless you need the benefits that the High Throughput Math functions provide."  I don't know if there's any penalty for using them when not needed.  For additions and multiplies, the major advantage to the high-throughput operations is that you can more easily control pipelining when executing a series of mathematical operations. (EDIT: but if you don't need to pipeline mathematical operations, then there's no benefit.)

  • Quick question re select-options

    Hi
    I am relatively new to ABAP but have a quick question:
    I need to create a select-options which does the following:
    1. Allows ONLY "equals" signs
    2. Disallows intervals
    3. Disallows the use of ranges in the multiple selection box.
    4. Allows multiple individual selections.
    I can achieve most using the following:
    select-options s_knvh for knvh-kunnr no intervals.
    However, this still allows ranges using the multiple selection box, and also allows the "not equal to" option.
    Adding the "no-extension" syntax simply removes my ability to use multiple individual entries.
    Any ideas?
    Thanks
    Jon

    Use this FM.
    SELECT_OPTIONS_RESTRICT

  • QUICK QUESTION ABOUT PORTS

    Hi, I have a quick question about port forwarding/mapping. My question, lets say I am running MSN messenger, who's ports are 6880-6900. But lets say I am running a torrent application or something else that requires those ports. If both applications were running at the same time, would this cause interference with them on the same ports or now. Thanks
    Nathan

    Normally, only one application can listen to a specific port number at a time. If MSN is grabbing those 21 ports then your torrent app won't be able to run.
    However, most apps don't work that way - even if they use multiple ports, they don't use them all at the same time, so MSN might use 6880 when it starts up, leaving the others open for other applications to use if needed.
    Only experimentation will answer that one.

  • Quick question concerned with external HD space

    just a quick question
    if TM only backs up files that have changed since the last backup
    why does every time it back up i end up with a folder in my external HD (that acts as a time machine) that is the same size of the hard drive?
    (e.g im using up 70 gigs on my macbooks HD..every time i back up with TM i end up with 70 gigs less on the external..should i just lose the space of the changed folders? :S)

    That's the "magic" (or "smoke and mirrors") of Time Machine.
    It makes "hard links" (sort of like multiple aliases) to the backups of the items that didn't change. That makes each backup, in effect, a full one.
    That's how when you go into the "Star Wars" display, it can show you a snapshot of your entire system at the time of any backup.
    If you look at your backups via the Finder, each dated backup folder is counting all those items that didn't change; so each one appears to be a full copy of your Mac. The sum of all the backup folders will be far greater than the amount used on the whole backup disk.
    By the way, be +*extremely careful+* using the Finder on your backups -- if you change, move, or delete anything there, you can hopelessly corrupt them.
    You can do everything you need to via TM.

  • Some quick questions before purchase of MBP

    Hey Guys/Gals,
    I've been a PC user all my life, but will now be making a permanent switch to Macs. I've been wanting to buy a MBP since they have been released, but have been hesitant (like many others I think...) about the issues of whine, extreme heat, warped screens etc...
    With the recent updates of the logic board and even battery, I think I'm ready to go for it. I just had some quick questions before I place my order:
    1. I could order my MBP from the computer store at my university. Do you guys think that will get me the newest possible MBP or will they maybe get me one that they have had in stock for ages? I really don't want to get stuck with an outdated logic board and/or battery. Is it safest just to order directly from the site?
    2. Although the issue with really hot MBPs seems to have gotten better, I am still quite shocked that people say that temperatures well above 70 Celsius are "within spec". I understand that Apple officially states this and that the Intel chip can handle up to 100 Celsius, but this seems crazy to me Basically, I want to ask if I am correct in my observations that the new Intel chips don't get much hotter than other chips around, but rather Apple has chosen to set the temperature mark that sets off the fans pretty hight (around the 70s if I remember correctly?)
    I would assume that in following their "mission" of creating beautifully designed computers, Apple also wants to have a really silent one. Now I'm all for a quiet machine, but I feel as though if fans were on either (a) all the time or (b) when the CPU reaches the high 50s lots of people would be happier.
    Anyway, it's just a thought. I noticed there are lots of experts around here, so I'm just interested to hear what you guys think about this approach that Apple seems to have taken. I don't think the heat will stop me from getting this amazing notebook, but it certainly is a little frustrating.
    Any responses are greatly appreciated.

    1. I could order my MBP from the computer store at my university. Do you guys think that will get me the newest possible MBP or will they maybe get me one that they have had in stock for ages? I really don't want to get stuck with an outdated logic board and/or battery. Is it safest just to order directly from the site?
    No matter where you take possession there's no assurance of when the machine was manufactured. There is really just as good a chance of getting a perfectly good computer regardless of place of purchase. If there is a problem it's covered under warranty. You can have the computer replaced within the first two weeks. Afterwards they will replace or repair. Without Applecare's extended warranty the computer is warranted for one year after purchase.
    2. Although the issue with really hot MBPs seems to have gotten better, I am still quite shocked that people say that temperatures well above 70 Celsius are "within spec". I understand that Apple officially states this and that the Intel chip can handle up to 100 Celsius, but this seems crazy to me Basically, I want to ask if I am correct in my observations that the new Intel chips don't get much hotter than other chips around, but rather Apple has chosen to set the temperature mark that sets off the fans pretty hight (around the 70s if I remember correctly?)
    You are wrong in your assumption. The Core Duo's maximum temperature is 125C before shutdown. Normal operating temperatures according to Intel's own documentation is 50-70C under average load. MBPs under heavy load will typically reach core temperatures over 80C. Then there's the added heat from the hard drive and GPU. The aluminum case acts as a partial heat radiator hence the case temperatures can get high. The MBP User Guide specifically states this and issues a warning about using the computer on one's lap.
    I would assume that in following their "mission" of creating beautifully designed computers, Apple also wants to have a really silent one. Now I'm all for a quiet machine, but I feel as though if fans were on either (a) all the time or (b) when the CPU reaches the high 50s lots of people would be happier.
    In fact the fans in the MBP are very quiet at least mine are. Unless you are in the hardware design business with intimate knowledge of using Core Duo chips in portable computers, then your observations, although certainly your opinion, are not based on anything factual.
    Anyway, it's just a thought. I noticed there are lots of experts around here, so I'm just interested to hear what you guys think about this approach that Apple seems to have taken. I don't think the heat will stop me from getting this amazing notebook, but it certainly is a little frustrating.
    More likely there are a lot of people around here who think they are experts. As the remark goes, "An 'expert' derives from ex, meaning 'has been', and spert, meaning 'drip under pressure.'"
    You'll read lots of opinions on these forums. Don't take for granted that everything you read is factual or truth. A lot of the opinions expressed are without any basis in fact.

  • A few quick questions about publishing for iPhone/Android

    I'm currently developing an iPhone/Android game in CS5 and I just have a few quick questions.  If anyone can answer even one or two I'd really appreciate it
    1- I'm developing using a 320 x 480 resolution for the iphone.  When I tested it, the status bar on the top of the screen makes the edges disappear.  How should I turn off the status bar?  And if I can't what resolution should I use?
    2- The performance is a little slow, and the game isn't very intense at all.  What's a good way to improve performance?
    3- For Android, what should I do for the resolution?  Is there a standard resolution or do I have to have multiple resolutions for multiple devices?
    4- Finally, is it worth getting the free trial of CS5.5 before I publish?  Is there anything in there that will be a huge improvement over CS5?
    All help is appreciated

    1. Publish in fullscreen
    2. Use bitmaps, cache all bitmaps, use minimized looping structure etc.
        http://www.yeahbutisitflash.com/?p=986
    3. Android: 480 * 800
    4. Not that much, but you have GUI updates and have a GUI publishing screen for packager for iphone too.

  • Quick question on potential Ti-4400 Problem

    Hi all,
    I think I am having some problems with my mobo and just wanted to ask a quick question...
    On my old box, I had major crashing problems when I put the Ti-4400 in while in the middle of 3D games.  I'm almost certain this was due to overheating.
    New rig...many fans!  Everything seems pretty cool.  However, among other problems I am having since putting this new setup together (onboard audio crashes, reboots while using IE, etc.), I am having crashes in the opening intro video to various games.  My recollection is that this is just crappy rez vids that don't tax the video card to nearly what the actual gaming should.  Does this sound right to every/anyone?  I don't seem to have any great problem during heavy 3D use (or 3dmark, etc.).
    Thanks.

    Currently I have actionPerformed method in the editor and an actionPerformed method attached to each button.Well, you should create an Action. The Action can be shared by both a menuItem or a button. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html]How to Use Actions for more information.
    should the listener be an innner class of the Editor class or an external class.Whether the Action is an inner class or external class doesn't really matter as long as it is a separate class.
    If the Action is unique and will only be used by the parent class, then making it an inner class can simplify coding since it has access to the variables of the class.
    If the Action is more generic and might be able to be used by multiple applications then it should be a separate class so you have code reusability.

  • High Throughput Complex Multiply Implementation resource

    There are two option in the implementation resource of a High Throughput Complex Multiply block in LabVIEW FPGA (Auto and Look-up Table). What is the difference between the two and what is the advantage of one over the other? which consumes less fpga resource?

    nmbernardo,
    Auto specifies that the compiler decides whether to use embedded block multipliers or look-up tables (LUTs) to implement the multiplier. Whereas Look-Up Table specifies that this function uses LUTs to implement the multiplier. Selecting this option might increase the clock rate at which this function can compile.

  • High Throughput Divide Inverted?

    I am trying to optimize a large FPGA VI and was doing some simple tests to determine FPGA usage and timing for some high use items. I was comparing the high throughput divide with the normal one. I am using a cRIO-9066. What I found was that the inputs to the high throughput divide, in this case, appear to be reversed.
    The equivalent normal divide works as expected, although it does take more resources and time. Has anyone else seen this? If so, is there a workaround?

    Forgot to add my versions. I am using a fully patched 2014SP1 stack (LabVIEW, FPGA, RIO).
    I have also since tested the high throughput divide in pipelined mode, and it has the same issue there, as well.

  • Report Generation Toolkit Error Quick Question

    Hi,
         I created the most awesome LabVIEW report ever at my desk using a trial version of the RGT and Office 2003.  I took this to my production machine and ")@#(&%(*#^%()^!!!"  The production machine has office 2007 and a fully licensed version of the RGT.  Both machines have LabVIEW 8.6.0.  I've read all the stuff about these errors and something about classes and dll's and whatnot's.  So my quick question, is:  Instead of matching the versions of Microsoft Office as recommended, can I just rewrite from scratch the VI that creates this world's most awesome LabVIEW report on the production machine to create the same effect? 
    Solved!
    Go to Solution.

    Hi 
    Quick Answer: Probably
    Slower answer: Microsoft changed a lot of things behind the scenes in Office 2007, but the Report Generation toolkit version 1.1.3 supports Office 2007 so you should be good to go. Depends on what functions are included in your VI. Liek the read me says "Several default settings in Microsoft Office 2007 differ slightly from previous versions. Reports you generate using Office 2007 might look different than reports you generate from other versions of Office because font sizes, cell sizes, and so on, differ."
    Best Regards
    David
    NISW

  • Two quick questions about Library after moving beginning on a new computer

    Hi there,
    I just moved from Windows to Mac, meaning I had to move my iTunes library from the old PC to my new MBA.
    Just a couple of quick questions.
    1. When I started iTunes on my new Mac, in the preferences I directed the media folder to the folder with all my itunes music/podcasts etc, and then I imported the Library XML file.  Is this incorrect? Should I have imported a different file? Should I have used the itl file instead? 
    If so, should I delete the library and start again?  (if this is the case, please suggest the best way of doing this without affecting my media)
    - a kind of sub-question to this one:  some of the media files arent showing up in the iTunes library, but they are in the media folder on the ext HDD.  Is there a way I can find out which ones havent been recognized by iTunes?  Whats the best way of getting them in to my library?
    2. Pretty much half of my podcasts have not been loaded in the new iTunes.  The ones that havent were ones that I subscribed to on my iPhone, whereas the ones that show up in iTunes were ones I downloaded from iTunes.  When I connect my iPhone and sync it with iTunes, will those podcasts show up in iTunes?  Or is there a risk that they will be deleted from my iPhone?
    Cheers,

    The .xml is lacking some information such as ratings, date added, and play count.  Using the .itl includes this information but cannot be imported using the method you did.
    A complete library is everything in the iTunes folder.  By using the method you did you left the artwork behind in the artwork folder on the other machine.
    Selecting the media folder in preferences does not get iTunes to recognize the media.  All it does is tell iTunes to start storing new media in that location.
    Using the method I outlined nothing will be missed (with the exception of WMA) because you aren't rebuilding your library, you are using the one that already exists.
    You don't have to re-copy everything as long as you get the stuff you missed and re-assemble it all as it was before except not on the Mac.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391

Maybe you are looking for

  • How can I put in a cd in my new iMac?

    I bought the new imac and i don´t know how to put in a cd. Should I buy something or is just i´m not looking in the right side of it? Thank you

  • FI G/L

    Hello Everyone, How to load G/L Account Group Hierarchy from R/3 to BW. Which Datasource do we use for that purpose. Thanks

  • Lightroom 4 disk error - 'disk is blank'  cannot download - unreliable internet, large file

      I have raised this yesterday and Hal thought the Lightroom 4 disk might be blank & suggested that I download Lr4 from from the website.  I can sort of accept a disk might be blank but think it unlikely as the disk arrived with all packaging and all

  • My phone keeps saying "cannot connect to the store. A secure connection could not be established.

    My I phone keeps repeatedly coming up with: Cannot connect to the store. A secure connection could not be established. Please check your Date & Time settings" What does this mean and how do I fix this as I am trying to update my apps and they have st

  • Shared WLAN

    Hi guys I have had this issue with my set up for WLAN for some time. The Apple support and my internet provider have so far not been able to resolve my issue. I am a secondary user of an Arcor Easy Box A600 WLAN. The primary user is an MSI windows vi