= CORRMATRIX Module |=== | MODULE ID | 0x507E1730 | (1350440752) |=== // ================================================================================ == Description and overview This module perform FOFB correction computation: * Compute position error from the reference orbit * Apply a matrix multiplication to get the error in the corrector space * Filter the error for loop control * Stream the correction out image::overview.svg[] // ================================================================================ == Details === Matrix multiplication As data are input position by position (both plane simultaneously) it is possible to fetch matrix coefficients one at a time. All coefficients are stored in memory, all addressed by the BPM id of the position error at the input. Coefficient are mutliplied and accumulated. The result is then rounded and saturated. All width, rounding and saturation are declared in the VHDL package. Matrix multiplication result are output in parallel, all at the same time. The ID counter is programmed to signal the end of the matrix multiplication when the expected amount of data is received. image::matmult.svg[] === Corrector filter For each matrix multiplication result, a IIR filter based on the previous implementation is instanciated. It is a simple IIR filter. Two of these filters are chained to allow a second order filter to be synthesized. image::corr_ll.svg[] // ================================================================================ == Registers include::regmap.adoc[] // ================================================================================ == Future / TODO * Add a filter to avoid a duplicated BPM id to be counted in the matrix multiplication