Port BUSACCESS - GENERIC

Generic bus access

Stimulation

总线信号的激励通过 model access 执行,仅当该访问方式也支持激励时才可行。model access 的限制与说明同样适用于通用总线访问。

Restrictions:

  • 不支持激励输入信号。

  • 由 STI 文件中的 DataFileSegment 引用的 Trace 文件不会由 ecu.test 自动转换。

  • 用户需要自行检查所使用的 Trace 格式是否受该工具支持。

Specifics

With this port type you can read and manipulate bus quantities (frames and signals) that are represented in the model. The mapping for bus signals to model data is described in the test bench configuration. The corresponding syntax is described in the following section.

Port type BUSACCESS GENERIC

Bus port for access to the rest bus simulation of the environment model. The representation of signal/message names on model paths can be largely configured by means of path patterns. The representation of CRC and ALIVE signals is configured separately. CRC and ALIVE signals can be recognized by the prefixes “CRC” or “ALIV” in the signal names.

Path like properties might contain certain placeholders. Those will be automatically replaced when accessing bus signals. A placeholder always begins with the character “%” and is enclosed by parenthesis, like so: %(<placeholder>). The closing parenthesis has to be followed by a formatter.

Info

A valid expression could be e.g %(signal)s, where “signal” is a placeholder and “s” is a formatter.

Available placeholders

bus

Name of the bus

node

Name of the control unit

frame

Name of the message / frame

frameId

Numeric ID of the message / frame

CAN: CAN ID FlexRay: Slot ID

pdu

Name of the PDU / subframe

signal

Name of the signal

cycleRepetition

FlexRay only: The number of cycles after which a frame is sent again

baseCycle

FlexRay only: The first communication cycle in which a frame is sent

segmentType

FlexRay only: “Dynamic” if the current slot id is greater than the number of static slots, else “Static”

signalGroup

Name of the signalgroup

multiplexer

多路复用开关码(例如 _DP_m4),前提是该信号属于多路复用 PDU

Formatters

The placeholders can be formatted using the following formatting rules:

s

placeholder is just replaced, case sensitive spelling of value to be replaced remains unchanged

us

replaced value is completely converted into upper-case letters

ls

replaced value is completely converted into lower-case letters

d

replaced value is represented in decimal format

x

replaced value is represented in hex format with lower-case letters

X

replaced value is represented in hex format with upper-case letters

4x

replaced value is expanded to 4 digits with leading zeros (number of digits can be changed, and combination with X or d instead of x is also possible)

Marking parts of a path as optional

It is possible to mark certain parts of a path as optional. A part is optional if it:

  • is placed between squared brackets and

  • it contains at least one place holder

An optional part will be left out if any of the contained placeholders is evaluated to an empty string.

For example: A TX path has been configured as /can/[%(signalGroup)s/]%(signal)s/Value. Assuming a signal “A” belonging to signal group “sign_group”, manipulating it will result in the following model path: /can/sign_group/A/Value. The optional part is kept in the final path. But if the signal is not in a signal group, the path will result in /can/A/value.

Tx-Switch Path

The Tx-Switch path is used to de/-activate the manipulation of signals. The Switch path signal is set to the following values, to control the manipulation of the target signal:

  • 0: if the target signal is not manipulated

  • 1: if the target signal is written in Representation Physical conversion

  • 2: if the target signal is written in Representation Raw value

If Ignore missing *-Tx switch path is set, the Tx-Switch path may be non-existent. The target signal will still be written with the desired value.

Name

在以下情况下可用

默认值

有效值

Type

Description

总线标识符

string

Logical name of the bus system

Model port

string

Port ID (e.g. “MDL01”) of the model port via which the model access is to be performed. This property can remain empty if there is exactly one model port. If there is more than one model port, this property must be set.

Bus-DB

string

Bus-database (This bus-database is usually taken from the test configuration. Please note that the bus-database is not automatically transferred to the tool, but must be stored there manually.)

Bus path

‘masterappl/Model Root/userinterface_master/disp/io/sg_info’

string

Base path of the model variables for the bus signals and messages. The Rx and Tx path specifications refer to this base path.

ALIVE naming pattern

‘ALIV*’

string

Pattern for the recognition of ALIVE signals. ? stands for a single character, * for one or more characters.

CRC naming pattern

‘CRC*’

string

Pattern for the recognition of CRC signals. ? stands for a single character, * for one or more characters.

原始值到物理值的转换行为

‘error’

[‘error’, ‘identical’, ‘first’, ‘firstOrIdentical’]


显示值:

  • ‘error’: ‘not allowed’

  • ‘identical’: ‘identical’

  • ‘first’: ‘第一个转换函数’

  • ‘firstOrIdentical’:‘第一个转换函数或相同’

string

对没有指定转换规则的域中原始值进行转换时的行为。应根据模型如何表示没有物理含义的信号值来设置此选项。默认情况下不允许此类值。

选项 “identical” 直接将原始值视为物理值。

“first conversion function”会对原始值应用第一个已定义的转换函数,即使未针对该值定义该函数。

选项 “first conversion function or identical” 使用第一个转换函数(如果可用),若未定义转换函数则使用原始值。

Rx path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s/Out1’

string

Pattern of model path for signal reading

Tx path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s/const_const/Value’

string

Pattern of model path for signal manipulation

Tx-Switch path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s/const_switch/Value’

string

Pattern of model path to the switch for signal manipulation

CRC-Tx path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s_valid/const_const/Value’

string

Pattern of model path for manipulation of a CRC signal

CRC-Tx-switch path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s_valid/const_switch/Value’

string

Pattern of model path for enabling and disabling manipulation of a CRC signal

ALIVE-Tx path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s_valid/const_const/Value’

string

Pattern of model path for manipulation of an ALIVE signal

ALIVE-Tx-switch path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/%(signal)s_valid/const_switch/Value’

string

Pattern of model path for enabling and disabling manipulation of an ALIVE signal

Tx frame enable path

‘%(node)s/kommunikation/%(bus)s/%(frame)s/enable/const_const/Value’

string

Pattern of model path for enabling and disabling a frame

Ignore missing *-Tx switch path

☐

bool

If the *-Tx switch path is missing in the model, do not generate an error and restore the value of the *-Tx path to reset.

Restore behaviour

‘DEFAULT’

[‘DEFAULT’, ‘SWITCH_MODEL’]

string

If this property is set to DEFAULT, upon restoring a bus signal, both switch and const value are reset to their initial values. The setting SWITCH_MODEL however causes the switch to always be reset to “use the calculated value”. The const value is not changed.