Artwork showing MCU as device under test and Simulated SPI IC

Simulation of Integrated Circuits during Hardware-in-the-Loop (HIL) Testing

Low-Level-bus simulations for Hardware-in-the-Loop Testing

Discover miniHIL capabilities!

Integrated circuits combine ever-growing number of functions and are getting more complicated for programmers to handle. This results in a more pronounced need to test the software that interacts with them.

However, testing such systems is not an easy task. Even with a logic analyzer that supports protocols decoding, searching for errors in e.g. SPI or I2C data streams is tedious and not always possible. While manual tests are usually performed during initial bring-up and early software integration the correct functioning of the application, device drivers and the external chip is rarely automatically retested after software changes.

With the miniHIL these problems are solved by simulating critical parts of external components. This means that a test has full control over the simulated device’s registers and the general behavior. The miniHIL checks correctness of communication protocols and simulated registers’ values. Additionally, it can also deliberately introduce errors at any moment to check the tested system’s reaction. The results of the test are evaluated immediately and automatically – there is no more need to look into long streams of data.

Paired with the miniHILs continuous integration capabilities the whole interaction chain from the application code over the device drivers down to the hardware-software-integration on the MCU can be automatically tested after every code change. Once the tests are setup, newly introduced errors along the software stack are easily caught (regression testing).

ICSim1

I2C/SPI-Sensor-Simulation

What are the miniHIL’s capabilities in this area?

Slower devices, for example I2C, SENT or UART interfaces can be directly simulated with the miniHIL boards MCU.

For devices using very fast interfaces or random read write access to registers and devices which require instantaneous (sub µS) responses, the miniHIL’s FPGA extension board is more suitable. Devices using SPI commonly fall into this category.

Simulation of the DUTs environment gives you fine-grained control over the environment your software tests are executed in. Giving you the ability to create precise and reproducible tests which include device application software, device drivers, HAL and the MCU peripherals.

Real System To Test Environment

Examples for simulations successfully integrated with the miniHIL

FPGA based simulations

TLE9461ES (Automotive Power Management IC with CAN transceiver and diagnostic features)

  • SBC (System Basic Chip)
  • SPI control interface simulation
  • Simulation of control and error registers
  • Simulation of Failure Output (FO) logic
  • Error injection capabilities:
    • Setting and locking of error states (i.e. error state cannot be reset)
    • Injection of SPI bus timing error (e.g. data edge too close to clock edge)

MCP2518FD (External CAN FD controller with multiple queues)

  • Partial simulation of the chips SPI interface and internal registers
  • Error injection capabilities:
    • CRC errors in SPI communication
    • Timeout errors
    • SPI bus timing errors
  • Direct integration of the miniHILs CAN stack with the MCP2518FDs SPI interface
  • 20MHz SPI clock

Simulation of SPI interfaces of different integrated motor drivers such as DRV8311, and others

MCU based simulations

LSM6DSR IMU (Inertial Measurement Unit)

  • SPI interface simulation
    • Validation of configuration register writes
  • Streaming of recorded acceleration and gyroscope data in real time MC33797 (Squib driver)
  • SPI interface simulation to validate correct configuration register write and read back LC86L (UART GPS receiver)
  • Streaming of recorded GPS data in real time (synchronous with other test events and expected DUT behavior)
PROTOS miniHIL FPGA Adapter