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.
RESET_COUNTER(0, next_state_rec, state_reg_rec);
RESET_COUNTER(-1, next_state_rec, state_reg_rec);
[in] | counter_index | [1] index of counter to be reset to value of 0 |
[in] | next_state_rec | [2] |
[in] | state_reg_rec | [3] |
[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) |
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. |