From 6034eee6eaa1433d46fe04f415144ea17855eade Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 5 Dec 2014 14:44:27 +0100 Subject: [PATCH] added buffer size setting to config file of 32pin AddOn --- 32PinAddOn/config.vhd | 3 +++ 32PinAddOn/trb3_periph_32PinAddOn.vhd | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/32PinAddOn/config.vhd b/32PinAddOn/config.vhd index 818a77d..75d19bd 100644 --- a/32PinAddOn/config.vhd +++ b/32PinAddOn/config.vhd @@ -21,6 +21,9 @@ package config is constant RING_BUFFER_SIZE : integer range 0 to 7 := 3; --ring buffer size: 0, 1, 2, 3 --ring buffer size: 32,64,96,128 + constant EVENT_BUFFER_SIZE : integer range 9 to 15 := 12; -- size of the event buffer, 2**N + constant EVENT_MAX_SIZE : integer := 2000; --maximum event size. Should not exceed EVENT_BUFFER_SIZE/3 + --Include SPI on AddOn connector constant INCLUDE_SPI : integer := c_YES; diff --git a/32PinAddOn/trb3_periph_32PinAddOn.vhd b/32PinAddOn/trb3_periph_32PinAddOn.vhd index 7b58655..4f3a361 100644 --- a/32PinAddOn/trb3_periph_32PinAddOn.vhd +++ b/32PinAddOn/trb3_periph_32PinAddOn.vhd @@ -387,9 +387,9 @@ begin TIMING_TRIGGER_RAW => c_YES, --Configure data handler DATA_INTERFACE_NUMBER => 1, - DATA_BUFFER_DEPTH => 12, + DATA_BUFFER_DEPTH => EVENT_BUFFER_SIZE, DATA_BUFFER_WIDTH => 32, - DATA_BUFFER_FULL_THRESH => 2**12-400, + DATA_BUFFER_FULL_THRESH => 2**EVENT_BUFFER_SIZE-EVENT_MAX_SIZE, TRG_RELEASE_AFTER_DATA => c_YES, HEADER_BUFFER_DEPTH => 9, HEADER_BUFFER_FULL_THRESH => 2**9-16 -- 2.43.0