]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
Add one bit to baseline average
authorAndreas Neiser <neiser@kph.uni-mainz.de>
Mon, 20 Apr 2015 17:12:25 +0000 (19:12 +0200)
committerAndreas Neiser <neiser@kph.uni-mainz.de>
Sat, 13 Jun 2015 15:37:04 +0000 (17:37 +0200)
ADC/source/adc_handler.vhd
ADC/source/adc_package.vhd

index 922fe9e25116b77fd50df2fb3a067030dcf5ea7b..833e57a8bdab8aa3780655346be9a9d0513301a1 100644 (file)
@@ -422,7 +422,7 @@ begin
             when x"13" =>
               BUS_TX.data(9 downto 0)                          <= std_logic_vector(config_cfd.InputThreshold);
               BUS_TX.data(17)                                  <= config_cfd.PolarityInvert;
-            when x"16" => BUS_TX.data(3 downto 0)              <= std_logic_vector(config_cfd.BaselineAverage);
+            when x"16" => BUS_TX.data(4 downto 0)              <= std_logic_vector(config_cfd.BaselineAverage);
             when x"17" => BUS_TX.data(31 downto 0)             <= config_cfd.TriggerEnable(31 downto 0);
             when x"18" => BUS_TX.data(15 downto 0)             <= config_cfd.TriggerEnable(47 downto 32);
             when x"19" => BUS_TX.data(RESOLUTION - 1 downto 0) <= config_cfd.CheckWord1;
@@ -469,7 +469,7 @@ begin
             when x"13" =>
               config_cfd.InputThreshold                          <= unsigned(BUS_RX.data(9 downto 0));
               config_cfd.PolarityInvert                          <= BUS_RX.data(17);
-            when x"16" => config_cfd.BaselineAverage             <= unsigned(BUS_RX.data(3 downto 0));
+            when x"16" => config_cfd.BaselineAverage             <= unsigned(BUS_RX.data(4 downto 0));
             when x"17" => config_cfd.TriggerEnable(31 downto 0)  <= BUS_RX.data(31 downto 0);
             when x"18" => config_cfd.TriggerEnable(47 downto 32) <= BUS_RX.data(15 downto 0);
             when x"19" =>
index 1f493c95a146ca4e5e05f05f733584b1115a06a2..ec29c5b16f78190705792aea6d9e1ab3bf37551e 100644 (file)
@@ -46,7 +46,7 @@ package adc_package is
     DebugMode   : integer range 0 to 3; -- 0 CFD events, debug: 1 raw, 2 subtracted, 3 cfd
     InputThreshold   : unsigned(9 downto 0);
     PolarityInvert   : std_logic;
-    BaselineAverage  : unsigned(3 downto 0);
+    BaselineAverage  : unsigned(4 downto 0);
     BaselineAlwaysOn : std_logic;
     CFDDelay         : unsigned(4 downto 0);
     CFDMult          : unsigned(3 downto 0);