Operator PulseCounter

Operator Library: Signal

This operator is an up/down counter. For every occurrence of a one (high) at the signal input link I, the operator is incremented or decremented. It is incremented (count up) if input link Dir = 0 and decremented (count down) if input link Dir = 1. The counter can be reset using input link Reset.

The operator output is a VALT_PIXEL0D pixel stream. At each clock cycle a pixel is output representing the current counter value. In the following figure, the behavior of the operator is illustrated.

The waveform shows underrun and overrun situations. In these cases, the operator is further decreased or increased even if the minimum or maximum of the counter has been reached. In this case, the counter will jump to the maximum or minimum possible value representable at the output.

The additional reset input link allows the reset of the operator. All outputs are set to zero, while reset.

This operator is excluded from the VisualApplets functional simulation.

I/O Properties

Property Value
Operator Type M
Input Links I, signal input
Dir, signal input
Reset, signal input
Output Link O, counter value pixel data output

Synchronous and Asynchronous Inputs

  • All signal inputs may be sourced by the same or different M-type operators through an arbitrary network of O-type operators. If they are sourced by the same M-type source, they will be automatically synchronized.

Supported Link Format

Link Parameter Input Link I Input Link Dir Input Link Reset Output Link O
Bit Width 1 1 1 [1, 64]
Arithmetic unsigned unsigned unsigned {unsigned, signed}
Parallelism 1 1 1 1
Kernel Columns 1 1 1 1
Kernel Rows 1 1 1 1
Img Protocol VALT_SIGNAL VALT_SIGNAL VALT_SIGNAL VALT_PIXEL0D
Color Format VAF_GRAY VAF_GRAY VAF_GRAY VAF_GRAY
Color Flavor FL_NONE FL_NONE FL_NONE FL_NONE
Max. Img Width any any any any
Max. Img Height any any any any

Parameters

None

Examples of Use

The use of operator PulseCounter is shown in the following examples:

  • 'Hardware Test'

    An example for hardware self test of DMA, RAM, GPIOs, Trigger and LEDs.