メインコンテンツまでスキップ

Configuring the Machine

What You Will Do​

In this chapter you fill real values into the machine Ecu that you saved with default values in Creating the Project and the HPC Machine. On the MACHINE tab of the Machine Configuration dialog you set the OS to POSIX and grow the cores to four, Core0 through Core3. On the FUNCTION GROUP tab you only check the states of the function group MachineFG, and on the MODULE tab you enter the ECU ID of Log and Trace and the Max Action List Duration of State Management.

When you finish this chapter, the machine file design/Module/Machine/Ecu.machine.io.model is updated, the validation error constr_10641 left over from chapter 1 disappears, and the VALIDATION panel shows No validation issues..

Before You Begin​

  • Start from the state at the end of Creating the Project and the HPC Machine. The title bar reads PAIO [AADesign], the VFB root canvas holds the composition HPC [Ecu], and the VALIDATION panel shows exactly one finding, constr_10641.
  • You may close the editor tabs left open from chapter 1. This chapter starts by opening VFB afresh from DESIGN in the EDITOR view.

You type only three values in this chapter. For the cores you only press a button three times; the names and IDs are filled in automatically.

TabItemValue
MACHINEOSPOSIX
MACHINEPROCESSORCPU (default, leave as is)
MACHINECORE table+ button three times → Core1 / 1, Core2 / 2, Core3 / 3 added automatically
FUNCTION GROUPMachineFGDo not change (check only)
MODULE › Log and TraceECU IDECU1
MODULE › State Management › ACTION ITEMSMAX ACTION LIST DURATION1000 (unit s)

Note. An input field in the dialog commits its value only when you leave the field. In this chapter you press the Tab key after typing to commit. If OS breaks the AUTOSAR naming rule (a letter first, then only letters, digits and _), the value is not committed and the field reverts to its previous value.

Checking the Starting State​

  1. Look at the V icon in the footer at the bottom of the window, the fifth icon from the left. It already carries a red badge 1, and its tooltip reads Validation: 1 error(s), 0 warning(s), 0 info(s).

  2. If the VALIDATION panel is closed, click the V icon to open it.

    Validation panel showing one error, constr_10641

    Figure 2-1. The VALIDATION panel at the start of this chapter. The header badge is 1, and ① there is a single row, constr_10641.

The single row of the panel is as follows. The ELEMENT TYPE and DESCRIPTION columns are narrow and show only up to …Instantiati… and …missing maxAction… respectively, but the full texts are below.

ELEMENT TYPENAMEDESCRIPTIONCONSTR
StateManagementModuleInstantiationSMState-Management module "SM" of machine "Ecu" is missing maxActionListDuration.constr_10641

The severity is error and there is exactly one finding. It means that the State Management module SM, which the machine dialog inserts by default, has no Max Action List Duration. The last input of this chapter resolves it.

Opening the Dialog​

  1. Click the V icon in the footer to close the VALIDATION panel. If the tab AADesign:VFB is already open, click the × on the tab to close it.

  2. In the EDITOR view, click VFB under DESIGN. The tab AADesign:VFB opens, and the root canvas (System at the top left) shows the composition HPC [Ecu].

  3. Click the blue three-bar machine icon at the right of the composition header.

    HPC [Ecu] and the machine icon on the VFB root canvas

    Figure 2-2. The VFB editor freshly opened from DESIGN in the EDITOR view. ① The composition HPC [Ecu], ② the machine icon at the right of the header. The V icon in the footer shows the badge 1.

  4. The dialog titled Machine Configuration [HPC] opens with the MACHINE tab selected. The name in brackets is the composition name, and the machine box on the center canvas is labeled Ecu.

Note. In a VFB tab freshly opened from the EDITOR view, clicking the machine icon opens the dialog right away. There is no field for the machine name. The machine name and the machine file name follow the name of the HPC node Ecu in the System editor as it is.

MACHINE Tab — OS and Cores​

Entering POSIX as the OS​

  1. Click the OS field in the MACHINE panel on the right. It is empty and shows the hint Name (letter, then A-Z/0-9/_) and the red message Name is required.

  2. Type POSIX and press the Tab key. The red message disappears.

  3. Confirm that the PROCESSOR field in the PROCESSOR accordion reads CPU. It is the default and you do not change it.

    MACHINE tab with POSIX entered as the OS

    Figure 2-3. The MACHINE tab. ① OS = POSIX, ② PROCESSOR = CPU, ③ the CORE / CORE ID table header with the + button at its right end. The table still has a single row, Core0 / 0. TRUSTED PLATFORM is NO SUPPORT, DESCRIPTION is empty, and REFERENCED HPC reads HPC Ecu.

