`include "corr_matrix.vh" //automatically created and added by fwk with conf variables such a C_VERSION ... /* default values of defined variables */ `ifndef C_ID `define C_ID 0x507E1730 `endif `ifndef C_VERSION `define C_VERSION 0x00000000 `endif addrmap corr_matrix { name = "PI corrector with matrix multiplier"; desyrdl_interface = "AXI4L"; reg { desc="Module Identification Number."; default sw = r; default hw = r; field {} data[32] = `C_ID; } ID @0x00; reg { desc="Module Version Number."; default sw = r; default hw = rw; field {} data [32]; } VERSION @0x04; reg { desc="X-plane control of the corrector."; default sw=rw; default hw=r; field {} ENABLE_CORR; field {} RST_CORR; } CONTROL_X; reg { desc="Y-plane control of the corrector."; default sw=rw; default hw=r; field {} ENABLE_CORR; field {} RST_CORR; } CONTROL_Y; reg { desc="Theshold autostop."; default sw=rw; default hw=r; field {} ENABLE; field {} RST; } THRESH; reg { desc="Global status of the corrector."; default sw=r; default hw=rw; field {} THRESH_REACHED; } STATUS; reg { desc="Correction coefficient A."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1A_X; reg { desc="Correction coefficient B."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1B_X; reg { desc="Correction coefficient (inverse) C."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1IC_X; reg { desc="Correction coefficient D."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1D_X; reg { desc="Correction coefficient A."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2A_X; reg { desc="Correction coefficient B."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2B_X; reg { desc="Correction coefficient (inverse) C."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2IC_X; reg { desc="Correction coefficient D."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2D_X; reg { desc="Correction coefficient A."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1A_Y; reg { desc="Correction coefficient B."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1B_Y; reg { desc="Correction coefficient (inverse) C."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1IC_Y; reg { desc="Correction coefficient D."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K1D_Y; reg { desc="Correction coefficient A."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2A_Y; reg { desc="Correction coefficient B."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2B_Y; reg { desc="Correction coefficient (inverse) C."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2IC_Y; reg { desc="Correction coefficient D."; desyrdl_data_type="int32"; field {sw = rw; hw = r;} data[`C_W_COR_COEF]; } CORR_K2D_Y; reg { desc="Number of ID to count for matrix multiplication."; field {sw = rw; hw = r;} data[`C_W_MM_IDCNT] = `C_N_MM_BPM; } MM_ID_CNT; mem { desc = "X Reference orbit."; desyrdl_data_type="int32"; memwidth = 32; mementries = 2**`C_W_MM_IDCNT; } external REFORBITX; mem { desc = "Y Reference orbit."; desyrdl_data_type="int32"; memwidth = 32; mementries = 2**`C_W_MM_IDCNT; } external REFORBITY; mem { desc = "PSC identifier table."; memwidth = 32; mementries = 2**`C_W_SER_CNT; } external PSCIDTABLE; mem { desc = "Matrix multiplication coefficients."; desyrdl_data_type="int32"; memwidth = 32; mementries = 2**`C_W_MM_IDCNT; } external MATRIXCOEF[`C_N_MM_PSC]; mem { desc = "X Average orbit error"; desyrdl_data_type="int32"; sw=r; memwidth = 32; mementries = 2**`C_W_MM_IDCNT; } external ERRORBITX; mem { desc = "Y Average orbit error"; desyrdl_data_type="int32"; sw=r; memwidth = 32; mementries = 2**`C_W_MM_IDCNT; } external ERRORBITY; mem { desc = "Average correction, both planes"; desyrdl_data_type="int32"; sw=r; memwidth = 32; mementries = 2**`C_W_PSCID; } external CORRCMD; };