Index: /firmware/FTM/ftm_definitions.vhd
===================================================================
--- /firmware/FTM/ftm_definitions.vhd	(revision 10245)
+++ /firmware/FTM/ftm_definitions.vhd	(revision 10246)
@@ -22,4 +22,11 @@
 -- kw 25.02.:  changes for HDL-Designer (use FACT_FTM.lib.ftm_...),
 -- DD_BLOCK_SIZE added (set to 0x008 for first tests), SD_ADDR_coin_win_[p,c] defined
+--
+-- modified:   Quirin Weitzel, March 14 2011
+-- second merger with library file from dortmund (changes below)
+-- kw 01.03.: added array sd_block_default_ftu_active_list (type and defaults)
+-- kw 02.03.: added DD_BLOCK_SIZE_GENERAL (on-time counter + temperatures), changed DD_BLOCK_SIZE to 0x010 for testing
+-- kw 03.03.: added FTM_HEADER_LENGTH
+--
 ----------------------------------------------------------------------------------
 
@@ -76,5 +83,6 @@
   constant INT_CLK_FREQUENCY_2 : integer := 250000000;  -- 250MHz
   constant LOW_FREQUENCY       : integer :=   1000000;  -- has to be smaller than INT_CLK_FREQUENCY_1
-
+  constant SCALER_FREQ_DIVIDER : integer :=      3000;  -- for simulation, should normally be 1
+  
   --FTM address and firmware ID
   constant FTM_ADDRESS : std_logic_vector(7 downto 0) := "11000000";  -- 192
@@ -174,4 +182,7 @@
   constant CMD_PING : std_logic_vector := X"0010"; -- ping all FTUs
 
+  -- header length of data packages
+  constant FTM_HEADER_LENGTH : std_logic_vector (7 DOWNTO 0) := X"0B";
+  
   -- FTU-list parameters
   constant FL_BLOCK_SIZE           : std_logic_vector := X"0F9"; -- FTU-list size -- 9 + (40 * 6) = 249
@@ -192,6 +203,8 @@
 
   -- dynamic data block
-  constant DD_BLOCK_SIZE : std_logic_vector (11 downto 0) := X"008"; -- 7 + (40 * 12) = 0x1E7 --total size of dynamic data block 
-
+  --constant DD_BLOCK_SIZE         : std_logic_vector (11 downto 0) := X"010"; -- 7 + (40 * 12) = 0x1E7 --total size of dynamic data block
+  constant DD_BLOCK_SIZE         : std_logic_vector (11 downto 0) := X"1E7"; -- 7 + (40 * 12) = 0x1E7 --total size of dynamic data block
+  constant DD_BLOCK_SIZE_GENERAL : integer := 7; -- dynamic block size without FTU data
+  
   -- addresses in static data block
   constant SD_ADDR_general_settings : std_logic_vector := X"000";
@@ -235,5 +248,5 @@
   type sd_block_default_array_type is array (0 to (SD_BLOCK_SIZE_GENERAL - 1)) of std_logic_vector (15 downto 0);
   type sd_block_ftu_default_array_type is array (0 to (SD_FTU_DATA_SIZE - 1)) of std_logic_vector (15 downto 0);
-  type sd_block_activeFTUlist_default_array_type is array (0 to (NO_OF_CRATES - 1)) of std_logic_vector (15 downto 0);
+  type sd_block_default_ftu_active_list_type is array (0 to (SD_FTU_ACTIVE_NUM - 1)) of std_logic_vector (15 downto 0);
   
   -- general default values
@@ -289,5 +302,5 @@
 
   --default values for active FTU lists
-  constant sd_block_activeFTUlist_default_array : sd_block_activeFTUlist_default_array_type := (
+  constant sd_block_default_ftu_active_list : sd_block_default_ftu_active_list_type := (
     X"0001",
     X"0000",
@@ -300,8 +313,7 @@
   constant width_PLC : integer := 6;  -- counter width pulse duration 
 
-
--- Timing counter
+  -- Timing counter
   constant tc_width : integer := 32;    -- width (number of bits) of timing counter
-  constant zero : unsigned (tc_width - 1 downto 0) := (others => '0');
+  -- constant zero : unsigned (tc_width - 1 downto 0) := (others => '0');
   
 end ftm_constants;
