Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

PULSE - One-shot pulse delay and stretch

A PULSE block produces configurable width output pulses with an optional delay based on its parameters. It operates in one of two modes:

Fields

NameTypeDescription
ENABLEbit_muxReset on falling edge, enable on rising
TRIGbit_muxInput pulse train
DELAYtimeOutput pulse delay (0 for no delay)
WIDTHtimeOutput pulse width (0 for input pulse width)
PULSESparamThe number of pulses to produce on each trigger, 0 means 1
STEPtimeIf pulses > 1, the time between successive pulse rising edges
TRIG_EDGEparam enumINP trigger edge
OUTbit_outOutput pulse train
QUEUEDread uint 1023Length of the delay queue
DROPPEDreadNumber of pulses not produced because of an ERR condition

Delay line

If WIDTH=0, then the Block acts as a delay line. DELAY must either be 0 or 5+ clock ticks. TRIG_EDGE, STEP, and NPULSES are ignored.

If DELAY=0 the Block is a simple pass through:

No delay or stretch

If DELAY is non-zero, rising and falling edges will be inserted in the queue and output after the given DELAY:

Pulse delay with no stretch

0 < DELAY < 5 will be treated as DELAY=5:

No WIDTH means a delay of 5 or more is required

Pulse train generation

If WIDTH != 0 then the Block will operate in pulse train mode. If NPULSES is 0 or 1 then it will produce a single pulse for each matching input pulse:

Pulse delay and stretch

The output pulses are queued, so multiple pulses can be queued before output:

Pulse train stretched and delayed

The TRIG_EDGE field can be used to select whether an input pulse queues an output on rising, falling, or both edges:

Pulse stretching with no delay activate on rising edgePulse stretching with no delay activate on falling edgePulse stretching with no delay activate on both edges

0 < WIDTH < 5 will be treated as WIDTH=5:

No delay means a WIDTH of 5 or more is required

If PULSES > 1 then multiple output pulses will be generated, separated by STEP:

Multiple pulses with no delaySmall delay width combination

Pulse period error

The following example shows what happens when the period between pulses is too short. To avoid running output pulses together, the DROPPED field is incremented and the input is dropped:

Stretched and delayed pulses too close together

The queue length is 255, so if QUEUED reaches 255 then any new pulse will be dropped and also increment DROPPED.

The DROPPED count is zeroed on rising edge of ENABLE.

Enabling the Block

There is an Enable signal that stops the Block from producing signals. Edges must occur while Enable is high to trigger a pulse creation

No pulses if disabled

If enable is dropped mid way through a pulse train, the output is set low and the QUEUED output is set to zero.

Multiple pulses interrupted

Changing parameters while Enabled

If any of the input parameters are changed while enabled, the queue is dropped and the state of the Block is reset:

Changing parameters resets pulses