OpenXilEnv is a lightweight SiL/HiL environment. At the moment, OpenXilEnv focuses on SiL environments.
With a Software In the Loop system, it is possible to run and test embedded software without a target platform or compiler. XilEnv provides an environment to set up a SiL system on Windows or Linux hosts. It clearly separates its own components from the embedded software under test through a network layer. Each component can run in its own executable, providing memory protection between them.
Communication between the software under test, models, and XilEnv is done via sockets or (on Windows) named pipes / (on Linux) local sockets. These are used for:
- Signal transfers
- Virtual network (CAN and CAN FD) transfers
XilEnvGui provides a configurable graphical user interface based on Qt. It includes display/change widgets, oscilloscopes, calibration tools, sliders, knobs, and other interaction elements.
XilEnv (CLI) has no graphical user interface and can be used for automation without user interaction.
Main features:
- Supports current GCC compilers with DWARF debug information. Visual Studio compiler is supported but without debug information
- FMUs with FMI 2.0 interface are supported via ExtProc_FMU2Extract(.exe), ExtProc_FMU2Loader32(.exe), and ExtProc_FMU2Loader64(.exe)
- Partial FMI 3.0 support (additional datatypes only) via ExtProc_FMU3Extract(.exe), ExtProc_FMU3Loader32(.exe), and ExtProc_FMU3Loader64(.exe)
- Includes a small A2L parser for calibration
- Supports XCP over Ethernet for connection to a calibration system
- Multicore support with synchronization barriers
- Automatable via XilEnvRpc.dll/.so or the built-in script interpreter
- Supports 32- and 64-bit executables (mixed allowed). XilEnv itself must be 64-bit
- Time simulation with fixed, configurable period and 1 ns resolution
- Residual bus simulation for missing CAN (FD) members
- Recording and stimulation supported via text or MDF3 files
The DLL/shared library XilEnvExtProc64.dll/.so or XilEnvExtProc32.dll/.so provides the interface for the embedded test software or model. This DLL/shared library must be loaded dynamically. The main module XilEnvExtProcMain.c handles this automatically.
Interface functions are declared in XilEnvRtProc.h.
An example can be found in Samples/ExternalProcesses/ExtProc_Simple.
To use OpenXilEnv as a HiL system, a second Linux PC is required. Only SocketCAN FD interfaces are supported.
For <1 ms response times, install the RT-Preempt patch.
OpenXilEnv is split into:
- LinuxRemoteMasterCore.so – real-time (Linux with RT-Preempt)
- XilEnv executable – non–real-time (Windows or Linux)
Use a direct Ethernet connection between PCs.
If a model is needed, compile it for Linux and link with LinuxRemoteMasterCore.so.
If not, use LinuxRemoteMaster.out.
Ensure RemoteStartServer is installed and running on the Linux PC to allow remote execution.
OpenXilEnv is distributed with a python bindings wrapper that allows full control over a runninx openXilEnv instance via python.
The functional tests of openXilEnv are implemented in pytest using the openXilEnv python API and provide an example usage.
For a detailed description take a look at the openXilenv python API refrence.
OpenXilEnv provides functionality tests, that validate the openXilEnv installation using pytest.
The tests depend on the openXilEnv Installation path and the openXilEnv Source path. To make sure the paths are available, set the following variables
on windows
set OPENXILENV_INSTALLATION_PATH="%SystemDrive%\dev\tools"
set OPENXILENV_SOURCE_PATH="%SystemDrive%\dev\src"on linux
export OPENXILENV_SOURCE_PATH="$HOME/dev/src/openXilEnv"
export OPENXILENV_INSTALLATION_PATH="$HOME/dev/tools/openXilEnv"To run all tests, simply execute
pytest -vvThis project is part of the Eclipse Foundation and licensed under the Apache License 2.0.
Contributions are welcome! Please see the CONTRIBUTING.md file for details.
