Functions
MONITOR_RISING_EDGES

The MONITOR_RISING_EDGES procedure call monitors a std_logic input signal level for a transition from logic '0' to logic '1'. When a low to high transition is detected, a strobe signal on state_reg_rec(M).rising_edge_reg(N) is asserted to logic '1' value for one clock cycle. The strobe signal occurs 1 clock cycle after the sampled low to high transition of the input signal.

Each resource_index, M, has an array of N rising_edge detect circuits. However, in many use cases, each of individual strobe signal, state_reg_rec(M).rising_edge_reg(N), is not explicitly read.
Instead, the caller of MONITOR_RISING_EDGES typically specifies a state machine on resource M to transition state after the rising_edge is detected.

Consider the following procedure calls:

process(state_reg_rec)
begin
RESOURCE_SELECT( sys_clk, next_state_rec, state_reg_rec );
RESOURCE_SELECT( 1e6, next_state_rec(1), state_reg_rec(1) );
MONITOR_RISING_EDGES( 0, error_sig, st_blink_red, next_state_rec(1), state_reg_rec(1) );
sm1: case (state_reg_rec(1).state_reg) is
when st_red =>
TRANSITION( st_green, sec(30, 1e6), next_state_rec(1), state_reg_rec(1) );
when st_green =>
TRANSITION( st_yellow, sec(30, 1e6), next_state_rec(1), state_reg_rec(1) );
when st_yellow =>
TRANSITION( st_red, sec(2, 1e6), next_state_rec(1), state_reg_rec(1) );
when st_blink_red =>
when others =>
end case;
end process;

The above code implements a simple traffic light controller using a state machine on with a 1MHz clock on resource 1. The state machine cycles from st_red for 30 seconds then to st_green for 30 seconds and finally to st_yellow for 3 seconds then repeats. The MONITOR_RISING_EDGES procedure call operates in parallel with the state machine monitoring the value of error_sig. If there is a '0' to '1' transition on error_sig, the MONITOR_RISING_EDGES procedure call causes the resource 1 state machine, state_reg_rec(1).state_reg, to transition to st_blink_red;

Usage Example

Todo:
Add Example Usage

Example API Call(s):

MONITOR_RISING_EDGES(0, input_sig, st_start, next_state_rec, state_reg_rec );

Call Data [ 5 parameters (5 mandatory) ]

Parameters
[in]edge_index[1] index (N) of the array rising_edge_reg vector that is returned by the framework
[in]input_signal[2] signal to be monitored for a low to high transition
[in]transition_state[3] integer state to transition to after a rising edge detection of input_signal
[out]next_state_rec[4]
[in]state_reg_rec[5]

Return Data

Parameters
[in]state_reg_rec(M).rising_edge_reg(N)[1] [std_logic] value returned from framework

Command Reference

Voice and Hotkey Commands:

See also
Monitor Rising Edges Commands

Command Parameter Mapping

Parameters
[in]edge_index[1] "index <integer>"
[in]input_signal[2] "data <std_logic>"
[in]transition_state[3] "go to [state] (<state>|<integer>)"
[out]next_state_rec[4]
[in]state_reg_rec[5]

Command Return Data

Parameters
[in]state_reg_rec(M).rising_edge_reg(N)[1] [std_logic] "rising edge reg<integer>"

Voice/HotKey Command Sequence

MONITOR_RISING_EDGES( 0, input_signal(1), st_start, next_state_rec, state_reg_rec );

Voice Command HotKey Sequence
"monitor rising edge zero" mf0
"data input signal one" data input_signal(1)
"goto state start" goto st_start

Notes and Warnings

Note
  1. The caller is responsible for indexing rising_edge_reg(N) when the call is made when reading strobes.
  2. When indexing state_reg_rec(M).rising_edge_reg(N), 'M' represents the resource index and 'N' represents the edge_index
  3. A rising_edge detection circuit is utilized when the CONFIGURE_COUNTER call specifies an enable parameter with a boolean expression
See also
MONITOR_FALLING_EDGES
CONFIGURE_COUNTER

Procedures

  MONITOR_RISING_EDGES(
edge_index: natural
input_signal: std_logic
transition_state: STATE_INTEGER
signal next_state_rec: out NSR
state_reg_rec: in SRR
)
  MONITOR_RISING_EDGES(
edge_index: natural
input_signal: std_logic
transition_state: STATE_INTEGER
signal next_state_rec: out NSR
state_reg_rec: in SRR
trigger_time: in time
)
  MONITOR_RISING_EDGES(
edge_index: natural
input_signal: std_logic
transition_state: STATE_INTEGER
signal next_state_rec: out NSR_ARRAY
state_reg_rec: in SRR_ARRAY
)
 overloaded for arry interface
  MONITOR_RISING_EDGES(
edge_index: natural
input_signal: std_logic
transition_state: STATE_INTEGER
signal next_state_rec: out NSR_ARRAY
state_reg_rec: in SRR_ARRAY
trigger_time: in time
)