Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #27765
| From | Dimiter_Popoff <dp@tgi-sci.com> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Use of soft float? |
| Date | 2018-05-21 10:35 +0300 |
| Organization | TGI |
| Message-ID | <pdtsr8$o8$1@dont-email.me> (permalink) |
| References | <pdrgnm$6lg$1@solani.org> <pdrltg$945$1@dont-email.me> <htnMC.187010$RM2.165435@fx05.iad> |
On 21.5.2018 г. 02:24, Clifford Heath wrote: > On 20/05/18 21:24, Dimiter_Popoff wrote: >> On 20.5.2018 г. 12:56, Philipp Klaus Krause wrote: >>> While those who make heavy use of floating-point computations in >>> embedded sytems probably go for systems with hardware support for >>> floating-point calculations, there are plenty of systems without such >>> support out there. >>> And the existence of soft float implementations indicates that there is >>> a real need for doing floating-point computations on systems without >>> hardware floating-point support. I'd like to know a bit more about that. >>> >>> * What kind of computations do people use soft float for? Any real-world >>> examples? >>> * Which types of soft float do they use? IEEE 32- or 64-bit? Some other >>> C standard-compliant type? 16-bit IEEE? Other 16-bit? >>> >>> Philipp >>> >> >> I can only speak for myself of course, here it goes. >> >> Some 20 years ago on our first Nukeman >> ( http://tgi-sci.com/tgi/nmtb.htm ) I needed floating point. >> The need came late in the project, during spectrum evaluation >> one has to calculate isotope decay during the time acquisition >> has taken place (some isotopes have short half lives so this >> matters a lot). This took e^x or something like that, and the >> processor was an MC68340 - a CPU32 core (sort of a downgraded 68020) >> which had no FPU. >> So I wrote the FPU functions I needed - just those I needed, basic >> arithmetic plus the exponential thing I believe, may be something >> else I don't remember at the moment. The format was that the 68K >> series used, called "extended precision", 96 bit. However the >> precision was far far from it - the 68340 had 32*32->64 bit >> multiplication so I left the mantissa precision at just 32 bits, >> was plenty. > > How much precision did you even need? If you have a regular clock > tick and not to many decays in parallel you can do exponential > decay just by subtracting some fraction (shift and subtract) > on each cycle. It is not so simple, far from it really. During spectrum acquisition, when you have a "clock tick" you don't know what is in the spectrum, acquisition times of many hours - or days - are normal. So all you have the acquisition time and the half lives after you have identified the isotopes. Then the operator needs to be able to calculate activities referenced to any particular moment, not the moment of acquisition. Etc etc. Steering away from FP makes sense as long as you don't have an FPU on chip of course, but sometimes using FP - even emulated - is just the easiest way to go. I had managed back then - prior to writing the evaluation mentioned - to do curve fit to spectrum peaks using fixed point, works quite well to this day - although I have migrated some (not sure how much) of the arithmetic to FP since I have one anyway. Dimiter ====================================================== Dimiter Popoff, TGI http://www.tgi-sci.com ====================================================== http://www.flickr.com/photos/didi_tgi/
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Use of soft float? Philipp Klaus Krause <pkk@spth.de> - 2018-05-20 11:56 +0200
Re: Use of soft float? Dimiter_Popoff <dp@tgi-sci.com> - 2018-05-20 14:24 +0300
Re: Use of soft float? Clifford Heath <no.spam@please.net> - 2018-05-21 09:24 +1000
Re: Use of soft float? Dimiter_Popoff <dp@tgi-sci.com> - 2018-05-21 10:35 +0300
Re: Use of soft float? Clifford Heath <no.spam@please.net> - 2018-05-22 09:33 +1000
Re: Use of soft float? Grant Edwards <invalid@invalid.invalid> - 2018-05-20 23:39 +0000
Re: Use of soft float? David Brown <david.brown@hesbynett.no> - 2018-05-21 12:12 +0200
Re: Use of soft float? upsidedown@downunder.com - 2018-05-22 00:36 +0300
Re: Use of soft float? Grant Edwards <invalid@invalid.invalid> - 2018-05-21 21:49 +0000
Re: Use of soft float? upsidedown@downunder.com - 2018-05-22 01:41 +0300
Re: Use of soft float? Clifford Heath <no.spam@please.net> - 2018-05-22 09:39 +1000
Re: Use of soft float? David Brown <david.brown@hesbynett.no> - 2018-05-22 11:23 +0200
Re: Use of soft float? Luke A. Guest <laguest@archeia.com> - 2018-06-06 04:37 +0100
Re: Use of soft float? Reinhardt Behm <rbehm@hushmail.com> - 2018-06-06 12:54 +0800
csiph-web