chipmuenk/pyfda

Fixpoint simulation

Closed this issue · 0 comments

pyfixp library

This approach has been abandoned in favor of template based code generation and HDL simulation.

Scaling in the coefficients tab

When coefficients are displayed with fixpoint scaling, the scale factor is calculated automatically using scale = 2**WI. The Real-World Value (RWV) is calculated by dividing the fixpoint value by scale. This works for the modes "integer" (WF = 0) and "normalized fractional" (WI = 0) but not for "fractional":

  • Updating WI doesnt change scale (should it? At least, the user should be able to edit scale manually in this mode)
  • Updating WI doesn't update total word length, this is definitely a bug.
  • Scale setting should be updated every time the number of fractional or integer bit changes - should they? When the scale factor doesn't fit with the bit settings, fixpoint simulations have the wrong scale. An extra combo box for adding bits (reserve against overflows) or removing bits (more aggressive scaling) could be provided.

Fixpoint behaviour has been changed, these bugs no longer apply

General stuff

  • add "filter" type delay for debugging and demonstrating effects of phase / delay. Q: How to define an "all-pole" system in numpy / scipy?
    Moved to separate issue #246
  • updating coefficients in the coeff tab emits a 'view_changed' : 'q_coeff'signal which should only be issued in fixpoint mode. This signal is emitted under other conditions as well and has caused trouble in the past. Under some circumstances, crashes occur.