Table Of Contents

Counter (Multirate Dataflow)

Last Modified: September 10, 2016

Counts up or down with configurable step size, initial value, and reset settings.

connector_pane_image
datatype_icon

reset

A Boolean that determines whether to reset the counter.

To configure the node to display this input, select the node on the diagram and click the Item tab.

TRUE Resets the counter.
FALSE Does not reset the counter.
datatype_icon

count

A single numeric value. This value increments or decrements every time the node executes.

Comparison of Counter Options

Select one of two options in the Behavior section of the Item tab.

Option Definition Example Effect on Resources
Free Running

Specifies that the Limit Value is bound by the Word Length only. This node is free running by default.

When the count reaches the Limit Value, the count resets to a value equal to the remainder of (count + Step Size) / (Limit Value + 1).

The Limit Value is equal to (2Word Length - 1).

Given an Initial Value of 3, a Step Size of 3, and a Word Length of 4, the count sequence is 3, 6, 9, 12, 15, 2, 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, and so on. In this example, the counter goes from 15 to 2 because the remainder of (15 + 3) / (15 + 1) is 2. This option saves space on hardware because the counter does not require additional logic.
Limited Specifies to set a limit on the number this node counts to.When the count reaches the Limit Value, the count resets to the Initial Value. Given an Initial Value of 3, a Step Size of 3, and a Limit Value of 15, the count sequence is 3, 6, 9, 12, 15, 3, 6, 9, and so on. This option uses more space on hardware because the counter uses additional logic.

Where This Node Can Run:

Desktop OS: Windows

FPGA: All devices


Recently Viewed Topics