2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-18 16:06:30 +08:00

wrpll.filters: the helper clipping threshold is currently way too low. Move clipping after the bitshift to increase a bit.

TODO: think about this and pick a sensible threshold (and also think about integrator anti windup)
This commit is contained in:
hartytp 2020-10-06 15:33:18 +01:00 committed by Sebastien Bourdeauducq
parent e5e648bde1
commit f3cd0fc675

View File

@ -32,9 +32,9 @@ def helper(tag_diff):
helper_xn2 = helper_xn1
helper_xn1 = helper_xn0
helper_yn0 = min(helper_yn0, helper_yr)
helper_yn0 = max(helper_yn0, 0 - helper_yr)
helper_out = 268435456*helper_yn0 >> 44
helper_out = min(helper_out, helper_yr)
helper_out = max(helper_out, 0 - helper_yr)
return helper_out