]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
Skip ADC10 for lattice >2.1 compatibility
authorAndreas Neiser <neiser@kph.uni-mainz.de>
Thu, 28 May 2015 11:40:07 +0000 (13:40 +0200)
committerAndreas Neiser <neiser@kph.uni-mainz.de>
Sat, 13 Jun 2015 15:37:06 +0000 (17:37 +0200)
ADC/config.vhd
ADC/source/adc_ad9219.vhd

index 1c7893619fe9a53e240a913b8a65a0c3ac8f07ed..5b92703e985d6566571cbec2677e8eb5841aa1cf 100644 (file)
@@ -35,7 +35,7 @@ package config is
   --These are currently used for the included features table only
   constant ADC_BASELINE_LOGIC : integer := c_YES;
   constant ADC_TRIGGER_LOGIC  : integer := c_YES;
-  constant ADC_CHANNELS       : integer := 48;
+  constant ADC_CHANNELS       : integer := 44;
 
   --Include the TDC (only usefule for CFD readout mode) 
   constant INCLUDE_TDC : integer := c_YES;
index 50f71e1142769a6473fc14b3c08fd564366c49ac..a64157e3c2be8fe84db19dea5d6f69e59176d72e 100644 (file)
@@ -157,7 +157,7 @@ begin
       );
   end generate;
 
-  gen_5 : if NUM_DEVICES = 5 generate
+  gen_5 : if NUM_DEVICES = 5 and ADC_CHANNELS = 48 generate
     THE_5 : entity work.dqsinput_5x5
       port map(
         clk_0        => ADC_DCO(1),
@@ -185,6 +185,35 @@ begin
         q_4          => q(4)
       );
   end generate;
+  
+  -- skip ADC10, connected to problematic input for Diamond >2.1
+  gen_4 : if NUM_DEVICES = 5 and ADC_CHANNELS = 44 generate
+    THE_4 : entity work.dqsinput_4x5
+      port map(
+        clk_0        => ADC_DCO(1),
+        clk_1        => ADC_DCO(2),
+        clk_2        => ADC_DCO(3),
+        clk_3        => ADC_DCO(4),
+        clkdiv_reset => RESTART_IN,
+        eclk         => clk_adcfast_i,
+        reset_0      => restart_i,
+        reset_1      => restart_i,
+        reset_2      => restart_i,
+        reset_3      => restart_i,
+        sclk         => clk_data,
+        datain_0     => ADC_DATA(4 downto 0),
+        datain_1     => ADC_DATA(9 downto 5),
+        -- ADC_DATA(14 downto 10) corresponds to ADC10
+        datain_2     => ADC_DATA(19 downto 15),
+        datain_3     => ADC_DATA(24 downto 20),
+        q_0          => q(0),
+        q_1          => q(1),
+        -- skip here as well
+        q_2          => q(3),
+        q_3          => q(4)
+    );
+    q(2) <= (others => '0');
+  end generate;
 
   -- for simulation purposes only
   gen_dummy_dqs : if NUM_DEVICES = 1 generate