Caution. When you press Tab in the OS field, keyboard focus moves to the STRICT button of TRUSTED PLATFORM and an orange outline appears. The selection stays at NO SUPPORT. Do not press Space or Enter in that state; move on to the next step.

Adding Cores​

  1. Click the + button (tooltip Add Core) at the right end of the CORE / CORE ID table header.

  2. The row Core1 / 1 is added to the table automatically. You do not need to type a name or an ID.

    Table with Core1 added after one press of the + button

    Figure 2-4. The CORE table after one press of the + button. ① The + button (Add Core), ② the new row Core1 / 1.

  3. Click the same + button two more times. Core2 / 2 and Core3 / 3 are added in turn.

    CORE table with four cores

    Figure 2-5. The CORE table with all four cores. ① The four rows Core0 / 0, Core1 / 1, Core2 / 2, Core3 / 3. REFERENCED HPC is pushed below the table and only partly visible.

A new core is created with the name Core<N> and the ID N, where N is the largest existing core ID plus 1. You can click a cell to edit the name or the ID and remove a row with the × at its right, but this tutorial does not use either.

FUNCTION GROUP Tab — Checking MachineFG​

You do not change anything on this tab. You only confirm that MachineFG, which later chapters use to bind processes to function group states, is still at its defaults.

  1. Click the FUNCTION GROUP tab.

  2. Confirm that the FUNCTION GROUPS list on the left holds a single entry, MachineFG, and that it is selected.

    MachineFG on the FUNCTION GROUP tab

    Figure 2-6. The FUNCTION GROUP tab. ① MachineFG in the FUNCTION GROUPS list, ② GROUP NAME = MachineState, ③ INITIAL MODE = Off, ④ the STATE MACHINE diagram. The initial-state marker (a dot with an arrow) points at Off.

The values in the center CONFIGURATION panel are as follows.

ItemValue
NAMEMachineFG
DESCRIPTIONempty
FUNCTION GROUP › GROUP NAMEMachineState
FUNCTION GROUP › INITIAL MODEOff
MODE DECLARATION table (NAME / VALUE / DESCRIPTION)five rows Off, Startup, Shutdown, Restart, Verify (VALUE and DESCRIPTION are all empty)

The STATE MACHINE diagram on the right shows five state boxes (Off, Shutdown, Verify, Restart, Startup) and the transition arrows. There are eight transitions: Off→Startup, Startup→Shutdown, Startup→Restart, Startup→Verify, Startup→Off, Shutdown→Off, Restart→Off, Verify→Off.

MODULE Tab — ECU ID of Log and Trace​

  1. Click the MODULE tab. The first entry of the MODULES list on the left, Log and Trace, is selected, and the center shows a single sub-tab, DLT, with the sections DLT ECU and DLT APPLICATION below it.

  2. Click the ECU ID field in the DLT ECU section. It is empty and shows the hint e.g. ECU1.

  3. Type ECU1 and press the Tab key.

    ECU1 entered as the ECU ID of the Log and Trace module

    Figure 2-7. Log and Trace on the MODULE tab. ① Log and Trace in the MODULES list, ② ECU ID = ECU1. DLT APPLICATION reads No processes configured and DLT HIERARCHY on the right reads No DLT applications. There are no processes yet, so this is expected.

In the ARXML export this value becomes the ECU-ID of the DLT ECU element /DLT/Ecu/Ecu. The module itself is exported under the dialog's default name LOG.

MODULE Tab — Max Action List Duration of State Management​

  1. In the MODULES list, click State Management. The sub-tabs NOTIFICATIONS, REQUESTS and ACTION ITEMS sit at the top of the center panel, and NOTIFICATIONS is shown first.

  2. Click the ACTION ITEMS sub-tab.

    ACTION ITEMS sub-tab of State Management

    Figure 2-8. The ACTION ITEMS sub-tab of the State Management module. ① State Management in the MODULES list, ② the ACTION ITEMS sub-tab, ③ the empty MAX ACTION LIST DURATION field (hint Time Value (≥0), unit s on the right). Below, ACTION LISTS reads No StateMachine states available. Add a StateMachine in the Notifications sub-tab first., NM HANDLE FUNCTION GROUP STATES reads No NM handle function group state., and ACTION SEQUENCE on the right reads Select an action list to view its sequence..

  3. Type 1000 into the MAX ACTION LIST DURATION field at the top and press the Tab key. Leave the unit on the right at s.

    1000 entered as the MAX ACTION LIST DURATION

    Figure 2-9. The ACTION ITEMS sub-tab after entering the value. ① MAX ACTION LIST DURATION = 1000, unit s. The other messages are unchanged.

