Ignore:
Timestamp:
02/16/11 08:02:46 (14 years ago)
Author:
neise
Message:
still unstable
Location:
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_definitions.vhd

    r10155 r10156  
    5555  constant PACKAGE_SUB_VERSION : std_logic_vector(7 downto 0) := X"02";
    5656  constant PACKAGE_HEADER_LENGTH : integer := 22;
     57  constant PACKAGE_HEADER_ZEROS : integer := 6; 
    5758  constant PACKAGE_END_LENGTH : integer := 2; -- CRC and END-Flag
     59  constant PACKAGE_END_ZEROS : integer := 2;
    5860  constant CHANNEL_HEADER_SIZE : integer := 3;
     61  constant NUMBER_OF_DRS : integer := 4;
    5962 
    6063  constant W5300_S_INC : std_logic_vector(6 downto 0) := "1000000"; -- socket address offset
  • firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/memory_manager_beha.vhd

    r10155 r10156  
    166166            channel_id <= 0;
    167167            fifo_package_size_ram <= (others => 0);
    168             fifo_package_size_ram (0) <= PACKAGE_HEADER_LENGTH + 6;
     168            fifo_package_size_ram (0) <= PACKAGE_HEADER_LENGTH + PACKAGE_HEADER_ZEROS;
    169169            event_size_ram <= 0;
    170170            event_size_ram_64b <= 0;
     
    176176          if (package_index < number_of_packages) then
    177177            if (channel_index < fifo_channels_array (package_index)) then
    178               fifo_package_size_ram (package_index) <= fifo_package_size_ram (package_index) + ((roi_max_array (channel_id) + 3) * 4);
     178              fifo_package_size_ram (package_index) <=
     179                          fifo_package_size_ram (package_index) + ((roi_max_array (channel_id) + CHANNEL_HEADER_SIZE) * NUMBER_OF_DRS);
    179180              channel_index <= channel_index + 1;
    180181              channel_id <= channel_id + 1;
     
    185186            end if;
    186187          else
    187             fifo_package_size_ram (package_index - 1) <= fifo_package_size_ram (package_index - 1) + 4;
    188             event_size_ram <= event_size_ram + 4; -- Size of Event in RAM (16 Bit), + CRC + Endflag + 2 Spare               
     188            fifo_package_size_ram (package_index - 1) <= fifo_package_size_ram (package_index - 1) + PACKAGE_END_LENGTH + PACKAGE_END_ZEROS;
     189            event_size_ram <= event_size_ram + PACKAGE_END_LENGTH + PACKAGE_END_ZEROS;
    189190            state_mm <= RAM_CALC1;
    190191          end if;
Note: See TracChangeset for help on using the changeset viewer.