]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
allow to have more than 8 cts input multiplexer
authorJan Michel <michel@physik.uni-frankfurt.de>
Tue, 18 Apr 2023 11:20:06 +0000 (13:20 +0200)
committerJan Michel <michel@physik.uni-frankfurt.de>
Tue, 18 Apr 2023 11:20:06 +0000 (13:20 +0200)
cts/source/cts_trigger.vhd

index 7cf62ed078a53af8adc0f16e6a50ee220e95ab6f..af0629ec44562aec2996c0a5ebf529ea3167ecf6 100755 (executable)
@@ -243,12 +243,12 @@ begin
    gen_coin: for i in 0 to TRIGGER_COIN_COUNT - 1 generate
       my_coin: CTS_TRG_COIN 
       generic map (
-         INPUT_COUNT => EFFECTIVE_INPUT_COUNT
+         INPUT_COUNT => min(EFFECTIVE_INPUT_COUNT,8)
       )
       port map (
          CLK_IN => CLK_IN,
          RST_IN => RESET_IN,
-         DATA_IN => trigger_inputs_i,
+         DATA_IN => trigger_inputs_i(min(EFFECTIVE_INPUT_COUNT,7) downto 0),
          TRIGGER_OUT => coins_i(i),
          CONFIG_IN => coin_config_i(i)
       );