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.
RESET_COUNTER(0, next_state_rec, state_reg_rec);
RESET_COUNTER(all_counters, next_state_rec, state_reg_rec);
[in] | counter_index | [1] index of the counter to be reset to 0 |
[in] | next_state_rec | [2] |
[in] | state_reg_rec | [3] |
[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) |
Voice and Hotkey Commands:
[in] | counter_index | [1] "index (<integer>|all_counters)" |
[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" |
RESET_COUNTER(2, next_state_rec, state_reg_rec);
Voice Command | HotKey Sequence |
---|---|
"reset counter two" | *** |
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. |