The Art of Optimization

Over the past 20 years, the consumer IT market has accustomed users, experts or not, and developers, to neglect one aspect of programming, code optimization. Not enough RAM? Just buy another one. Is the data rate not enough? Just update the CPU. In this way, the rapid obsolescence of components pushed the market innovation to improve that type of performance. On the other hand, the firmware developer struggling with micro-controllers has always had to deal with the few kb of Ram available, small flashes, and limited clock frequencies. The micro-controller technology has looked at another type of innovation, the reduction of power consumption and greater integration to reduce the footprint on boards.

Today things are changing, micro-controllers and micro-processors are reaching a meeting point, the requirements of some embedded systems leave two possible alternatives open for the same performance: the use of latest-generation micro-controllers like some ARM Cortex M-7 models clocked for example at 300MHz with an RTOS operating system, or low-power micro-processors with a light Linux. The designer’s skills must adapt, and must include digital electronic basic design ability, firmware development and even software development. The ability to develop on Linux, also in the kernel space, and to configure a distribution on the chosen target allow the designer to evaluate the best architectural choice for the goal to be achieved through a weighted cost / time analysis both of development and production. The micro / rtos choice generally allows you to have clear the maximum achievable performance of the architecture, instead the use of a processor with Linux leaves some uncertainty. The optimization of the code allows in the first case to reach the maximum available performance, in the second to overcome the uncertainties.

As Cognimade we can say that we can adapt to any solution, to be able to choose the best architecture thanks to the experience gained on different platforms and technologies, and to have overcome obstacles encountered in embedded development on micro-processor systems with the optimization of the code typical of the firmware development. A recent success story has seen us achieve performances at the limit of the technology in a system based on a re-programmable SoC with a quad-core ARM Cortex A-53 and a integrated FPGA. The code optimization, mandatory in the FPGA development phase, has also proved to be successful in the development of the linux software running on the customized Yocto distribution.