ACTION LISTS, NM HANDLE FUNCTION GROUP STATES and ACTION SEQUENCE are not used in this tutorial, so leave them as they are. The unit choices are ns, us, ms and s; keep s.

Saving and Closing​

  1. Press Ctrl+S inside the dialog. Any tab will do. The machine file design/Module/Machine/Ecu.machine.io.model is updated.
  2. Click the Close button at the bottom right.
  3. Click PROJECT › Save All.

Caution. Close alone does not save the machine file. Always press Ctrl+S inside the dialog before clicking Close. If a save prompt appears when you click Close, click Save.

Viewing the Validation Result​

  1. Look at the V icon in the footer. The red badge 1 is gone.

  2. Look at the VALIDATION panel. If it is closed, click the V icon in the footer.

    Validation panel showing No validation issues.

    Figure 2-10. The VALIDATION panel after saving. The header has no badge and the body is a single line, No validation issues..

constr_10641 is gone. Each later chapter, followed as designed, ends in this state too. Some of them show findings for a while as you edit, and those chapters say when.

Note. The badge on the V icon disappears when the count drops to zero, but the tooltip of the V icon keeps the last count, Validation: 1 error(s), 0 warning(s), 0 info(s). The VALIDATION panel shows the current result.

Why Is It Designed This Way?​

  • The OS name is POSIX. It becomes the name of the OS-MODULE-INSTANTIATION in the exported ARXML. The value is stored as a property of the machine on the MACHINE tab; no OS module entry is added to the module list on the MODULE tab.
  • There are four cores, Core0 through Core3, with IDs 0 through 3. The + button assigns the names and IDs automatically, so you never have to line them up by hand. The processor name is the default CPU.
  • ECU1 is the identifier of the DLT ECU. In Logging and DLT, the DLT application of each Adaptive Application is gathered under this ECU.
  • Max Action List Duration is a value that PAIO validation requires. Without it, the State Management module SM that the dialog inserts by default raises constr_10641. The value is not used elsewhere in this design, so any sane value such as 1000 is fine.
  • MachineFG is used at its defaults. In Executables and Processes, this function group appears as a candidate when you bind a process to a state of MachineFG such as Startup. The export carries Ecu_FunctionGroup/MachineFG together with the eight transitions.
  • There is no field for the machine name. The machine name and the machine file name follow the name of the node Ecu in the System editor. The MACHINE tab likewise has no field for admin data such as WAIT-FOR-SHUTDOWN, and the Communication Management module offers only the sub-tabs ACCESS CONTROL (three TRUE / FALSE switches, GRANTS and REMOTE SUBJECTS) and IPC, so timeout-style parameters cannot be entered. This chapter does not open that module.

Check Your Work​

  • On the MACHINE tab of the Machine Configuration [HPC] dialog, OS is POSIX and the red Name is required message is gone.
  • PROCESSOR is CPU, and the CORE table has the four rows Core0 / 0, Core1 / 1, Core2 / 2, Core3 / 3.
  • TRUSTED PLATFORM is NO SUPPORT and REFERENCED HPC reads HPC Ecu.
  • The FUNCTION GROUP tab holds a single MachineFG with GROUP NAME MachineState, INITIAL MODE Off, and the mode declarations Off, Startup, Shutdown, Restart, Verify.
  • ECU ID under MODULE › Log and Trace is ECU1.
  • MAX ACTION LIST DURATION under MODULE › State Management › ACTION ITEMS is 1000 with unit s.
  • After PROJECT › Save All, no tab carries a modified marker.
  • The VALIDATION panel shows No validation issues. and the header has no badge.

Next Step​

In Topology — Ethernet Connector and Endpoints you return to the System editor and create the Ethernet connector and the network endpoints on the node Ecu.