Baseline Restorer TM
Real-time baseline estimation block for time-multiplexed (TM) input signals. Computes a moving average of input samples to estimate the signal baseline, with automatic hold during pulse events to prevent bias from signal excursions.
Introduction
The Baseline Restorer TM block performs real-time baseline estimation on a time-multiplexed input signal. Its main function is to compute the average (baseline) of the incoming signal samples over a defined integration period, and to pause this calculation when an event (trigger) is detected.
This ensures that transient signal excursions (pulses) do not bias the baseline estimation, which is critical for accurate pulse-height analysis in spectroscopy applications.
The block processes multiple samples per clock cycle (TM-phase multiplexed data), making it suitable for high-speed digitizers operating at effective sampling rates of hundreds of MHz to GHz.
Pin Description
BL_HOLD.
This is a scalar (1-bit) signal that applies to all TM phases.
2^M_LENGTH × TM.
Minimum value: 3 (8 samples × TM), Maximum: limited by MaxLength property.
Example: M_LENGTH=9 with TM=4 gives 512×4 = 2048 samples.
Properties
Width of the input data in bits
Bit-width of each sample within the TM frame. Applies toDATA_IN and BASELINE signals.
Acceptable range: 4 … 32, default 16.
Default: 16
Range: 4 – 32
Maximum number of samples for the moving average
Maximum number of samples that can be used for baseline calculation. Determines the maximum allowed value for M_LENGTH. Available values: 1024, 2048, 4096, 8192, default 1024.Default: 1024
Options: 1024 2048 4096 8192
Set number of samples for each clock cycle
Number of parallel samples processed per clock cycle (TM factor). Available values: 2, 4, 8, 16, 32, default 4.Default: 4
Options: 2 4 8 16 32
Usage
Functional Overview
The figure shows:
- TRIGGER: The trigger signal that initiates the hold period
- BASELINE INHIBIT: The period during which baseline calculation is suspended (to exclude the pulse)
- BASELINE LENGTH: The integration window for computing the average
How It Works
The input signal arrives through the DATA_IN port, carrying TM-phase multiplexed samples — i.e., multiple samples per clock cycle. The trigger signal (TRIGGER) used to suspend the baseline computation is a global, scalar signal (not phase-specific). This means that even if the trigger occurred in only one TM phase, the baseline integration is paused for all phases equally.
This simplification reduces the complexity of the logic and resource usage while still providing accurate baseline estimation.
Baseline Window Size
The baseline is computed over a number of samples defined by the M_LENGTH input. The window size is calculated using the formula:
$$ \text{Baseline Length} = 2^{\text{M_LENGTH}} \times \text{TM} $$
| M_LENGTH value | Number of samples (with TM=4) |
|---|---|
| 5 | 32 × 4 = 128 |
| 6 | 64 × 4 = 256 |
| 7 | 128 × 4 = 512 |
| 8 | 256 × 4 = 1024 |
| 9 | 512 × 4 = 2048 |
| 10 | 1024 × 4 = 4096 |
| 11 | 2048 × 4 = 8192 |
Hold Duration
When a trigger occurs, the computation is suspended for a duration defined by the BL_HOLD input. This value specifies the number of time-multiplexed samples (not clock cycles) during which the baseline will be inhibited.
The actual hold duration in time units is:
$$ \text{Hold Time} = \text{BL_HOLD} \times \text{TM} \times T_{clk} $$
where $T_{clk}$ is the clock period.
Example: If the clock period is 2 ns, TM = 4, and BL_HOLD = 50, the hold duration will be: $$50 \times 4 \times 2,\text{ns} = 400,\text{ns}$$
Timing Diagram
The diagram shows:
- When
TRIGGERgoes high, theHOLDsignal activates - During the hold period,
BASELINEoutput remains frozen (samples are excluded) - After the hold period ends, baseline integration resumes and a new
BASELINEvalue is computed
Output Signals
- BASELINE: The computed baseline value (moving average of input samples)
- BASELINE_VALID: Asserts HIGH when the first valid baseline has been computed after integration
- RUNNING_NOT_HOLD: HIGH when the block is actively integrating (not in hold state)
- HOLD_TIME: Counter showing the number of TM-sample intervals during which the block is in hold
Typical Applications
- Pulse-height analysis (PHA) in gamma-ray spectroscopy
- Baseline correction for Multi-Channel Analyzers (MCA)
- Signal conditioning for scintillator/SiPM detectors
- Real-time DC offset removal in high-rate environments