Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

OpReflectiveMemory

Library

rtlab/Communication/SharedMemory

Block

The OpRFM block allows a user to implement transparent and automatic updates of remote shared memory areas between two machines.

OpRFM block

Mask

OpRFM Mask

The OpRFM block controls all the Reflective Memory System operations; it carries information on the type and the memory offest of data variables to be read or written.

Parameters

OpRFM block receives only one parameter which is the name of configuration file. This file should be saved in the same directory as the user’s model. The extention of the configuration file is not important; e.g., the user can create and save this file with the extension of “.txt” or “.opal”.

The configuration file is sensitive to its spacial format. More precisly, every space and line counts, and no empty line or extra space is allowed to be added. Moreover, the user should not remove any parameter of the configuration file.

The content of a configuration file of a simple OpRFM block that reads and writes an unsigned integer data is shown in Figure 3.

Figure 3: A Simple Configuration File

Within this file, there are only few parameters that should be changed based on the user’s preference.

These parameters are as follows:

nameeach OpRFM block should have a name. If the user prefers using several blocks of OpRFM to control a common reflective memory area, this name should be the same for all configuration files of those blocks. (EX:127.0.0.1:300/resources/root/data)
boardTypespecifies the type of the board used to implement the Reflective Memory. In OpRFM block, two reflective memory solutions are implemented. The user can determine one of these two methods based on the availability of the adapted; if “Dolphin” is chosen, the user should install the IXH610 Dolphin PCI Express adapter along with its driver on both of their machines. Alternatively, the user can choose “Vmic” adapter if the VMIC 5565 card is intalled in his machines. (EX: Vmic).
dolphinSwitchspecifies if a switch is used in the target configuration. Using a switch allows us to have a reflective memory space on more than two nodes. This option is effective only for “Dolphin” adapters. Its value can be either “yes” or “no” (EX:yes).
pciIndexSpecifies the PCI index of the card used to hold the Reflective Memory (EX: 0).
datas

specifies all characteristics of data variables to be read or written. For any data variable that the user wants to read or witte, a block of parameters (with the format of RFM::Data<dataType>) should be added whithin “datas”. As an example, in Figure 3, we have two RFM::Data<U32> parts, implying that we are about to read and write an unsigned integer variable at memory offset 0.

The important parameters of “datas” are as follows:

RFM::Data<dataType>accepted data types are: I8, U8, I16, U16, I32, U32, I64, U64, F32, F64, Integer, Natural, Address, and Boolean. Please note that “I” refers to “integer” and “U” refers to “unsigned integer”, and the number that come after the “I” or “U” indicates the number of bits that the data varable contains. (EX: U32)
offsetspecifies the offset of memory that the data variable is going to be read or written. Please note that if you want read or write the data consecutively in the memory, the gap between the offsets of two neighboring data variables should match the number of bytes that those data variables carry. For instance, if we want to write an F32 data at offset 0, the next available offset to read that data variable would be 4.
modeindicates whether the data variable is meant to be read or written. It can be either “r” for read mode or “w” for “write” mode. (EX: r)
nameeach data variable under “datas” should have a unique name. (EX: 127.0.0.1:300/resources/root/data_rfm 1)

Inputs

Depending on the format of the configuration file, the OpRFM block can have an input or not. For example, if “datas” contains any data variable in “w” mode, the OpRFM block will receive input. The number of inputs is equal to the total number of data variables in “w” mode.

Outputs

Depending on the format of the configuration file, the OpRFM block can have a output or not. For example, if “datas” contains any data variable in “r” mode, the OpRFM block will have output. The number of outputs is equal to the total number of data variables in “r” mode.

Characteristics and Limitations

As explained before, there are two options available for the implementation of the Reflective Memory: 1) Dolphin, and 2) Vmic.

These boards have their own specifications and limitations:

Dolphin Adapter

to use Dolphin IXH610 adapter, the user should have at least two computational subsystems assigned into two different machines in his model. Even if we want to wite and read in the same machine, it is necessary to have another subsystem containing a OpRFM block assigned to another machine. Please check if the Dolphin board and its driver are correctlly installed on both machines before running your model.

Currently, the maximum total memory size that Dolphin boards can reflect is slightly less than 128 MegaBytes.

Vmic Adpterunlike Dolphin, the user is allowed to use a VMIC 5565 board in a single machine, and therefore reads and writes on the same machine (in this case the memory is not reflective on a remote machine).


Direct Feedthrough

N/A

Discrete sample time

Yes

XHP support

Yes

Work offline

No

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter