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.

OpSharedMemoryCtrl

Page Content

Library

rtlab/Communication/SharedMemory

Block

The OpSharedMemoryCtrl block allows a user to open a shared memory in memory or on a physical address.

OpSharedMemoryCtrl block

Mask

OpSharedMemoryCtrl mask.

Description

The OpSharedMemoryCtrl is used in a Master or Slave subsystem to open shared memory between physical memory or processes; the OpSharedMemoryRead and OpSharedMemoryWrite blocks allow users to communicate with the shared memory.

Parameters

Several parameters will become available depending on the shared memory type or the medium type parameters.

Controller ID

Specifies the controller ID that will be associated with each read and write blocks.

Shared memory base address

Specifies the memory base address of a physical card (ISA, PCI or Internal onboard device). The shared memory-type parameter must be set to Physical to activate this option. The address must be in hexadecimal format (Ex: 0xd4000).

Shared memory range

Specifies the memory range (size) that will be used to allocate memory on the computer. The range must be in hexadecimal format (Ex: 0x1000). This range is limited to the value 0x400000 for Linux operating system.

Shared memory offset

Number of address locations added to the base address to get the actual starting memory address control by the block. The offset must be in hexadecimal format (Ex: 0x100).

Shared memory type

When using a physical device such as a physical card (ISA, PCI, or Internal onboard device ) select the Physical option. This option is currently used for dual port memory device and can also be used to communicate with any card. When communicating with other processes on the computer, choose the Custom option. This option allows the user to communicate between different processes that use shared memory. When using the Custom option, specify a Shared memory object name to refer to the Shared Memory. If the object is not yet created, set the Create Object option.

Create object

This option allows the user to specify whether this controller will be the first to create the object, or only use it. This option should not be selected, for example, if you would like to communicate with another process that has already created its shared memory. This option is not available when using physical devices.

Shared memory object name

Specifies the name of the Shared memory object to be created, or the name of the object with which to communicate (Ex: test). This option is not available if you are using physical devices.

Memory byte ordering

Specifies whether the compatibility with the physical device will be little-endian or Big-endian. The x86 architecture is little-endian.

For example, the hexadecimal number 0x12345678 is stored in memory using little-endian as:

Medium type

Selects ISA, PCI, or Internal device. When using the PCI option, specify the Vendor ID, Device ID, index of the PCI card, and the base address register with which to communicate. The Internal option allows the user to communicate with on board devices. This option is not available if you have selected the Custom option.

PCI Vendor ID

Specifies the vendor ID of the PCI Card used to hold the Shared Memory (Ex: 0x8086). On OPAL-RTLinux operating system, use the command 'lspci -n' to identify the vendor id.

PCI Device ID

Specifies the device ID of the PCI Card used to hold the Shared Memory (Ex: 0x7146). On OPAL-RTLinux operating system, use the command 'lspci -n' to identify the device id.

PCI Index

Specifies the PCI index of the card used to hold the Shared Memory (EX: 0).

PCI Base Address Register

Specifies the index of the PCI base address register to be used (EX: 0). This register holds the physical address of the corresponding Card's I/O Memory.

Note: PCI options are only valid when using a PCI medium type

Inputs

This block has no inputs.

Outputs

This block has no outputs.

Characteristics and Limitations

If this block is used with one VMIC 5565 card, the DMA transfer is used except if the environment variable ‘SHARE_MEM_NO_DMA’ is set.

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