Rev Author Line No. Line
4918 kaklik 1 library IEEE;
2 use IEEE.STD_LOGIC_1164.all;
3 use IEEE.numeric_std.all;
4  
5 package kakona_package is
6  
7 -- information block constants:
8 -- Size:
9 constant C_KAK_INFO_BITWIDTH : natural := 32; -- not to be changed
10 constant C_GUID : std_logic_vector( 4*C_KAK_INFO_BITWIDTH - 1 downto 0 ) := X"D52900BA62BC431DBB38C1D38551887A"; -- 1-lane
11  
12 constant C_NUM_INPUT_ADC_MODULES : natural := 2; -- for SPI block
13 constant C_NUM_INPUT_ADC_DATA_PORTS : natural := 4; -- for processing block generate
14  
15 -- configuration for the SPI transmitter for ADCs:
16  
17 -- SPI DATA version 1:
18 constant C_SPI_ADC1_DATA1 : std_logic_vector( 79 downto 0 ) := X"00" & "10000000" & -- software reset
19 X"01" & "00100000" & -- two's complement enabled
20 X"02" & "00000010" & -- 3.5mA LVDS driver, test pattern off, 1-lane
21 X"03" & "10010110" & -- test pattern msb '96'
22 X"04" & "11110010"; -- test pattern lsb 'F2'
23 constant C_SPI_ADC2_DATA1 : std_logic_vector( 79 downto 0 ) := X"00" & "10000000" & -- software reset
24 X"01" & "00100000" & -- two's complement enabled
25 X"02" & "00000010" & -- 3.5mA LVDS driver, test pattern off, 1-lane
26 X"03" & "11111111" & -- test pattern msb 'FF'
27 X"04" & "00000000"; -- test pattern lsb '00'
28 constant C_SPI_ADC_DATA1 : std_logic_vector( C_SPI_ADC1_DATA1'length + C_SPI_ADC2_DATA1'length - 1 downto 0 ) := C_SPI_ADC1_DATA1 & C_SPI_ADC2_DATA1;
29  
30 -- SPI DATA version 2:
31 -- difference: test pattern on.
32 constant C_SPI_ADC1_DATA2 : std_logic_vector( 79 downto 0 ) := X"00" & "10000000" & -- software reset
33 X"01" & "00100000" & -- two's complement enabled
34 X"02" & "00000110" & -- 3.5mA LVDS driver, test pattern on, 1-lane
35 X"03" & "10010110" & -- test pattern msb '96'
36 X"04" & "11110010"; -- test pattern lsb 'F2'
37 constant C_SPI_ADC2_DATA2 : std_logic_vector( 79 downto 0 ) := X"00" & "10000000" & -- software reset
38 X"01" & "00100000" & -- two's complement enabled
39 X"02" & "00000110" & -- 3.5mA LVDS driver, test pattern on, 1-lane
40 X"03" & "11111110" & -- test pattern msb 'FE'
41 X"04" & "11111111"; -- test pattern lsb 'FF'
42 constant C_SPI_ADC_DATA2 : std_logic_vector( C_SPI_ADC1_DATA2'length + C_SPI_ADC2_DATA2'length - 1 downto 0 ) := C_SPI_ADC1_DATA2 & C_SPI_ADC2_DATA2;
43  
44  
45 constant C_SPI_ADC_LENGTH : integer := 16;
46 constant C_SPI_ADC_PACKETS : integer := 5;
47 constant C_SPI_ADC_PAUSE : integer := 300;
48  
49 -- definition of swapped P&N wires:
50 constant C_FRAME_WIRES_SWAPPED_PN : std_logic := '1';
51  
52 -- definition of swapped P&N wires in data lines. Direction conforms to .ucf file array.
53 constant C_DATA_WIRES_SWAPPED_PN : std_logic_vector( 0 to 3 ) := "0101";
54  
55 end package;
56  
57 package body kakona_package is
58 end package body;