Skip to content
Snippets Groups Projects
Commit 2735071c authored by BRONES Romain's avatar BRONES Romain
Browse files

Change filter coefficient to 12 decimals, change filter coeffs

parent 4631782c
No related branches found
Tags 1.0.0
No related merge requests found
...@@ -39,7 +39,7 @@ package pkg_corr_matrix is ...@@ -39,7 +39,7 @@ package pkg_corr_matrix is
-- IIR corrector -- IIR corrector
constant C_W_COR_COEF : natural := 16; constant C_W_COR_COEF : natural := 16;
constant C_W_COR_COEFFP : natural := 14; -- decimal bits of the coeff fixed point constant C_W_COR_COEFFP : natural := 12; -- decimal bits of the coeff fixed point
constant C_W_COR : natural := 16; constant C_W_COR : natural := 16;
......
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -69,15 +69,15 @@ with open("bpmdata.txt", "w") as fp: ...@@ -69,15 +69,15 @@ with open("bpmdata.txt", "w") as fp:
trespmat = np.zeros((N_PSC, N_BPM), dtype="int64") trespmat = np.zeros((N_PSC, N_BPM), dtype="int64")
trespmat[:50,:122] = respmat[:50] trespmat[:50,:122] = respmat[:50]
trespmat[50:,122:] = respmat[50:] trespmat[50:,122:] = respmat[50:]
C_N_RND = 14 C_N_RND = 12
C_N_FP = 16 C_N_FP = 16
SUMSAT=36 SUMSAT=36
K_A = 4950 K_A = 16884
K_B = -4000 K_B = -12288
K_C = 16384 K_C = 4096
K_D = 16300 K_D = 4096
## ----------------------- ## -----------------------
......
...@@ -91,22 +91,22 @@ begin ...@@ -91,22 +91,22 @@ begin
log("+-- Global Config", INFO); log("+-- Global Config", INFO);
-- Correction coefficients -- Correction coefficients
Write(ManagerRec, f_addr(16#18#), f_sdata(4950)); Write(ManagerRec, f_addr(16#18#), f_sdata(16884));
Write(ManagerRec, f_addr(16#1C#), f_sdata(-4000)); Write(ManagerRec, f_addr(16#1C#), f_sdata(-12288));
Write(ManagerRec, f_addr(16#20#), f_sdata(16384)); Write(ManagerRec, f_addr(16#20#), f_sdata(16384));
Write(ManagerRec, f_addr(16#24#), f_sdata(16300)); Write(ManagerRec, f_addr(16#24#), f_sdata(4096));
Write(ManagerRec, f_addr(16#38#), f_sdata(4950)); Write(ManagerRec, f_addr(16#38#), f_sdata(4096));
Write(ManagerRec, f_addr(16#3C#), f_sdata(-4000)); Write(ManagerRec, f_addr(16#3C#), f_sdata(-12288));
Write(ManagerRec, f_addr(16#40#), f_sdata(16384)); Write(ManagerRec, f_addr(16#40#), f_sdata(4096));
Write(ManagerRec, f_addr(16#44#), f_sdata(16300)); Write(ManagerRec, f_addr(16#44#), f_sdata(4096));
Write(ManagerRec, f_addr(16#28#), f_sdata(16384)); Write(ManagerRec, f_addr(16#28#), f_sdata(4096));
Write(ManagerRec, f_addr(16#2C#), f_sdata(0)); Write(ManagerRec, f_addr(16#2C#), f_sdata(0));
Write(ManagerRec, f_addr(16#30#), f_sdata(16384)); Write(ManagerRec, f_addr(16#30#), f_sdata(4096));
Write(ManagerRec, f_addr(16#34#), f_sdata(0)); Write(ManagerRec, f_addr(16#34#), f_sdata(0));
Write(ManagerRec, f_addr(16#48#), f_sdata(16384)); Write(ManagerRec, f_addr(16#48#), f_sdata(4096));
Write(ManagerRec, f_addr(16#4C#), f_sdata(0)); Write(ManagerRec, f_addr(16#4C#), f_sdata(0));
Write(ManagerRec, f_addr(16#50#), f_sdata(16384)); Write(ManagerRec, f_addr(16#50#), f_sdata(4096));
Write(ManagerRec, f_addr(16#54#), f_sdata(0)); Write(ManagerRec, f_addr(16#54#), f_sdata(0));
-- Num BPM -- Num BPM
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment