Functions
RESET_COUNTER

Overview

The RESET_COUNTER procedure call resets the value a general purpose counter back to 0 on the next rising edge of the clock. In order to reset a general purpose counter, which differs from a TIME_COUNTER, an explict call to RESET_COUNTER needs to be made. The RESET_COUNTER procedure call typically will only be useful when appearing inside a state machine state. Because each framework resource index '(M)' supports an array of general purpose counters, each call to RESET_COUNTER must specify a non-negative index to specify the counter that is to be reset. If the index value is given as -1 or all_counters, then all counter values on a that specific resource domain index will be reset back to zero.

Example API Call(s):

RESET_COUNTER(0, next_state_rec, state_reg_rec);
RESET_COUNTER(-1, 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 counter to be reset to value of 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 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
TIME_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.