Ignore:
Timestamp:
Feb 16, 2011, 8:02:46 AM (9 years ago)
Author:
neise
Message:
still unstable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.