use work.trb_net_std.all;
-entity trg_coin is
+entity trg_coincidence is
port(
-
+ clk_in : in std_logic;
+ signals : in std_logic_vector(31 downto 0);
+-- reg_inhalt : in std_logic_vector(31 downto 0);
+ processed_signals : out std_logic_vector(31 downto 0)
)
end trg_coin;
-architecture behave of trg_coin is
+architecture behave of trg_coincidence is
- SIGNAL ......:std_logic...
+
architecture arch of trigger_logic is
constant CHANNELS : integer := 32;
+constant NEUES : integer := 155;
--Registers
signal reg_enable1 : std_logic_vector(CHANNELS-1 downto 0):=(others => '0');
signal coin_2_out : std_logic_vector(CHANNELS-1 downto 0);
signal address_i : integer range 0 to 255;
-
+signal tester : std_logic_vector(CHANNELS-1 downto 0);
--
---------------------------------------------------------------------------
address_i <= to_integer(unsigned(BUS_RX.addr(7 downto 0)));
+tester <= str_2_cion;
PROC_REGS : process begin
);
end generate;
-
-
+-- THE_COIN : entity work.trg_coincidence
+--
+-- port map(
+-- clk_in => CLK,
+-- signals => str_2_cion,
+-- -- reg_inhalt => reg_coin1,
+-- processed_signals=> coin_2_out
+-- );
+--
end architecture;
-
-
-
-
-
-
+
architecture behave of trg_stretch is
signal output : std_logic:='0';
signal tester : unsigned(31 downto 0):= x"00000000";
signal downcounter : integer range 0 to 1022;
+signal bessererTest : std_logic;
begin
processed_signal<=output;
stretch_time_int <= to_integer(unsigned(stretch_time(9 downto 0))); -- umschreiben passt noch nicht
stretch_type_int <= to_integer(unsigned(stretch_type(1 downto 0)));
- -- output <= '1';
+-- output <= '1';
+ bessererTest <= '1';
PROC_STRETCH_1: process begin
wait until rising_edge(clk_in);
- if signal_in='1' then
+ if signal_in='1' then
output<='1';
downcounter<=stretch_time_int;
-- elsif stretch_type=x"0" then
-
elsif signal_in='0' then
+ if stretch_type_int = 0 then
+ output <= '0';
+ end if;
if stretch_type_int = 1 then
- tester<= tester +1 ;
+ tester<= tester +1 ;
if downcounter> 0 then
downcounter <= downcounter -1;
else
output<='0';
- end if;
+ end if;
end if;
- if stretch_type_int= 2 then
+ if stretch_type_int= 2 then
if downcounter > 0 and pulse_10='1' then
downcounter<= downcounter -1 ;
else