]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
Include code for synchronous read-out and busy in CTS
authorJan Michel <j.michel@gsi.de>
Wed, 26 Jul 2017 16:14:04 +0000 (18:14 +0200)
committerJan Michel <j.michel@gsi.de>
Wed, 26 Jul 2017 16:14:04 +0000 (18:14 +0200)
cts/source/cts.vhd

index 4b633dd83a59157061fe0d9358a91114fe030f92..4cc82170e0afaecb94cc9a0b916ac33054be690c 100755 (executable)
@@ -345,6 +345,9 @@ architecture RTL of CTS is
    
    signal trg_information_reg : std_logic_vector(23 downto 0);
    
+   signal busy_out_counter : unsigned(3 downto 0);
+   signal busy_out_i, busy_end_i : std_logic;
+   
 begin
    assert(EFFECTIVE_INPUT_COUNT > 0) report "The CTS requires atleast 1 input or input multiplexer";
    assert(TRIGGER_ADDON_COUNT = 0 or ADDON_LINE_COUNT > 0) report "If you use an input multiplexer you have to provide atleast 1 addon input line";
@@ -571,7 +574,9 @@ begin
    
    CTS_TRG_TYPE_OUT <= trigger_type_buf_i;
    
-   
+----------------------------------------------------
+-- Normal Busy out option
+----------------------------------------------------   
    proc_busyout : process begin
      wait until rising_edge(CLK);
      if td_fsm_i = TD_FSM_IDLE then
@@ -581,14 +586,31 @@ begin
      end if;
    end process;  
 
+----------------------------------------------------
+-- Busy out option for synchronous japanese setup
+----------------------------------------------------
 --    proc_busyout : process begin
 --      wait until rising_edge(CLK);
 --      if ro_fsm_i = RO_FSM_WAIT_BECOME_IDLE and CTS_IPU_BUSY_IN = '0' and fifo_empty_i = '1' then
---        TRIGGER_BUSY_OUT <= '0';
+--        busy_out_i <= '0';
+--        if busy_out_i = '1' then
+--          busy_out_counter <= x"9";
+--        end if;  
 --      elsif  td_fsm_i = TD_FSM_SEND_TRIGGER then 
---        TRIGGER_BUSY_OUT <= '1';
+--        busy_out_i <= '1';
 --      end if;
+--      
+--      if busy_out_counter = 0 then
+--        busy_end_i <= '0';
+--      else
+--        busy_out_counter <= busy_out_counter - 1;
+--        busy_end_i <= '1';
+--      end if;  
 --    end process;  
+--    -- TRIGGER_BUSY_OUT <= busy_out_i;
+--    TRIGGER_BUSY_OUT  <= busy_end_i;
+---------------------------------------------------
+   
    
    
    read_out_proc: process(CLK) is