  Connectivity and automation are increasingly getting importance in the
automotive industry, which is observing a radical change from vehicles driven
by humans to fully automated and remotely controlled ones. The test and
validation of all the related devices and applications is thus becoming a
crucial aspect; this is raising the interest on hardware-in-the-loop (HiL)
platforms which reduce the need for complicated field trials, thus limiting the
costs and delay added to the process. With reference to the test and validation
of vehicle-to-everything (V2X) communications aspects, and assuming either
sidelink LTE/5GV2X or IEEE 802.11p/bd technologies, in this work we focus on
the real-time HiL simulation of the information exchanged by one vehicle under
test and the surrounding, simulated, objects. Such exchange must be reproduced
in a time-efficient manner, with elaborations done fast enough to allow testing
the applications in real-time. More precisely, we discuss the simulation of
nonideal positioning and channel propagation taking into account current
impairments. We also provide details on optimization solutions that allowed us
to trade-off minor loss in accuracy with a significant reduction of the
computation time burden, reaching up to more than one order of magnitude speed
increase in our experiments.
