Functions
RESET_COUNTER

Overview

The RESET_COUNTER procedure call resets the value, state_reg_rec(M).counter(N).value, of a general purpose counter back to 0 on the next rising edge of the clock. The RESET_COUNTER procedure call is typically used inside a state machine state to reset a counter that was configured with the CONFIGURE_COUNTER procedure call. Since each framework resource index, (M), supports an array of general purpose counters, each call to RESET_COUNTER must specify a non-negative index, (N), to specify the counter to be reset. If the index value is given as -1 or all_counters, then all counter values on that specific resource domain index will be reset to zero.

Example API Call(s):

RESET_COUNTER(0, next_state_rec, state_reg_rec);
RESET_COUNTER(all_counters, next_state_rec, state_reg_rec);

Note
A count_index value of -1 or all_counters specifies that all counters on the selected resource domain reset to 0.

Call Data [3 parameters (3 mandatory)]

Parameters
[in]counter_index[1] index of the counter to be reset to 0
[in]next_state_rec[2]
[in]state_reg_rec[3]

Return Data

Parameters
[in]state_reg_rec(M).counter(N).value[1] [integer] value returned from the framework
[in]state_reg_rec(M).counter(N).done[2] [std_logic] value asserted before rollover (generally a strobe)

Command Reference

Voice and Hotkey Commands:

See also
Reset Counter Commands

Command Parameter Mapping

Parameters
[in]counter_index[1] "index (<integer>|all_counters)"

Command Return Data

Parameters
[in]state_reg_rec(M).counter(N).value[1] [integer] "count [<array_index>]"
[in]state_reg_rec(M).counter(N).done[2] [std_logic] "count done"

Voice/HotKey Command Sequence

RESET_COUNTER(2, next_state_rec, state_reg_rec);

Voice Command HotKey Sequence
"reset counter two" ***

Usage Example

Todo:
Provide link Chaining General Purpose Counters

Notes and Warnings

Note
The RESET_COUNTER procedure call should be kept asserted for at least 1 clock cycle.

See also
CONFIGURE_COUNTER

Procedures

  RESET_COUNTER(
counter_index: in integer
signal next_state_rec: out NSR
state_reg_rec: in SRR
)
  RESET_COUNTER(
counter_index: in integer
signal next_state_rec: out NSR_ARRAY
state_reg_rec: in SRR_ARRAY
)
 0verloaded for array next_state_rec and state_reg_rec and all_counters counter_index.