diff --git a/hdl/moving_average.vhd b/hdl/moving_average.vhd
new file mode 100644
index 0000000000000000000000000000000000000000..28b86706b6595df8f6d84f18a638f9f160eeda94
--- /dev/null
+++ b/hdl/moving_average.vhd
@@ -0,0 +1,177 @@
+-- Block that compute a moving average from a AXIStream of data with ID
+-- Results are published in a memory accessible from AXI-MM
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+library desy;
+use desy.ram_tdp;
+use desy.math_signed.all;
+
+entity moving_average is
+    generic(
+        G_W_ID          : natural;
+        G_W_SIGNAL      : natural;
+        G_W_ALPHA       : natural
+    );
+    port(
+        clk             : in std_logic;
+        rst_n           : in std_logic;
+
+        -- Moving average alpha
+        alpha           : in signed(G_W_ALPHA-1 downto 0);
+
+        -- Signal input
+        sig_data        : in signed(G_W_SIGNAL-1 downto 0);
+        sig_id          : in std_logic_vector(G_W_ID-1 downto 0);
+        sig_valid       : in std_logic;
+
+        -- AXI-MM Average signal table
+        asigt_en        : in std_logic;
+        asigt_addr      : in std_logic_vector(G_W_ID-1 downto 0);
+        asigt_rdata     : out std_logic_vector(G_W_SIGNAL-1 downto 0)
+    );
+end entity moving_average;
+
+architecture rtl of moving_average is
+
+    type arr_slv is array (natural range <>) of std_logic_vector;
+
+    ------------------------
+    -- SIGNAL DECLARATION --
+    ------------------------
+    signal table_wen        : std_logic;
+    signal table_waddr      : std_logic_vector(G_W_ID-1 downto 0);
+    signal table_wdata      : std_logic_vector(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+    signal table_wdata_sec  : std_logic_vector(G_W_SIGNAL-1 downto 0);
+    signal table_rdata      : std_logic_vector(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+
+    signal sig_id_r         : arr_slv(0 to 2)(G_W_ID-1 downto 0);
+    signal sig_valid_r      : std_logic_vector(0 to 2);
+
+    signal pasig            : signed(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+
+    signal sig_alpha        : signed(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+    signal sig_alpha_r      : signed(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+
+    signal pasig_alpha      : signed(G_W_SIGNAL+G_W_ALPHA*2-1 downto 0);
+    signal pasig_alpha_rnd  : signed(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+    signal ma_update        : signed(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+    signal ma_new           : signed(G_W_SIGNAL+G_W_ALPHA-1 downto 0);
+    signal ma_new_rnd       : signed(G_W_SIGNAL-1 downto 0);
+
+
+begin
+
+
+    --------------------------------
+    -- AVERAGE ORBIT ERROR TABLES --
+    --------------------------------
+    -- main one, used for computation. A reads only, B writes only
+
+    inst_asig_main_table: entity desy.ram_tdp
+    generic map(
+        G_ADDR      => G_W_ID,
+        G_DATA      => G_W_SIGNAL+G_W_ALPHA
+    )
+    port map(
+        pi_clk_a    => clk,
+        pi_en_a     => '1',
+        pi_we_a     => '0',
+        pi_addr_a   => sig_id,
+        pi_data_a   => (others => '0'),
+        po_data_a   => table_rdata,
+        pi_clk_b    => clk,
+        pi_en_b     => '1',
+        pi_we_b     => table_wen,
+        pi_addr_b   => table_waddr,
+        pi_data_b   => table_wdata,
+        po_data_b   => open
+    );
+    table_wdata <= std_logic_vector(ma_new);
+
+    -- secondary one, used for axi access to result. A reads only, B writes only
+    -- B port is mirror of previous bloc
+    -- No need to retain decimal part
+
+    inst_asig_sec_table: entity desy.ram_tdp
+    generic map(
+        G_ADDR      => G_W_ID,
+        G_DATA      => G_W_SIGNAL
+    )
+    port map(
+        pi_clk_a    => clk,
+        pi_en_a     => asigt_en,
+        pi_we_a     => '0',
+        pi_addr_a   => asigt_addr,
+        pi_data_a   => (others => '0'),
+        po_data_a   => asigt_rdata,
+        pi_clk_b    => clk,
+        pi_en_b     => '1',
+        pi_we_b     => table_wen,
+        pi_addr_b   => table_waddr,
+        pi_data_b   => table_wdata_sec,
+        po_data_b   => open
+    );
+
+    -- Round before memorize
+    table_wdata_sec <= std_logic_vector(ma_new_rnd);
+    ma_new_rnd      <= f_resize_lsb(ma_new, ma_new_rnd'length) when ma_new(G_W_ALPHA-1) = '0' else
+                       f_sum_sat(f_resize_lsb(ma_new, ma_new_rnd'length), to_signed(1, ma_new_rnd'length));
+
+
+    ------------------------
+    -- PIPELINE REGISTERS --
+    ------------------------
+    p_pipe:process(clk, rst_n)
+    begin
+        if rst_n = '0' then
+            sig_id_r         <= (others => (others => '0'));
+            sig_valid_r      <= (others => '0');
+        elsif rising_edge(clk) then
+
+            sig_valid_r <= sig_valid & sig_valid_r(0 to sig_valid_r'right-1);
+
+            sig_id_r(0) <= sig_id;
+            for I in 1 to sig_id_r'right loop
+                sig_id_r(I) <= sig_id_r(I-1);
+            end loop;
+
+        end if;
+    end process;
+
+    table_wen       <= sig_valid_r(2);
+    table_waddr     <= sig_id_r(2);
+
+
+    -----------------
+    -- COMPUTATION --
+    -----------------
+    pasig                <= signed(table_rdata);
+    pasig_alpha          <= -pasig * alpha;
+    pasig_alpha_rnd      <= f_resize_lsb(pasig_alpha, pasig_alpha_rnd'length) when pasig_alpha(G_W_ALPHA-1) = '0' else
+                           f_sum_sat(f_resize_lsb(pasig_alpha, pasig_alpha_rnd'length), to_signed(1, pasig_alpha_rnd'length));
+
+    p_comp:process(clk, rst_n)
+    begin
+        if rst_n = '0' then
+            sig_alpha        <= (others => '0');
+            sig_alpha_r      <= (others => '0');
+            ma_update        <= (others => '0');
+            ma_new           <= (others => '0');
+
+        elsif rising_edge(clk) then
+
+            sig_alpha        <= sig_data * alpha;
+            sig_alpha_r      <= sig_alpha;
+
+            ma_update        <= f_sum_sat(pasig, pasig_alpha_rnd);
+            ma_new           <= f_sum_sat(sig_alpha_r, ma_update);
+
+        end if;
+    end process;
+
+
+
+end architecture;
+
diff --git a/hdl/pkg_corrmatrix.vhd b/hdl/pkg_corrmatrix.vhd
index cda91229eca82feefb579aff626faa68c9450884..7854f164f425a11f3b1f72b66f87549aeb329c5f 100644
--- a/hdl/pkg_corrmatrix.vhd
+++ b/hdl/pkg_corrmatrix.vhd
@@ -46,6 +46,11 @@ package pkg_corr_matrix is
     -- Serializer
     constant C_W_SER_CNT        : natural := 7; -- natural(ceil(log2(real(C_N_MM_PSC))));
 
+    -- Moving average
+    constant C_W_ALPHA          : natural := 16;
+    constant C_ALPHA_OE         : signed(C_W_ALPHA-1 downto 0) := x"0048"; -- 72 dec
+    constant C_ALPHA_CC         : signed(C_W_ALPHA-1 downto 0) := x"0048"; -- 72 dec
+
     ----------------------
     -- TYPE DECLARATION --
     ----------------------
diff --git a/hdl/top_corr_matrix.vhd b/hdl/top_corr_matrix.vhd
index bcddbf7618a95cd0d0ba38019b10aaa672953c26..ec4e21245e0d53727202323b10a7cd06b1a4d594 100644
--- a/hdl/top_corr_matrix.vhd
+++ b/hdl/top_corr_matrix.vhd
@@ -136,6 +136,60 @@ begin
         errbpm_tvalid          => errbpm_tvalid
     );
 
+    -------------------------
+    -- ORBIT ERROR AVERAGE --
+    -------------------------
+    inst_orbit_error_avg_x: entity work.moving_average
+    generic map(
+        G_W_ID          => C_W_MM_IDCNT,
+        G_W_SIGNAL      => C_W_OE,
+        G_W_ALPHA       => C_W_ALPHA
+    )
+    port map(
+        clk             => clk,
+        rst_n           => rst_n,
+
+        -- Moving average alpha
+        alpha           => C_ALPHA_OE,
+
+        -- Signal input
+        sig_data        => errbpm_x,
+        sig_id          => errbpm_id(C_W_MM_IDCNT-1 downto 0),
+        sig_valid       => errbpm_tvalid,
+
+        -- AXI-MM Average signal table
+        asigt_en        => mm_a2l.ERRORBITX.en,
+        asigt_addr      => mm_a2l.ERRORBITX.addr(C_W_MM_IDCNT-1 downto 0),
+        asigt_rdata     => mm_l2a.ERRORBITX.data(C_W_OE-1 downto 0)
+    );
+    mm_l2a.ERRORBITX.data(31 downto C_W_OE) <= (others => mm_l2a.ERRORBITX.data(C_W_OE-1));
+
+    inst_orbit_error_avg_y: entity work.moving_average
+    generic map(
+        G_W_ID          => C_W_MM_IDCNT,
+        G_W_SIGNAL      => C_W_OE,
+        G_W_ALPHA       => C_W_ALPHA
+    )
+    port map(
+        clk             => clk,
+        rst_n           => rst_n,
+
+        -- Moving average alpha
+        alpha           => C_ALPHA_OE,
+
+        -- Signal input
+        sig_data        => errbpm_y,
+        sig_id          => errbpm_id(C_W_MM_IDCNT-1 downto 0),
+        sig_valid       => errbpm_tvalid,
+
+        -- AXI-MM Average signal table
+        asigt_en        => mm_a2l.ERRORBITY.en,
+        asigt_addr      => mm_a2l.ERRORBITY.addr(C_W_MM_IDCNT-1 downto 0),
+        asigt_rdata     => mm_l2a.ERRORBITY.data(C_W_OE-1 downto 0)
+    );
+    mm_l2a.ERRORBITY.data(31 downto C_W_OE) <= (others => mm_l2a.ERRORBITY.data(C_W_OE-1));
+
+
     ---------------------------
     -- MATRIX MULTIPLICATION --
     ---------------------------
@@ -251,6 +305,34 @@ begin
     m_axis_tuser    <= ser_tuser;
     m_axis_tvalid   <= ser_tvalid;
 
+    -------------------------------
+    -- CORRECTOR COMMAND AVERAGE --
+    -------------------------------
+    inst_corrector_command_avg: entity work.moving_average
+    generic map(
+        G_W_ID          => C_W_PSCID,
+        G_W_SIGNAL      => C_W_COR,
+        G_W_ALPHA       => C_W_ALPHA
+    )
+    port map(
+        clk             => clk,
+        rst_n           => rst_n,
+
+        -- Moving average alpha
+        alpha           => C_ALPHA_CC,
+
+        -- Signal input
+        sig_data        => signed(ser_tdata(C_W_COR-1 downto 0)),
+        sig_id          => ser_tdata(C_W_PSCID+C_W_COR-1 downto C_W_COR),
+        sig_valid       => ser_tvalid,
+
+        -- AXI-MM Average signal table
+        asigt_en        => mm_a2l.CORRCMD.en,
+        asigt_addr      => mm_a2l.CORRCMD.addr(C_W_PSCID-1 downto 0),
+        asigt_rdata     => mm_l2a.CORRCMD.data(C_W_COR-1 downto 0)
+    );
+    mm_l2a.CORRCMD.data(31 downto C_W_COR ) <= (others => mm_l2a.CORRCMD.data(C_W_COR-1));
+
     --------------------------
     -- THRESHOLD LEVEL COMP --
     --------------------------
diff --git a/rdl/corr_matrix.rdl b/rdl/corr_matrix.rdl
index aea7b598c3b713933d2d264c6cb19b89738e863c..db5f92f692c14b82883f53f3adf1a0de574e671d 100644
--- a/rdl/corr_matrix.rdl
+++ b/rdl/corr_matrix.rdl
@@ -113,6 +113,27 @@ addrmap corr_matrix {
         mementries = 2**`C_W_MM_IDCNT;
     } external MATRIXCOEF[`C_N_MM_PSC];
 
+    mem {
+        desc = "X Average orbit error";
+        sw=r;
+        memwidth = 32;
+        mementries = 2**`C_W_MM_IDCNT;
+    } external ERRORBITX;
+
+    mem {
+        desc = "X Average orbit error";
+        sw=r;
+        memwidth = 32;
+        mementries = 2**`C_W_MM_IDCNT;
+    } external ERRORBITY;
+
+    mem {
+        desc = "Average correction, both planes";
+        sw=r;
+        memwidth = 32;
+        mementries = 2**`C_W_PSCID;
+    } external CORRCMD;
+
 };
 
 
diff --git a/sim/compute_moving_avg.py b/sim/compute_moving_avg.py
new file mode 100644
index 0000000000000000000000000000000000000000..66f4915648b6d310c81fce99730a6f414db206c2
--- /dev/null
+++ b/sim/compute_moving_avg.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+"""
+Created on Mon Oct 30 11:24:47 2023
+
+@author: broucquart
+"""
+
+import pandas as pd
+import numpy as np
+
+
+inputs = pd.read_csv("bpmdata.txt", header=None, sep=' ')
+inputs.drop(columns=244, inplace=True)
+_c=np.empty(244, dtype=int)
+_c[::2] = range(1,123)
+_c[1::2] = range(123,245)
+inputs.columns = _c
+
+
+orbrefs = pd.read_csv("reforbit.txt", header=None)[0]
+orbrefs.index = orbrefs.index+1
+
+
+alpha=72
+
+MA = inputs.copy()
+MA.loc[-1]=0
+
+for n in range(len(MA)-1): 
+    MA.loc[n] = (inputs.loc[n]-orbrefs)*alpha + MA.loc[n-1] - ( (MA.loc[n-1]*alpha).apply(lambda x: np.round(x/2**16,0).astype('int')) )
+    
+
+rMA = MA.apply(lambda x: np.round(x/2**16,0).astype('int'))
diff --git a/sim/generate_datasim.py b/sim/generate_datasim.py
index b7564db0617222eec55d64cbaafc408394e1acf6..9d321581f8bfd16b19497e5d7a7bb3c9b830badb 100644
--- a/sim/generate_datasim.py
+++ b/sim/generate_datasim.py
@@ -65,13 +65,21 @@ with open("bpmdata.txt", "w") as fp:
 trespmat = np.zeros((N_PSC, N_BPM), dtype="int64")
 trespmat[:50,:122] = respmat[:50]
 trespmat[50:,122:] = respmat[50:]
+C_N_RND = 20
+SUMSAT=36
+
 
 K_A = 218
 K_B = -186
 K_iC = 325
 K_D = -3225
-C_N_RND = 26
-SUMSAT=36
+
+
+K_A = 1024
+K_B = 0
+K_iC = 1024
+K_D = 0
+
 
 ## -----------------------
 # Model computation
diff --git a/sim/tc_basic.vhd b/sim/tc_basic.vhd
index 31ad508001541b61c6f86e30b844473daad612a7..9a6deb7f7f057eec3dbca5d8c5eaef4dbd3ec1c1 100644
--- a/sim/tc_basic.vhd
+++ b/sim/tc_basic.vhd
@@ -88,14 +88,23 @@ begin
 
         log("==--- Configure the DUT ---==", INFO);
         log("+-- Global Config", INFO);
+
         -- Correction coefficients
-        Write(ManagerRec, f_addr(16#0C#), f_sdata(218));
-        Write(ManagerRec, f_addr(16#10#), f_sdata(-186));
-        Write(ManagerRec, f_addr(16#14#), f_sdata(325));
-        Write(ManagerRec, f_addr(16#18#), f_sdata(-3225));
+        Write(ManagerRec, f_addr(16#10#), f_sdata(218));
+        Write(ManagerRec, f_addr(16#14#), f_sdata(-186));
+        Write(ManagerRec, f_addr(16#18#), f_sdata(325));
+        Write(ManagerRec, f_addr(16#1C#), f_sdata(-3225));
+
+        Write(ManagerRec, f_addr(16#20#), f_sdata(128));
+        Write(ManagerRec, f_addr(16#24#), f_sdata(0));
+        Write(ManagerRec, f_addr(16#28#), f_sdata(8192));
+        Write(ManagerRec, f_addr(16#2C#), f_sdata(0));
+
+        -- Rst corr and threshold
+        Write(ManagerRec, f_addr(8), f_sdata(10));
 
         -- Enable
-        Write(ManagerRec, f_addr(8), f_sdata(5));
+        Write(ManagerRec, f_addr(8), f_sdata(1));
 
         log("+-- Writing orbit reference...", INFO);
 
diff --git a/sim/view1.gtkw b/sim/view1.gtkw
index a20b0ff36a51619ae264fcdca968f7b896835c38..59d92722bdccf570a9da4f5fcd456edaf341747c 100644
--- a/sim/view1.gtkw
+++ b/sim/view1.gtkw
@@ -1,21 +1,26 @@
 [*]
 [*] GTKWave Analyzer v3.4.0 (w)1999-2022 BSI
-[*] Wed May 31 15:12:34 2023
+[*] Mon Oct 30 14:21:24 2023
 [*]
 [dumpfile] "/home/broucquart/Projects/CellNode/fwk_sim_corr/prj/sim_corr_matrix_default/tc_basic.ghw"
-[dumpfile_mtime] "Wed May 31 15:10:15 2023"
-[dumpfile_size] 89798805
-[savefile] "/home/broucquart/Projects/CellNode/fwk_sim_corr/src/corr_matrix/sim/view1.gtkw"
-[timestart] 498931500000
+[dumpfile_mtime] "Mon Oct 30 13:57:45 2023"
+[dumpfile_size] 113296978
+[savefile] "/home/broucquart/Projects/CellNode/fwk_sim_corr/src/corr_matrixpi/sim/view1.gtkw"
+[timestart] 486770000000
 [size] 1880 1016
 [pos] -1 -1
-*-26.732079 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+*-33.460327 504080000000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
 [treeopen] top.
 [treeopen] top.tb_corr_matrix.
 [treeopen] top.tb_corr_matrix.dut.
-[treeopen] top.tb_corr_matrix.dut.inst_corr.g_corr[99].
+[treeopen] top.tb_corr_matrix.dut.inst_data_serializer.corrout.
 [treeopen] top.tb_corr_matrix.dut.inst_matrix_mul.g_matrix[0].inst_coefx_table.memory.
 [treeopen] top.tb_corr_matrix.dut.inst_orbit_error.inst_refy_table.memory.
+[treeopen] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.
+[treeopen] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.
+[treeopen] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.
+[treeopen] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.
+[treeopen] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory.
 [sst_width] 273
 [signals_width] 377
 [sst_expanded] 1
@@ -37,10 +42,9 @@ top.tb_corr_matrix.tb_axis_tx_tvalid
 #{top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[7:0]} top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[7] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[6] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[5] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[4] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[3] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[2] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[1] top.tb_corr_matrix.dut.inst_orbit_error.bpm_id[0]
 @28
 top.tb_corr_matrix.dut.inst_orbit_error.bpm_tvalid
-@22
+@420
 #{top.tb_corr_matrix.dut.inst_orbit_error.table_refx[31:0]} top.tb_corr_matrix.dut.inst_orbit_error.table_refx[31] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[30] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[29] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[28] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[27] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[26] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[25] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[24] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[23] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[22] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[21] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[20] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[19] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[18] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[17] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[16] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[15] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[14] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[13] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[12] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[11] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[10] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[9] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[8] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[7] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[6] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[5] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[4] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[3] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[2] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[1] top.tb_corr_matrix.dut.inst_orbit_error.table_refx[0]
 #{top.tb_corr_matrix.dut.inst_orbit_error.table_refy[31:0]} top.tb_corr_matrix.dut.inst_orbit_error.table_refy[31] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[30] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[29] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[28] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[27] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[26] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[25] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[24] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[23] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[22] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[21] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[20] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[19] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[18] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[17] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[16] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[15] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[14] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[13] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[12] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[11] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[10] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[9] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[8] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[7] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[6] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[5] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[4] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[3] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[2] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[1] top.tb_corr_matrix.dut.inst_orbit_error.table_refy[0]
-@420
 #{top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[23:0]} top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[23] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[22] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[21] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[20] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[19] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[18] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[17] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[16] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[15] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[14] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[13] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[12] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[11] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[10] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[9] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[8] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[7] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[6] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[5] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[4] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[3] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[2] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[1] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_x[0]
 #{top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[23:0]} top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[23] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[22] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[21] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[20] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[19] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[18] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[17] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[16] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[15] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[14] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[13] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[12] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[11] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[10] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[9] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[8] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[7] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[6] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[5] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[4] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[3] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[2] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[1] top.tb_corr_matrix.dut.inst_orbit_error.errbpm_y[0]
 @24
@@ -65,7 +69,6 @@ top.tb_corr_matrix.dut.inst_matrix_mul.new_seq
 @200
 -Corr PI
 @28
-top.tb_corr_matrix.dut.inst_corr.reset_accu
 top.tb_corr_matrix.dut.inst_corr.enable_corr
 @420
 #{top.tb_corr_matrix.dut.inst_corr.corrout[0][15:0]} top.tb_corr_matrix.dut.inst_corr.corrout[0][15] top.tb_corr_matrix.dut.inst_corr.corrout[0][14] top.tb_corr_matrix.dut.inst_corr.corrout[0][13] top.tb_corr_matrix.dut.inst_corr.corrout[0][12] top.tb_corr_matrix.dut.inst_corr.corrout[0][11] top.tb_corr_matrix.dut.inst_corr.corrout[0][10] top.tb_corr_matrix.dut.inst_corr.corrout[0][9] top.tb_corr_matrix.dut.inst_corr.corrout[0][8] top.tb_corr_matrix.dut.inst_corr.corrout[0][7] top.tb_corr_matrix.dut.inst_corr.corrout[0][6] top.tb_corr_matrix.dut.inst_corr.corrout[0][5] top.tb_corr_matrix.dut.inst_corr.corrout[0][4] top.tb_corr_matrix.dut.inst_corr.corrout[0][3] top.tb_corr_matrix.dut.inst_corr.corrout[0][2] top.tb_corr_matrix.dut.inst_corr.corrout[0][1] top.tb_corr_matrix.dut.inst_corr.corrout[0][0]
@@ -80,8 +83,28 @@ top.tb_corr_matrix.dut.inst_corr.corrout_valid
 -SERIALIZER
 @28
 top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tvalid
-top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tready
 @22
 #{top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[23:0]} top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[23] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[22] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[21] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[20] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[19] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[18] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[17] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[16] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[15] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[14] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[13] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[12] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[11] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[10] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[9] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[8] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[7] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[6] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[5] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[4] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[3] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[2] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[1] top.tb_corr_matrix.dut.inst_data_serializer.m_axis_tdata[0]
+#{top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][15:0]} top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][15] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][14] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][13] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][12] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][11] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][10] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][9] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][8] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][7] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][6] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][5] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][4] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][3] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][2] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][1] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[0][0]
+#{top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][15:0]} top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][15] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][14] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][13] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][12] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][11] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][10] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][9] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][8] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][7] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][6] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][5] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][4] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][3] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][2] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][1] top.tb_corr_matrix.dut.inst_data_serializer.r_corr[1][0]
+@28
+top.tb_corr_matrix.dut.inst_data_serializer.run_serial
+@22
+#{top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][15:0]} top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][15] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][14] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][13] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][12] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][11] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][10] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][9] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][8] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][7] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][6] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][5] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][4] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][3] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][2] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][1] top.tb_corr_matrix.dut.inst_data_serializer.corrout[1][0]
+@200
+-MOVING AVERAGE
+@24
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[15:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[15] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[14] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[13] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[12] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[11] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[10] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[9] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[8] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[7] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[6] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[5] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[4] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[3] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[2] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[1] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.alpha[0]
+@420
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[0][0]
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[1][0]
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[2][0]
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_x.inst_asig_sec_table.memory[3][0]
+@421
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[0][0]
+@420
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[1][0]
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[2][0]
+#{top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][23:0]} top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][23] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][22] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][21] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][20] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][19] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][18] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][17] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][16] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][15] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][14] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][13] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][12] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][11] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][10] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][9] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][8] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][7] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][6] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][5] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][4] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][3] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][2] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][1] top.tb_corr_matrix.dut.inst_orbit_error_avg_y.inst_asig_sec_table.memory[3][0]
 [pattern_trace] 1
 [pattern_trace] 0
diff --git a/tcl/main.tcl b/tcl/main.tcl
index 616b592835a2d81211c4a72d8233527f41534337..5adc12e39aa88a3c94e350b2cf4a0a3e02373a71 100644
--- a/tcl/main.tcl
+++ b/tcl/main.tcl
@@ -24,6 +24,7 @@ proc setSources {} {
   lappend Sources {"../hdl/matrix_mul.vhd" "VHDL 2008"}
   lappend Sources {"../hdl/orbit_error.vhd" "VHDL 2008"}
   lappend Sources {"../hdl/data_serializer.vhd" "VHDL 2008"}
+  lappend Sources {"../hdl/moving_average.vhd" "VHDL 2008"}
   lappend Sources {"../hdl/top_corr_matrix.vhd" "VHDL 2008"}
   lappend Sources [list "${::fwfwk::LibPath}/desy_vhdl/hdl/memory/ram/ram_tdp.vhd" "VHDL 2008" "desy"]
   lappend Sources [list "${::fwfwk::LibPath}/desy_vhdl/hdl/math/pkg_math_utils.vhd" "VHDL 2008" "desy"]