Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fofb_shaper_filt: implement module. #27

Merged
merged 10 commits into from
May 17, 2024
Merged

fofb_shaper_filt: implement module. #27

merged 10 commits into from
May 17, 2024

Commits on Apr 22, 2024

  1. utcaApp: use maybe_unused only where necessary.

    Omit parameter names instead of marking as maybe unused.
    
    The nElements parameter in readEnum is left, because the max number of
    enum elements should be used in a future version, for better error
    checking.
    ericonr committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    d89ac86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e621c89 View commit details
    Browse the repository at this point in the history
  3. utcaApp: use single file for FOFB channel autosave.

    This way, the corrector names don't have to be duplicated in every
    relevant module's req file.
    ericonr committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    a43c389 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. afc_timing: fix uninitialized variable use.

    This was only noticed due to an intermittent slowdown in the iocInit
    call in stTIM.cmd.
    
    This happened because asynEnumSyncIO.c's readOp() [1], called from
    devAsynInt32.c's initBi(), loops *nIn times calling the asynPrint macro.
    Uninitialized nIn could and did take arbitrary, sometimes large, values;
    a perf report even showed most of the iocInit time was spent in the
    getTraceMask() call of asynPrint. However, since tracing wasn't enabled
    at that level for the port, it never tried to print anything, and didn't
    trigger a segfault by accessing out-of-bounds memory.
    
    [1] https://github.com/epics-modules/asyn/blob/R4-44/asyn/interfaces/asynEnumSyncIO.c#L155
    ericonr committed May 16, 2024
    Configuration menu
    Copy the full SHA
    88c06c6 View commit details
    Browse the repository at this point in the history
  2. acq: update available channels.

    With the removal of the DCC core, there is a big change to the available
    channels.
    ericonr committed May 16, 2024
    Configuration menu
    Copy the full SHA
    38f60c5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f2c45c View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. Configuration menu
    Copy the full SHA
    ba3ed42 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    30157e7 View commit details
    Browse the repository at this point in the history
  3. fofb_processing: add gain for fofb_shaper_filt.

    The filter defined in fofb_shaper_filt has representation limits for its
    coefficients, so an external multiplier gain might be necessary to
    actually implement it in hardware. To avoid requiring an additional gain
    in the hardware and the resultant resource consumption, it was decided
    to use the FOFB accumulator gain implemented in hardware as the
    combination of FOFBAccGain and FOFBAccFilterGain.
    
    It is simpler to define the PV for it in fofb_processing, since it has
    to be combined with the FOFBAccGain for the FOFBAccHwGain that's applied
    to the hardware.
    
    The output for FOFBAccHwGain is a -RB because it shouldn't be written
    to, and is the configuration we tried to write to hardware. The input is
    a -Mon because its sole purpose is getting a feedback as to what's
    actually in hardware.
    
    In order to provide feedback on the applied gain's precision, the
    readback for the separate gains uses the gain that was actually applied
    to hardware divided by the other gain's setpoint.
    
    The slightly complex CALC definition for the gain readbacks is necessary
    for two reasons: the readback will be different from the setpoint if the
    resulting HwGain is outside of the hardware's representable range (this
    can also be verified with FOFBAccHwGain-Mon's value); and one of the
    gains being set to 0 shouldn't cause the readbacks to be NaN.
    ericonr committed May 17, 2024
    Configuration menu
    Copy the full SHA
    315742a View commit details
    Browse the repository at this point in the history
  4. iocutca: instantiate fofb_shaper_filt module.

    And add its PVs to autosave.
    ericonr committed May 17, 2024
    Configuration menu
    Copy the full SHA
    66a16ef View commit details
    Browse the repository at this point in the history