-- 1 GHz flash ADC, the input range is 0...125 mV -- coded into 6 bit. The pipeline depth is 50 ns. -- The external trigger stops sampling phase and -- initializes the readout counter to the value -- stored in the offset register. Earlier history -- corresponds to smaller counts. When the limit -- is reached (the readout counter = pipeline depth), -- the counter's value is set to zero for the next -- readout cycle. The external clear pulse empties -- the FIFO memory and, if longer than 80 ns, makes -- the fresh data possible to ripple through the -- pipeline. Version 1. Started 28.12.05. Copyright -- I.Tsurin, FLNR JINR. -- Module functions: -------------------------------------------- -- NA(0)F(0) - read digitized amplitudes starting -- from the 'Offset' time slice; -- NA(0)F(1)/F(17) - read/write offset register; -------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.numeric_std.all; -- OK. Here the entity starts... -------------------------------------------- entity Flash is port( -- CAMAC signals -------------------------------------------- N_COM: in std_logic; B_COM: in std_logic; Z_COM: in std_logic; C_COM: in std_logic; I_COM: in std_logic; Strobe1: in std_logic; Strobe2: in std_logic; X_RES: out std_logic; Q_RES: out std_logic; L_RES: out std_logic; WRI_DAT: in std_logic_vector(23 downto 0); RDA_DAT: out std_logic_vector(23 downto 0); F_BUS: in std_logic_vector(4 downto 0); A_BUS: in std_logic_vector(3 downto 0); -------------------------------------------- -- Detector signals -------------------------------------------- Trigger: in std_logic; Clear: in std_logic; FADC0: in std_logic_vector(5 downto 0); FADC1: in std_logic_vector(5 downto 0); FADC2: in std_logic_vector(5 downto 0); FADC3: in std_logic_vector(5 downto 0); FADC4: in std_logic_vector(5 downto 0); FADC5: in std_logic_vector(5 downto 0); FADC6: in std_logic_vector(5 downto 0); FADC7: in std_logic_vector(5 downto 0); FADC8: in std_logic_vector(5 downto 0); FADC9: in std_logic_vector(5 downto 0); Strobe: in std_logic_vector(9 downto 0); -------------------------------------------- -- Synchronization scheme -------------------------------------------- DEL_OUT: out std_logic; DEL_TAP: in std_logic_vector(9 downto 0); Tank: out std_logic_vector(9 downto 0); -------------------------------------------- -- Clock frequency -------------------------------------------- CLK_ENA: out std_logic; Clock: in std_logic ); attribute pinnum: string; attribute pinnum of N_COM: signal is "173"; attribute pinnum of B_COM: signal is "160"; attribute pinnum of Z_COM: signal is "178"; attribute pinnum of C_COM: signal is "169"; attribute pinnum of I_COM: signal is "167"; attribute pinnum of Strobe1: signal is "177"; attribute pinnum of Strobe2: signal is "179"; attribute pinnum of X_RES: signal is "165"; attribute pinnum of Q_RES: signal is "180"; attribute pinnum of L_RES: signal is "175"; attribute pinnum of WRI_DAT: signal is "181,181,183,184,185,186,187,188,193,194,195,196,197,200,201,202,203,206,207,208,213,214,215,216"; attribute pinnum of RDA_DAT: signal is "217,218,219,222,223,224,225,226,227,228,233,234,235,236,237,238,239,240,1,2,3,4,5,6"; attribute pinnum of F_BUS: signal is "161,162,163,164,166"; attribute pinnum of A_BUS: signal is "168,170,174,176"; attribute pinnum of DEL_OUT: signal is "141"; attribute pinnum of DEL_TAP: signal is "140,138,136,134,132,131,133,135,137,139"; attribute pinnum of Trigger: signal is "11"; attribute pinnum of Clear: signal is "7"; attribute pinnum of FADC0: signal is ""; attribute pinnum of FADC1: signal is ""; attribute pinnum of FADC2: signal is ""; attribute pinnum of FADC3: signal is ""; attribute pinnum of FADC4: signal is ""; attribute pinnum of FADC5: signal is ""; attribute pinnum of FADC6: signal is ""; attribute pinnum of FADC7: signal is ""; attribute pinnum of FADC8: signal is ""; attribute pinnum of FADC9: signal is ""; attribute pinnum of Strobe: signal is ""; -------------------------------------------- -- Synchronization scheme -------------------------------------------- attribute pinnum of Tank: signal is "21,23,19,20,17,18,15,16,13,14"; attribute pinnum of CLK_ENA: signal is "156"; attribute pinnum of Clock: signal is "153"; end; architecture behavior of Flash is -- Start-up variables -------------------------------------------- signal INI_CNT: natural range 0 to 524287; signal DUM_RES: std_logic; signal PWR_ON: std_logic; -------------------------------------------- -- CAMAC variables -------------------------------------------- signal COM_SET: std_logic; signal SEL_SET: std_logic; signal R29_ADC: std_logic; -------------------------------------------- -- ADC variables -------------------------------------------- signal DAT_OUT: std_logic_vector(5 downto 0); signal Offset: natural range 0 to 63; signal CLR_PUL: std_logic; signal CLR_CLR: std_logic; signal CLR_CNT: natural range 0 to 3; signal ENA_SAM: std_logic; signal S00_REG: std_logic_vector(5 downto 0); signal S01_REG: std_logic_vector(5 downto 0); signal S02_REG: std_logic_vector(5 downto 0); signal S03_REG: std_logic_vector(5 downto 0); signal S04_REG: std_logic_vector(5 downto 0); signal S05_REG: std_logic_vector(5 downto 0); signal S10_REG: std_logic_vector(5 downto 0); signal S11_REG: std_logic_vector(5 downto 0); signal S12_REG: std_logic_vector(5 downto 0); signal S13_REG: std_logic_vector(5 downto 0); signal S14_REG: std_logic_vector(5 downto 0); signal S15_REG: std_logic_vector(5 downto 0); signal S20_REG: std_logic_vector(5 downto 0); signal S21_REG: std_logic_vector(5 downto 0); signal S22_REG: std_logic_vector(5 downto 0); signal S23_REG: std_logic_vector(5 downto 0); signal S24_REG: std_logic_vector(5 downto 0); signal S25_REG: std_logic_vector(5 downto 0); signal S30_REG: std_logic_vector(5 downto 0); signal S31_REG: std_logic_vector(5 downto 0); signal S32_REG: std_logic_vector(5 downto 0); signal S33_REG: std_logic_vector(5 downto 0); signal S34_REG: std_logic_vector(5 downto 0); signal S35_REG: std_logic_vector(5 downto 0); signal S40_REG: std_logic_vector(5 downto 0); signal S41_REG: std_logic_vector(5 downto 0); signal S42_REG: std_logic_vector(5 downto 0); signal S43_REG: std_logic_vector(5 downto 0); signal S44_REG: std_logic_vector(5 downto 0); signal S45_REG: std_logic_vector(5 downto 0); signal S50_REG: std_logic_vector(5 downto 0); signal S51_REG: std_logic_vector(5 downto 0); signal S52_REG: std_logic_vector(5 downto 0); signal S53_REG: std_logic_vector(5 downto 0); signal S54_REG: std_logic_vector(5 downto 0); signal S55_REG: std_logic_vector(5 downto 0); signal S60_REG: std_logic_vector(5 downto 0); signal S61_REG: std_logic_vector(5 downto 0); signal S62_REG: std_logic_vector(5 downto 0); signal S63_REG: std_logic_vector(5 downto 0); signal S64_REG: std_logic_vector(5 downto 0); signal S65_REG: std_logic_vector(5 downto 0); signal S70_REG: std_logic_vector(5 downto 0); signal S71_REG: std_logic_vector(5 downto 0); signal S72_REG: std_logic_vector(5 downto 0); signal S73_REG: std_logic_vector(5 downto 0); signal S74_REG: std_logic_vector(5 downto 0); signal S75_REG: std_logic_vector(5 downto 0); signal S80_REG: std_logic_vector(5 downto 0); signal S81_REG: std_logic_vector(5 downto 0); signal S82_REG: std_logic_vector(5 downto 0); signal S83_REG: std_logic_vector(5 downto 0); signal S84_REG: std_logic_vector(5 downto 0); signal S85_REG: std_logic_vector(5 downto 0); signal S90_REG: std_logic_vector(5 downto 0); signal S91_REG: std_logic_vector(5 downto 0); signal S92_REG: std_logic_vector(5 downto 0); signal S93_REG: std_logic_vector(5 downto 0); signal S94_REG: std_logic_vector(5 downto 0); signal S95_REG: std_logic_vector(5 downto 0); signal S00_BUF: std_logic_vector(5 downto 0); signal S01_BUF: std_logic_vector(5 downto 0); signal S02_BUF: std_logic_vector(5 downto 0); signal S03_BUF: std_logic_vector(5 downto 0); signal S04_BUF: std_logic_vector(5 downto 0); signal S10_BUF: std_logic_vector(5 downto 0); signal S11_BUF: std_logic_vector(5 downto 0); signal S12_BUF: std_logic_vector(5 downto 0); signal S13_BUF: std_logic_vector(5 downto 0); signal S14_BUF: std_logic_vector(5 downto 0); signal S20_BUF: std_logic_vector(5 downto 0); signal S21_BUF: std_logic_vector(5 downto 0); signal S22_BUF: std_logic_vector(5 downto 0); signal S23_BUF: std_logic_vector(5 downto 0); signal S24_BUF: std_logic_vector(5 downto 0); signal S30_BUF: std_logic_vector(5 downto 0); signal S31_BUF: std_logic_vector(5 downto 0); signal S32_BUF: std_logic_vector(5 downto 0); signal S33_BUF: std_logic_vector(5 downto 0); signal S34_BUF: std_logic_vector(5 downto 0); signal S40_BUF: std_logic_vector(5 downto 0); signal S41_BUF: std_logic_vector(5 downto 0); signal S42_BUF: std_logic_vector(5 downto 0); signal S43_BUF: std_logic_vector(5 downto 0); signal S44_BUF: std_logic_vector(5 downto 0); signal S50_BUF: std_logic_vector(5 downto 0); signal S51_BUF: std_logic_vector(5 downto 0); signal S52_BUF: std_logic_vector(5 downto 0); signal S53_BUF: std_logic_vector(5 downto 0); signal S54_BUF: std_logic_vector(5 downto 0); signal S60_BUF: std_logic_vector(5 downto 0); signal S61_BUF: std_logic_vector(5 downto 0); signal S62_BUF: std_logic_vector(5 downto 0); signal S63_BUF: std_logic_vector(5 downto 0); signal S64_BUF: std_logic_vector(5 downto 0); signal S70_BUF: std_logic_vector(5 downto 0); signal S71_BUF: std_logic_vector(5 downto 0); signal S72_BUF: std_logic_vector(5 downto 0); signal S73_BUF: std_logic_vector(5 downto 0); signal S74_BUF: std_logic_vector(5 downto 0); signal S80_BUF: std_logic_vector(5 downto 0); signal S81_BUF: std_logic_vector(5 downto 0); signal S82_BUF: std_logic_vector(5 downto 0); signal S83_BUF: std_logic_vector(5 downto 0); signal S84_BUF: std_logic_vector(5 downto 0); signal S90_BUF: std_logic_vector(5 downto 0); signal S91_BUF: std_logic_vector(5 downto 0); signal S92_BUF: std_logic_vector(5 downto 0); signal S93_BUF: std_logic_vector(5 downto 0); signal S94_BUF: std_logic_vector(5 downto 0); signal RDO_CLK: std_logic; signal RDO_RET: std_logic; signal RDO_CNT: natural range 0 to 63; -------------------------------------------- -- Data type conversion: -- binary#6 -> natural -------------------------------------------- function BIT6_inv_to_NUM(BIT_ARR: std_logic_vector(5 downto 0)) return natural is variable TEMP: natural range 0 to 63; begin TEMP:=0; for I in BIT_ARR'range loop TEMP:= TEMP * 2; if (BIT_ARR(I) = '0') then TEMP:= TEMP + 1; else null; end if; end loop; return TEMP; end BIT6_inv_to_NUM; -------------------------------------------- begin -- Permanent statements -------------------------------------------- DUM_RES <= '0'; CLK_ENA <= '1'; ------------------------- L_RES <= '1'; Q_RES <= 'Z'; ------------------------- -- Clock frequency 80MHz -- Delay line 50A-10250 -- Tap direct, ns inverted, ns -- --- ---------- ------------ -- In 0.00( 0.00) 6.25( 6.25) -- 0 2.50( 2.50) 8.75( 8.75) -- 1 5.00( 5.00) 11.25(11.25) -- 2 7.50( 7.50) 13.75( 1.25) -- 3 10.00(10.00) 16.25( 3.75) -- 4 12.50( 0.00) 18.75( 6.25) -- 5 15.00( 2.50) 21.25( 8.75) -- 6 17.50( 5.00) 23.75(11.25) -- 7 20.00( 7.50) 26.25( 1.25) -- 8 22.50(10.00) 28.75( 3.75) -- 9 25.00(12.50) 31.25( 6.25) -- ADC# Delay Tap/Polarity -- 1 0.00 TAP4 -- 2 1.25 not TAP2 -- 3 2.50 TAP0 -- 4 3.75 not TAP3 -- 5 5.00 TAP1 -- 6 6.25 not TAP4 -- 7 7.50 TAP2 -- 8 8.75 not TAP5 -- 9 10.00 TAP3 -- 10 11.25 not TAP6 Tank(0) <= DEL_TAP(4); Tank(1) <= not DEL_TAP(2); Tank(2) <= DEL_TAP(0); Tank(3) <= not DEL_TAP(3); Tank(4) <= DEL_TAP(1); Tank(5) <= not DEL_TAP(4); Tank(6) <= DEL_TAP(2); Tank(7) <= not DEL_TAP(5); Tank(8) <= DEL_TAP(3); Tank(9) <= not DEL_TAP(6); DEL_OUT <= Clock; -------------------------------------------- -- Start-up reset -------------------------------------------- process(DUM_RES, Clock, PWR_ON) begin if (DUM_RES = '1') then INI_CNT <= 0; elsif (Clock'event and Clock = '1') then if (PWR_ON = '1') then INI_CNT <= INI_CNT + 1; else null; end if; end if; end process; ------------------------- process(DUM_RES, Clock, INI_CNT) begin if (DUM_RES = '1') then PWR_ON <= '1'; elsif (Clock'event and Clock = '0') then if (INI_CNT = 524287) then PWR_ON <= '0'; else PWR_ON <= '1'; end if; end if; end process; -------------------------------------------- -- Common CAMAC reset -- (clear registers group #1) -------------------------------------------- process(PWR_ON, Z_COM, Strobe2) begin if (PWR_ON = '1' or Z_COM = '1') then COM_SET <= '0'; elsif (Strobe2'event and Strobe2 = '0') then COM_SET <= '1'; end if; end process; -------------------------------------------- -- Selective CAMAC reset -- (clear registers group #1) -------------------------------------------- process(PWR_ON, C_COM, Strobe2) begin if (PWR_ON = '1' or C_COM = '1') then SEL_SET <= '0'; elsif (Strobe2'event and Strobe2 = '0') then SEL_SET <= '1'; end if; end process; -------------------------------------------- -- Reset group #1 by NA(0)F(2)S(2) -------------------------------------------- process(PWR_ON, Z_COM, N_COM, Strobe2, F_BUS, A_BUS) begin if (PWR_ON = '1' or Z_COM = '0' or N_COM = '1') then R29_ADC <= '0'; elsif (Strobe2'event and Strobe2 = '0') then if (F_BUS = "11101" and A_BUS = "1111") then R29_ADC <= '1'; else null; end if; end if; end process; -------------------------------------------- -- Write group #2 (offset) register -- by a command NA(0)F(17)S(1); -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, Strobe1, N_COM, F_BUS, A_BUS, WRI_DAT) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1') then Offset <= 0; elsif (Strobe1'event and Strobe1 = '0') then if (N_COM = '0' and F_BUS = "01110" and A_BUS = "1111") then Offset <= BIT6_inv_to_NUM(WRI_DAT(5 downto 0)); else null; end if; end if; end process; -------------------------------------------- -- Read registers -------------------------------------------- process(PWR_ON, Z_COM, N_COM, F_BUS, A_BUS, DAT_OUT, Offset) begin if (PWR_ON = '1' or Z_COM = '0' or N_COM = '1') then RDA_DAT <= (others => 'Z'); -- group #1 registers -------------------------------------------- elsif ((F_BUS = "11111" or F_BUS = "11101") and A_BUS = "1111") then RDA_DAT(23 downto 6) <= "111111111111111111"; RDA_DAT(5 downto 0) <= DAT_OUT; -- group #2 registers -------------------------------------------- elsif (F_BUS = "11110" and A_BUS = "1111") then RDA_DAT(23 downto 6) <= "111111111111111111"; RDA_DAT(5 downto 0) <= conv_std_logic_vector((63 - Offset), 6); else RDA_DAT <= (others => 'Z'); end if; end process; -------------------------------------------- -- Genarating X - command response -- NA(0)F(0) - read physics data; -- NA(0)F(2) - read and clear physics data; -- NA(0)F(1) - survey board steering; -- NA(0)F(17) - change steerings; -------------------------------------------- process(PWR_ON, Z_COM, N_COM, F_BUS, A_BUS) begin if (PWR_ON = '0' and Z_COM = '1' and N_COM = '0') then -- read group #1 registers -------------------------------------------- if (F_BUS = "01111" or F_BUS = "11101" or F_BUS = "11111") then if (A_BUS = "1111") then X_RES <= '0'; else X_RES <= 'Z'; end if; -- overwrite or read group #2 registers -------------------------------------------- elsif (F_BUS = "01110" or F_BUS = "11110") then if (A_BUS = "1111") then X_RES <= '0'; else X_RES <= 'Z'; end if; else X_RES <= 'Z'; end if; else X_RES <= 'Z'; end if; end process; -------------------------------------------- -------------------------------------------- -- Stop sampling phase -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, Clear, Trigger, I_COM) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or Clear = '0') then ENA_SAM <= '1'; elsif (Trigger'event and Trigger = '1') then if (I_COM = '1') then ENA_SAM <= '0'; else null; end if; end if; end process; -------------------------------------------- -- Latching the leading edge of the Clear pulse -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_CLR, Clear, I_COM) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_CLR = '1') then CLR_PUL <= '0'; elsif (Clear'event and Clear = '0') then if (I_COM = '1') then CLR_PUL <= '1'; else null; end if; end if; end process; -------------------------------------------- -- Forming a short Clear pulse -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, Clock, CLR_PUL) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1') then CLR_CNT <= 0; elsif (Clock'event and Clock = '1') then if (CLR_PUL = '1') then CLR_CNT <= CLR_CNT + 1; else CLR_CNT <= 0; end if; end if; end process; -------------------------------------------- -- Finishing the Clear pulse -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, Clock, CLR_CNT) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1') then CLR_CLR <= '0'; elsif (Clock'event and Clock = '0') then if (CLR_CNT = 3) then CLR_CLR <= '1'; else CLR_CLR <= '0'; end if; end if; end process; -------------------------------------------- -- Latching the ADC0 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(0), ENA_SAM, S00_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 0)) then S00_REG <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '1') then if (ENA_SAM = '1') then S00_REG <= S00_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(0), ENA_SAM, S01_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S00_BUF <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '0') then if (ENA_SAM = '1') then S00_BUF <= S01_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(0), ENA_SAM, S01_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 10)) then S01_REG <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '1') then if (ENA_SAM = '1') then S01_REG <= S01_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(0), ENA_SAM, S02_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S01_BUF <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '0') then if (ENA_SAM = '1') then S01_BUF <= S02_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(0), ENA_SAM, S02_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 20)) then S02_REG <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '1') then if (ENA_SAM = '1') then S02_REG <= S02_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(0), ENA_SAM, S03_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S02_BUF <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '0') then if (ENA_SAM = '1') then S02_BUF <= S03_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(0), ENA_SAM, S03_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 30)) then S03_REG <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '1') then if (ENA_SAM = '1') then S03_REG <= S03_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(0), ENA_SAM, S04_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S03_BUF <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '0') then if (ENA_SAM = '1') then S03_BUF <= S04_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(0), ENA_SAM, S04_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 40)) then S04_REG <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '1') then if (ENA_SAM = '1') then S04_REG <= S04_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(0), ENA_SAM, S05_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S04_BUF <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '0') then if (ENA_SAM = '1') then S04_BUF <= S05_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(0), ENA_SAM, FADC0) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S05_REG <= (others => '0'); elsif (Strobe(0)'event and Strobe(0) = '1') then if (ENA_SAM = '1') then S05_REG <= FADC0; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC1 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(1), ENA_SAM, S10_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 1)) then S10_REG <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '1') then if (ENA_SAM = '1') then S10_REG <= S10_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(1), ENA_SAM, S11_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S10_BUF <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '0') then if (ENA_SAM = '1') then S10_BUF <= S11_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(1), ENA_SAM, S11_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 11)) then S11_REG <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '1') then if (ENA_SAM = '1') then S11_REG <= S11_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(1), ENA_SAM, S12_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S11_BUF <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '0') then if (ENA_SAM = '1') then S11_BUF <= S12_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(1), ENA_SAM, S12_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 21)) then S12_REG <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '1') then if (ENA_SAM = '1') then S12_REG <= S12_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(1), ENA_SAM, S13_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S12_BUF <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '0') then if (ENA_SAM = '1') then S12_BUF <= S13_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(1), ENA_SAM, S13_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 31)) then S13_REG <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '1') then if (ENA_SAM = '1') then S13_REG <= S13_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(1), ENA_SAM, S14_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S13_BUF <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '0') then if (ENA_SAM = '1') then S13_BUF <= S14_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(1), ENA_SAM, S14_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 41)) then S14_REG <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '1') then if (ENA_SAM = '1') then S14_REG <= S14_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(1), ENA_SAM, S15_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S14_BUF <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '0') then if (ENA_SAM = '1') then S14_BUF <= S15_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(1), ENA_SAM, FADC1) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S15_REG <= (others => '0'); elsif (Strobe(1)'event and Strobe(1) = '1') then if (ENA_SAM = '1') then S15_REG <= FADC1; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC2 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(2), ENA_SAM, S20_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 2)) then S20_REG <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '1') then if (ENA_SAM = '1') then S20_REG <= S20_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(2), ENA_SAM, S21_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S20_BUF <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '0') then if (ENA_SAM = '1') then S20_BUF <= S21_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(2), ENA_SAM, S21_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 12)) then S21_REG <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '1') then if (ENA_SAM = '1') then S21_REG <= S21_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(2), ENA_SAM, S22_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S21_BUF <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '0') then if (ENA_SAM = '1') then S21_BUF <= S22_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(2), ENA_SAM, S22_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 22)) then S22_REG <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '1') then if (ENA_SAM = '1') then S22_REG <= S22_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(2), ENA_SAM, S23_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S22_BUF <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '0') then if (ENA_SAM = '1') then S22_BUF <= S23_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(2), ENA_SAM, S23_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 32)) then S23_REG <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '1') then if (ENA_SAM = '1') then S23_REG <= S23_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(2), ENA_SAM, S24_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S23_BUF <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '0') then if (ENA_SAM = '1') then S23_BUF <= S24_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(2), ENA_SAM, S24_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 42)) then S24_REG <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '1') then if (ENA_SAM = '1') then S24_REG <= S24_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(2), ENA_SAM, S25_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S24_BUF <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '0') then if (ENA_SAM = '1') then S24_BUF <= S25_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(2), ENA_SAM, FADC2) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S25_REG <= (others => '0'); elsif (Strobe(2)'event and Strobe(2) = '1') then if (ENA_SAM = '1') then S25_REG <= FADC2; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC3 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(3), ENA_SAM, S30_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 3)) then S30_REG <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '1') then if (ENA_SAM = '1') then S30_REG <= S30_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(3), ENA_SAM, S31_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S30_BUF <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '0') then if (ENA_SAM = '1') then S30_BUF <= S31_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(3), ENA_SAM, S31_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 13)) then S31_REG <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '1') then if (ENA_SAM = '1') then S31_REG <= S31_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(3), ENA_SAM, S32_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S31_BUF <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '0') then if (ENA_SAM = '1') then S31_BUF <= S32_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(3), ENA_SAM, S32_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 23)) then S32_REG <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '1') then if (ENA_SAM = '1') then S32_REG <= S32_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(3), ENA_SAM, S33_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S32_BUF <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '0') then if (ENA_SAM = '1') then S32_BUF <= S33_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(3), ENA_SAM, S33_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 33)) then S33_REG <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '1') then if (ENA_SAM = '1') then S33_REG <= S33_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(3), ENA_SAM, S34_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S33_BUF <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '0') then if (ENA_SAM = '1') then S33_BUF <= S34_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(3), ENA_SAM, S34_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 43)) then S34_REG <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '1') then if (ENA_SAM = '1') then S34_REG <= S34_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(3), ENA_SAM, S35_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S34_BUF <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '0') then if (ENA_SAM = '1') then S34_BUF <= S35_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(3), ENA_SAM, FADC3) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S35_REG <= (others => '0'); elsif (Strobe(3)'event and Strobe(3) = '1') then if (ENA_SAM = '1') then S35_REG <= FADC3; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC4 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(4), ENA_SAM, S40_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 4)) then S40_REG <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '1') then if (ENA_SAM = '1') then S40_REG <= S40_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(4), ENA_SAM, S41_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S40_BUF <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '0') then if (ENA_SAM = '1') then S40_BUF <= S41_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(4), ENA_SAM, S41_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 14)) then S41_REG <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '1') then if (ENA_SAM = '1') then S41_REG <= S41_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(4), ENA_SAM, S42_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S41_BUF <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '0') then if (ENA_SAM = '1') then S41_BUF <= S42_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(4), ENA_SAM, S42_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 24)) then S42_REG <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '1') then if (ENA_SAM = '1') then S42_REG <= S42_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(4), ENA_SAM, S43_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S42_BUF <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '0') then if (ENA_SAM = '1') then S42_BUF <= S43_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(4), ENA_SAM, S43_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 34)) then S43_REG <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '1') then if (ENA_SAM = '1') then S43_REG <= S43_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(4), ENA_SAM, S44_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S43_BUF <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '0') then if (ENA_SAM = '1') then S43_BUF <= S44_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(4), ENA_SAM, S44_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 44)) then S44_REG <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '1') then if (ENA_SAM = '1') then S44_REG <= S44_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(4), ENA_SAM, S45_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S44_BUF <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '0') then if (ENA_SAM = '1') then S44_BUF <= S45_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(4), ENA_SAM, FADC4) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S45_REG <= (others => '0'); elsif (Strobe(4)'event and Strobe(4) = '1') then if (ENA_SAM = '1') then S45_REG <= FADC4; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC5 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(5), ENA_SAM, S50_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 5)) then S50_REG <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '1') then if (ENA_SAM = '1') then S50_REG <= S50_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(5), ENA_SAM, S51_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S50_BUF <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '0') then if (ENA_SAM = '1') then S50_BUF <= S51_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(5), ENA_SAM, S51_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 15)) then S51_REG <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '1') then if (ENA_SAM = '1') then S51_REG <= S51_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(5), ENA_SAM, S52_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S51_BUF <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '0') then if (ENA_SAM = '1') then S51_BUF <= S52_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(5), ENA_SAM, S52_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 25)) then S52_REG <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '1') then if (ENA_SAM = '1') then S52_REG <= S52_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(5), ENA_SAM, S53_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S52_BUF <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '0') then if (ENA_SAM = '1') then S52_BUF <= S53_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(5), ENA_SAM, S53_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 35)) then S53_REG <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '1') then if (ENA_SAM = '1') then S53_REG <= S53_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(5), ENA_SAM, S54_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S53_BUF <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '0') then if (ENA_SAM = '1') then S53_BUF <= S54_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(5), ENA_SAM, S54_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 45)) then S54_REG <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '1') then if (ENA_SAM = '1') then S54_REG <= S54_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(5), ENA_SAM, S55_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S54_BUF <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '0') then if (ENA_SAM = '1') then S54_BUF <= S55_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(5), ENA_SAM, FADC5) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S55_REG <= (others => '0'); elsif (Strobe(5)'event and Strobe(5) = '1') then if (ENA_SAM = '1') then S55_REG <= FADC5; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC6 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(6), ENA_SAM, S60_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 6)) then S60_REG <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '1') then if (ENA_SAM = '1') then S60_REG <= S60_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(6), ENA_SAM, S61_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S60_BUF <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '0') then if (ENA_SAM = '1') then S60_BUF <= S61_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(6), ENA_SAM, S61_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 16)) then S61_REG <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '1') then if (ENA_SAM = '1') then S61_REG <= S61_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(6), ENA_SAM, S62_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S61_BUF <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '0') then if (ENA_SAM = '1') then S61_BUF <= S62_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(6), ENA_SAM, S62_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 26)) then S62_REG <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '1') then if (ENA_SAM = '1') then S62_REG <= S62_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(6), ENA_SAM, S63_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S62_BUF <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '0') then if (ENA_SAM = '1') then S62_BUF <= S63_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(6), ENA_SAM, S63_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 36)) then S63_REG <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '1') then if (ENA_SAM = '1') then S63_REG <= S63_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(6), ENA_SAM, S64_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S63_BUF <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '0') then if (ENA_SAM = '1') then S63_BUF <= S64_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(6), ENA_SAM, S64_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 46)) then S64_REG <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '1') then if (ENA_SAM = '1') then S64_REG <= S64_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(6), ENA_SAM, S65_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S64_BUF <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '0') then if (ENA_SAM = '1') then S64_BUF <= S65_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(6), ENA_SAM, FADC6) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S65_REG <= (others => '0'); elsif (Strobe(6)'event and Strobe(6) = '1') then if (ENA_SAM = '1') then S65_REG <= FADC6; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC7 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(7), ENA_SAM, S70_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 7)) then S70_REG <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '1') then if (ENA_SAM = '1') then S70_REG <= S70_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(7), ENA_SAM, S71_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S70_BUF <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '0') then if (ENA_SAM = '1') then S70_BUF <= S71_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(7), ENA_SAM, S71_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 17)) then S71_REG <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '1') then if (ENA_SAM = '1') then S71_REG <= S71_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(7), ENA_SAM, S72_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S71_BUF <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '0') then if (ENA_SAM = '1') then S71_BUF <= S72_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(7), ENA_SAM, S72_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 27)) then S72_REG <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '1') then if (ENA_SAM = '1') then S72_REG <= S72_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(7), ENA_SAM, S73_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S72_BUF <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '0') then if (ENA_SAM = '1') then S72_BUF <= S73_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(7), ENA_SAM, S73_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 37)) then S73_REG <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '1') then if (ENA_SAM = '1') then S73_REG <= S73_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(7), ENA_SAM, S74_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S73_BUF <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '0') then if (ENA_SAM = '1') then S73_BUF <= S74_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(7), ENA_SAM, S74_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 47)) then S74_REG <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '1') then if (ENA_SAM = '1') then S74_REG <= S74_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(7), ENA_SAM, S75_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S74_BUF <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '0') then if (ENA_SAM = '1') then S74_BUF <= S75_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(7), ENA_SAM, FADC7) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S75_REG <= (others => '0'); elsif (Strobe(7)'event and Strobe(7) = '1') then if (ENA_SAM = '1') then S75_REG <= FADC7; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC8 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(8), ENA_SAM, S80_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 8)) then S80_REG <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '1') then if (ENA_SAM = '1') then S80_REG <= S80_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(8), ENA_SAM, S81_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S80_BUF <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '0') then if (ENA_SAM = '1') then S80_BUF <= S81_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(8), ENA_SAM, S81_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 18)) then S81_REG <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '1') then if (ENA_SAM = '1') then S81_REG <= S81_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(8), ENA_SAM, S82_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S81_BUF <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '0') then if (ENA_SAM = '1') then S81_BUF <= S82_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(8), ENA_SAM, S82_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 28)) then S82_REG <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '1') then if (ENA_SAM = '1') then S82_REG <= S82_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(8), ENA_SAM, S83_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S82_BUF <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '0') then if (ENA_SAM = '1') then S82_BUF <= S83_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(8), ENA_SAM, S83_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 38)) then S83_REG <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '1') then if (ENA_SAM = '1') then S83_REG <= S83_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(8), ENA_SAM, S84_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S83_BUF <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '0') then if (ENA_SAM = '1') then S83_BUF <= S84_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(8), ENA_SAM, S84_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 48)) then S84_REG <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '1') then if (ENA_SAM = '1') then S84_REG <= S84_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(8), ENA_SAM, S85_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S84_BUF <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '0') then if (ENA_SAM = '1') then S84_BUF <= S85_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(8), ENA_SAM, FADC8) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S85_REG <= (others => '0'); elsif (Strobe(8)'event and Strobe(8) = '1') then if (ENA_SAM = '1') then S85_REG <= FADC8; else null; end if; end if; end process; -------------------------------------------- -- Latching the ADC9 data -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(9), ENA_SAM, S90_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 9)) then S90_REG <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '1') then if (ENA_SAM = '1') then S90_REG <= S90_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(9), ENA_SAM, S91_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S90_BUF <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '0') then if (ENA_SAM = '1') then S90_BUF <= S91_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(9), ENA_SAM, S91_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 19)) then S91_REG <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '1') then if (ENA_SAM = '1') then S91_REG <= S91_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(9), ENA_SAM, S92_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S91_BUF <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '0') then if (ENA_SAM = '1') then S91_BUF <= S92_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(9), ENA_SAM, S92_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 29)) then S92_REG <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '1') then if (ENA_SAM = '1') then S92_REG <= S92_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(9), ENA_SAM, S93_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S92_BUF <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '0') then if (ENA_SAM = '1') then S92_BUF <= S93_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(9), ENA_SAM, S93_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 39)) then S93_REG <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '1') then if (ENA_SAM = '1') then S93_REG <= S93_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(9), ENA_SAM, S94_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S93_BUF <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '0') then if (ENA_SAM = '1') then S93_BUF <= S94_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, R29_ADC, RDO_CNT, Strobe(9), ENA_SAM, S94_BUF) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' or (R29_ADC = '1' and RDO_CNT = 49)) then S94_REG <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '1') then if (ENA_SAM = '1') then S94_REG <= S94_BUF; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(9), ENA_SAM, S95_REG) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1') then S94_BUF <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '0') then if (ENA_SAM = '1') then S94_BUF <= S95_REG; else null; end if; end if; end process; ------------------------- process(PWR_ON, COM_SET, SEL_SET, CLR_PUL, Strobe(9), ENA_SAM, FADC9) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or CLR_PUL = '1' ) then S95_REG <= (others => '0'); elsif (Strobe(9)'event and Strobe(9) = '1') then if (ENA_SAM = '1') then S95_REG <= FADC9; else null; end if; end if; end process; -------------------------------------------- -------------------------------------------- -- readout clock with NA(0)F(0)/F(2)S(1) -------------------------------------------- process(PWR_ON, Z_COM, N_COM, Strobe1, F_BUS, A_BUS) begin if (PWR_ON = '1' or Z_COM = '0' or N_COM = '1') then RDO_CLK <= '0'; elsif (Strobe1'event and Strobe1 = '0') then if ((F_BUS = "11111" or F_BUS = "11101") and A_BUS = "1111") then RDO_CLK <= '1'; else null; end if; end if; end process; -------------------------------------------- -- readout counter -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, ENA_SAM, Offset, RDO_CLK, RDO_RET) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or ENA_SAM = '1') then RDO_CNT <= Offset; elsif (RDO_CLK'event and RDO_CLK = '0') then if (RDO_RET = '0') then RDO_CNT <= RDO_CNT + 1; else RDO_CNT <= 0; end if; end if; end process; -------------------------------------------- -- readout range -------------------------------------------- process(PWR_ON, COM_SET, SEL_SET, ENA_SAM, RDO_CLK, RDO_CNT) begin if (PWR_ON = '1' or COM_SET = '1' or SEL_SET = '1' or ENA_SAM = '1') then RDO_RET <= '0'; elsif (RDO_CLK'event and RDO_CLK = '1') then if (RDO_CNT = 49) then RDO_RET <= '1'; else RDO_RET <= '0'; end if; end if; end process; -------------------------------------------- -- Data output -------------------------------------------- process(RDO_CNT, S00_REG, S01_REG, S02_REG, S03_REG, S04_REG, S10_REG, S11_REG, S12_REG, S13_REG, S14_REG, S20_REG, S21_REG, S22_REG, S23_REG, S24_REG, S30_REG, S31_REG, S32_REG, S33_REG, S34_REG, S40_REG, S41_REG, S42_REG, S43_REG, S44_REG, S50_REG, S51_REG, S52_REG, S53_REG, S54_REG, S60_REG, S61_REG, S62_REG, S63_REG, S64_REG, S70_REG, S71_REG, S72_REG, S73_REG, S74_REG, S80_REG, S81_REG, S82_REG, S83_REG, S84_REG, S90_REG, S91_REG, S92_REG, S93_REG, S94_REG) begin case RDO_CNT is when 0 => DAT_OUT <= S00_REG; when 1 => DAT_OUT <= S10_REG; when 2 => DAT_OUT <= S20_REG; when 3 => DAT_OUT <= S30_REG; when 4 => DAT_OUT <= S40_REG; when 5 => DAT_OUT <= S50_REG; when 6 => DAT_OUT <= S60_REG; when 7 => DAT_OUT <= S70_REG; when 8 => DAT_OUT <= S80_REG; when 9 => DAT_OUT <= S90_REG; when 10 => DAT_OUT <= S01_REG; when 11 => DAT_OUT <= S11_REG; when 12 => DAT_OUT <= S21_REG; when 13 => DAT_OUT <= S31_REG; when 14 => DAT_OUT <= S41_REG; when 15 => DAT_OUT <= S51_REG; when 16 => DAT_OUT <= S61_REG; when 17 => DAT_OUT <= S71_REG; when 18 => DAT_OUT <= S81_REG; when 19 => DAT_OUT <= S91_REG; when 20 => DAT_OUT <= S02_REG; when 21 => DAT_OUT <= S12_REG; when 22 => DAT_OUT <= S22_REG; when 23 => DAT_OUT <= S32_REG; when 24 => DAT_OUT <= S42_REG; when 25 => DAT_OUT <= S52_REG; when 26 => DAT_OUT <= S62_REG; when 27 => DAT_OUT <= S72_REG; when 28 => DAT_OUT <= S82_REG; when 29 => DAT_OUT <= S92_REG; when 30 => DAT_OUT <= S03_REG; when 31 => DAT_OUT <= S13_REG; when 32 => DAT_OUT <= S23_REG; when 33 => DAT_OUT <= S33_REG; when 34 => DAT_OUT <= S43_REG; when 35 => DAT_OUT <= S53_REG; when 36 => DAT_OUT <= S63_REG; when 37 => DAT_OUT <= S73_REG; when 38 => DAT_OUT <= S83_REG; when 39 => DAT_OUT <= S93_REG; when 40 => DAT_OUT <= S04_REG; when 41 => DAT_OUT <= S14_REG; when 42 => DAT_OUT <= S24_REG; when 43 => DAT_OUT <= S34_REG; when 44 => DAT_OUT <= S44_REG; when 45 => DAT_OUT <= S54_REG; when 46 => DAT_OUT <= S64_REG; when 47 => DAT_OUT <= S74_REG; when 48 => DAT_OUT <= S84_REG; when 49 => DAT_OUT <= S94_REG; when others => DAT_OUT <= (others => '0'); end case; end process; -------------------------------------------- end;