On 08/14/2014 09:16 AM, Robert Jordens wrote: > Also that excerpt misses the point of the underlying question, which is > when to best convert floating point physical quantities to integer > device units.
What about having soft floating point (and rational with e.g. 64-bit numerator and denominator) support on the device? That's not particularly hard to implement, as we already need a typing system to distinguish between 32-bit integers (for fast computations), 64-bit integers (for high range variables like time) and integer arrays (for histograms). Then the compiler just tries to fold constants as much as possible to improve performance. If parts of the computation are not folded - either because the transform is not smart enough or because of a dependency on runtime data - things will still work, albeit at a slower speed. Sébastien _______________________________________________ ARTIQ mailing list https://ssl.serverraum.org/lists/listinfo/artiq Migen/MiSoC: please use de...@lists.m-labs.hk instead.