The READ_SHARED_REGISTER procedure call allows one or more application modules to read registered data from a shared_register inside the framework module. In order to read from a shared register, an application module identifies the desired register by its REGISTER_ID, which is the first parameter of the READ_SHARED_REGISTER procedure call. Assuming some data has written data to the shared_register, that data is available to be read by any application module that references the REGISTER_ID on state_reg_rec(M).shared_reg after one clock cycle. Thus, the READ_SHARED_REGISTER and WRITE_SHARED_REGISTER API calls implement a multipoint control path mechanism, which allow multiple application modules to read and write to same the shared register simultaneously.

A single application module has the capability of utilizing any number of shared registers. The typical use case for a single application module using multiple shared registers would be to perform data multiplexing. Convenient data multiplexing can be done by making multiple WRITE_SHARED_REGISTER procedure calls on different resource indexes, (M), which correspond to a logical ordering of REGISTER_IDs. The WRITE_SHARED_REGISTER procedure calls are used buffer each piece of data on a different shared register. Subsequently, that data can be selected and read on state_reg_rec(M).shared_reg by using the READ_SHARED_REGISTER procedure call and a counter to cycle through the available REGISTER_IDs.
The REGISTER_ID is typically integer valued. This means that the shared register REGISTER_ID can be identified by either a small integer literal, 0, 1, 2, ect., or a module resource value. Using a REGISTER_ID to identify a shared register allows data to be read from any shared register within the framework module regardless of the application module or resource index the READ_SHARED_REGISTER procedure call is made from.
Consider the following procedure calls:
The WRITE_SHARE_REGISTER procedure call is used to buffer the values of "001", "010", and "100" on shared registers on resource 0, 1, and 2 respectively with corresponding module resource values for REGISTER_ID's. These REGISTER_ID's are set up to be easily iterated through using a chained counter on resource 3 that increments every 20us from values 0, 1, and 2 then repeats. The READ_SHARED_REGISTER procedure call uses this counter value as an offset to the module index to cycle through the values of "001", "010", and "100" on state_reg_rec(3).shared_reg in 20us intervals by accessing the shared registers on resource 0, 1, and 2.
READ_SHARED_REGISTER( this_module,next_state_rec, state_reg_rec );
READ_SHARED_REGISTER( some_module_tb, next_state_rec, state_reg_rec);
READ_SHARED_REGISTER( some_module, next_state_rec, state_reg_rec );
| [in] | REGISTER_ID | [1] simple index number starting from 0 |
| [out] | next_state_rec | [2] |
| [in] | state_reg_rec | [3] |
| [in] | state_reg_rec(M).shared_reg | : [1] [std_logic_vector]shared control data returned from the framework |
Voice and Hotkey Commands:
| [in] | REGISTER_ID | [1] [integer] "index <integer>" |
| [out] | next_state_rec | [2] |
| [in] | state_reg_rec | [3] |
| [in] | state_reg_rec(M).shared_reg | : [1] [std_logic_vector] "shared register" |
SHARED_REGISTER( example_module, input_vector, next_state_rec, state_reg_rec, 10 );
| Voice Command | HotKey Sequence |
|---|---|
| "read shared register" | rsr |
| "index some_module" | index some_module |
Procedures | |
| READ_SHARED_REGISTER( REGISTER_ID: in integer signal next_state_rec: out NSR state_reg_rec: in SRR ) | |
| READ_SHARED_REGISTER( REGISTER_ID: in integer signal next_state_rec: out NSR_ARRAY state_reg_rec: in SRR_ARRAY ) | |