Detect Burst (detect_burst_xs)
Detects signal bursts in a timed complex sample stream, outputting the burst samples with a corrected burst-start timestamp.
Design
The detect burst component monitors a stream of timed complex short samples and
identifies bursts of signal energy. Each burst’s energy is compared against a linear
detection threshold derived from the threshold property. When the number of
consecutive above-threshold samples reaches min_burst, a burst start is
declared; the burst-start time is emitted on the output_time port, with the
timestamp adjusted by fractional_time_adj to account for the detection latency.
The detect burst component is usually accompanied by the timestamp inserter component as shown in figure 1. This component periodically sends a time message (e.g. every 1024 samples) marking time derived from the platform’s local time server. The number of samples arriving at the input interface is counted to derive a burst’s start index with the count index always reset to zero when a new time message is received. When a sample crosses the defined threshold, the burst’s start time is calculated as follows:
Once a burst is detected, samples are accumulated until burst_end_count
consecutive below-threshold samples are seen, at which point the burst is
considered complete and its samples are emitted on the output port. The delay due to
sample accumulation as shown in figure 3 should not be an issue since it is conceived that
there would be at a minimum, two burst periods of processing delay before responding to
received data. The start time message would be used to by the receive application to schedule
a timely response and align output burst with received bursts.
A block diagram representation of the component is given in detect_burst_xs-diagram.
Figure 216: Detect burst block diagram
Figure 217: Input waveform showing bursts above threshold
Figure 218: Output waveform of detected bursts
Interface
<?xml version="1.0" encoding="utf-8"?>
<componentspec>
<property name="bypass" type="bool" writable="true" parameter="false" default="false"
description="Used when detecting burst with timestamp is not desired."/>
<property name="threshold" type="ushort" writable="true" parameter="false" default="500"
description="Linear signal detection level 0-2047"/>
<property name="min_burst" type="ushort" writable="true" parameter="false" default="100"
description="Minimum burst length in samples that determines start of burst."/>
<property name="burst_end_count" type="ushort" writable="true" parameter="false" default="100"
description="Consecutive below-threshold samples to declare burst complete."/>
<property name="fractional_time_adj" type="ulong" writable="true" parameter="false" default="58040"
description="Pre-calculated time adjustment value to mitigate division computation in HDL. It is derived by
round(2^32/sample_rate)."/>
<port name="input" producer="false" protocol="complex_short_timed_sample-prot"/>
<port name="output" producer="true" protocol="complex_short_timed_sample-prot"/>
<port name="output_time" producer="true" protocol="complex_short_timed_sample-prot"/>
</componentspec>
Opcode Handling
Samples within a detected burst are forwarded on
output.A time opcode carrying the corrected burst-start timestamp is emitted on
output_time.Flush opcodes reset the detection state.
Sample interval, flush, discontinuity, and metadata opcodes are passed through to
output.
Properties
bypass: Used when detecting burst with timestamp is not desired. When true, samples are passed through unmodified and no detection is performed.Type:
boolAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
false
threshold: Linear signal detection level 0-2047. Linear signal detection level (0-2047) compared against sample energy.Type:
ushortAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
500
min_burst: Minimum burst length in samples that determines start of burst. Minimum number of above-threshold samples required before a burst start is declared.Type:
ushortAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
100
burst_end_count: Consecutive below-threshold samples to declare burst complete. Number of consecutive below-threshold samples that declares the burst complete.Type:
ushortAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
100
fractional_time_adj: Pre-calculated time adjustment value to mitigate division computation in HDL. It is derived by round(2^32/sample_rate). Pre-calculated time adjustment value (derived as round(2^32/sample_rate)).Type:
ulongAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
58040
Ports
Inputs:
input: Timed complex short sample input stream.Protocol:
complex_short_timed_sample-protOptional:
False
Outputs:
output: Samples belonging to detected bursts.Protocol:
complex_short_timed_sample-protOptional:
False
output_time: Burst-start timestamp messages (time opcode) emitted at each detected burst start.Protocol:
complex_short_timed_sample-protOptional:
False
Implementations
detect_burst_xs(HDL)
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="detect_burst_xs">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.examples.detect_burst_xs" name="detect_burst_xs">
<property name="bypass" value="false"/>
<property name="threshold" value="400"/>
<property name="min_burst" value="100"/>
<property name="burst_end_count" value="100"/>
<property name="fractional_time_adj" value="58040"/>
</instance>
<connection>
<port instance="detect_burst_xs" name="output_time"/>
<port instance="time_out" name="in"/>
</connection>
<connection>
<port instance="detect_burst_xs" name="output"/>
<port instance="burst_out" name="in"/>
</connection>
<instance component="ocpi.core.file_write" name="time_out">
<property name="filename" value="output_time.bin"/>
</instance>
<instance component="ocpi.core.file_write" name="burst_out">
<property name="filename" value="output.bin"/>
</instance>
</application>
Dependencies
The dependencies to other elements in OpenCPI are:
The
complex_short_timed_sampleprotocol on all ports.
There is also a dependency on:
ieee.std_logic_1164
ieee.numeric_std
Limitations
Limitations of detect_burst_xs are:
Sample data is expected in the 0-2047 linear range so the
thresholdvalue is meaningful.
fractional_time_adjmust be set to round(2^32/sample_rate) for the sample rate of the stream.
Testing
The component unit test suite covers typical burst detection, threshold,
burst_end_count, and min_burst property variations, boundary sample
values, input stressing, message size handling, and timing behavior.
Tested platforms: None
Component testing not completed.