Memory

I/O points may be mapped to shared memory regions. Each memory “device” has an instance of the memin and memout I/O tasks. Multiple regions of different kinds can be defined in each “device”.

memory.png 

Buttons

Expand All expandall00049.png

Expands the hierarchy tree showing board configuration.

Collapse All collapseall00050.png

Collapses the hierarchy tree showing the board configuration to show only the channel nodes.

New Fieldnew_field.png

Adds a field to the selected shared memory region.

New Regionnew_region.png

Adds a shared memory region definition.

Deletedelete00052.png

Deletes the selected node and everything, including mappings, below it. The top level nodes cannot be deleted.

Regions

To configure a new shared memory region, click on the New Region button. When a region is selected, one of the settings dialogs below appears below the mapping table. Each dialog has the following settings:

Region Name

Unique name of the region.

RegionType

Type of shared memory region

IPC (shmget)

 

POSIX (shm_open)

 

VMIC 5565 Reflective Memory

Only one region specification is supported for a VMIC 5565 Reflective Memory card.

SCRAMNet SC 150

 

SCRAMNet GT 200

Only one region specification is supported for a SCRAMNet GT 200 Memory card.

Below those settings are settings specific to the region type.

IPC (shmget)

System V shared memory. The memory region must already exist in order to be used by SIMulation Workbench. SimWB will not create the region and will fail to initialize if the region does not already exist. These regions are assumed to be interfaces into other applications, so those applications are responsible for creating them.

memory_ipc.png 

IPC ID (key_t):

Shared memory key. To calculate the key instead of giving it directly, clear this field to enable the following two fields to provide the path name and project number properties to the ftok() function.

ftok() Path Name

Path to an existing file used by ftok() to calculate the IPC ID.

Project Number

Project number used by ftok() to calculate the IPC ID.

POSIX (shm_open)

POSIX shared memory segment. The memory region must already exist in order to be used by SIMulation Workbench. SimWB will not create the region and will fail to initialize if the region does not already exist. These regions are assumed to be interfaces into other applications, so those applications are responsible for creating them.

memory_posix.png 

Device Name (/dev/shm)

Path to an entry in the /dev/shm file system that will be passed to the shm_open() call.

VMIC 5565 Reflective Memory

Physical device that replicates its contents to other nodes connected to it.

Reference Information

I/O Card Model Number

CS-VMIPCI-5565-xxx.

I/O Driver Model Number

WCS-VMIPCI-5565

I/O Module License:

ICS-SWB-1223

Reference Information

I/O Card Model Number

CS-GE-PCI-5565-x.

I/O Driver Model Number

WCS-GE-PCI-5565

I/O Module License:

ICS-SWB-1223

memory_vmic_5565.png 

# of Pages to Map

Number of 4096-byte pages to access on the board.

SCRAMNet SC 150

Physical device that replicates its contents to other boards connected to it. There are no additional configuration parameters associated with this board. The I/O tasks will map the entire board memory.

Reference Information

I/O Card Model Number

CS-SYS-DPCIG0xM-20, CS-SYS-DPMC0xM-20.

I/O Driver Model Number

N/A

I/O Module License:

ICS-SWB-1223

memory_scramnet_sc_150.png 

SCRAMNet GT 200

Physical device that replicates its contents to other boards connected to it. There are no additional configuration parameters associated with this board. The I/O tasks will map the entire board memory.

Reference Information

I/O Card Model Number

CS-SYS-GPCI-20.

I/O Driver Model Number

WCS-SYS-GPCI

I/O Module License:

ICS-SWB-1223

memory_scramnet_gt_200.png 

Fields

new_field.pngTo create a new field, select a memory region and click on the New Field button.

memory_fields.png 

I/O points are mapped to specific fields of messages. All fields are specified with a byte offset into the shared memory region. Integer types can have an optional bit offset and size to specify bit field with the integer at that byte offset.

Single-bit integer fields can only be mapped to digital points. All other fields can only be mapped to analog points.

Raw Type

Specifies how to interpret the raw bits of the message field.

char

One-byte integer field.

short

Two-byte integer field.

int

Four-byte integer field.

long long

Eight-byte integer field.

float

Four-byte floating point field.

double

Eight-byte floating point field.

string

Fixed-length string field. String length is set to the length of the default value of mapped RTDB variable.

Byte (offset)

Field’s offset in the shared memory region in bytes.

Bit (offset:size)

Bit offset and size of a bit field within an integer. Leave blank to specify the entire integer. Bits are numbered from the high order bit of the 1-, 2-, 4-, or 8-byte block of the selected raw integer type. Which byte this bit is in is determined by the Big Endian setting. The offset is measured from the high order bit of the block to the high order bit of the field.

Big Endian

Interprets values as most significant byte first. This is the reverse of the default way data is handled on Intel x86 platforms.

To map a field to an I/O point, select a field on the left side of the I/O Mappings form, then click on a check box for an I/O point on the right side of the form. See I/O Mappings... for details.

Mapping Table

Configuration Column

Configuration tree.

Mapped Point(s) Column

I/O point(s) a field is mapped to.

To map a field to a channel, select a field on the left side of the I/O Mappings form, then click on a check box for an I/O point on the right side of the form. See I/O Mappings... for details.