Hybrid application on FPGA: the WebApp power


The time to market in the business is very important: you need to release a product or a service in the shortest possible time. With the new technology of the FPGA, based on MPSoC for edge applications, it is possible to create and compile a hybrid application on the FPGA system and use it as a common web application.

The best application of Hybrid technology is on HMI solutions, because you can create an HMI based on common web technologies (HTML, CSS, Javascript, etc) and port it on different platform, with a small effort for the porting. In addition, the HMI will be responsive and will support any common gesture like swipe, scroll, etc.

How is it possible that? Let’s find out together!

What is an Hybrid application

A Hybrid Application is a software application that combines 2 components: a native container, that consists of a system wrapper for low-level functionalities, and a webview, like a browser, that will render the data that programmers want to show. You can see a hybrid application like a machine that is composed by a browser, like Chromium, that interacts directly with the devices of the real machine and show the rendered interface based on a webview (HTML, CSS).

Due to the fact that is a “real” software (not only a way to visualize some information, like a website), this kind of application can also communicate with other applications with any inter-process communication methods (IPC).

A hybrid application approach can be schematize like below:

Hybrid App Schema

Why Hybrid applications are important?

First of all, if you decide to develop a hybrid application, you only need to know 2 things: a good framework that can compile your application (like Electron, Ionic, etc), and a solid knowledge of web design and web development

In particular, if you are familiar with web development, you know that there are so many things ready and consistent. There are many sites that give you freely some graphical templates, HTML/CSS codes, Javascript codes (like this: https://themeforest.net/ )… well, like a piece of cake. So, no embedded programming skills are required. This fact is very eloquent because if you need to build a graphical application, you don’t need to know how to program in OpenGL or Qt5, or other types of frameworks that require big expertise on the native platform that you are building for. And you know, this is very good news!

Another important fact is that you can create software that is very easy to port on a different platform. In fact, due to the fact that is like a webview application, you just need to be sure that a common browser, like chromium, is supported for your platform. If the browser is not supported, you need to recompile it, but your application remains unchanged.

At last, but not least, a hybrid application is cheaper and faster (for the development) than a common native application. Need I say more?

With the diagram below, I will show you the most important fact of Hybrid application: it merges the capabilities of a native application and the multiplatform of the web application.

A possible use-case: Games on FPGA

Ok, so take a look at our favourite FPGA architecture: the Zynq Ultrascale+ from Xilinx, in particular the MPSoC. This architecture has an important part: a Mali-400 GPU. This GPU supports OpenGL applications, so it can support the Chromium browser.

Let’s take a look at the Zynq Ultrascale+ architecture:

It is important to know that there are a multi-core processor and a GPU, also we can use the FPGA part for complex computations of the final application or for the real-time data acquisition from the peripherals.

There are some platforms that we have tested for this kind of application:

  • ZCU104 from Xilinx
  • Ultra96v2 from AVNET
  • CorazonAI from iWave
  • KRIA SOM KV260 from Xilinx

in every platform, the performances are amazing:  you can compile directly on the platform (after a custom petalinux build) a full hybrid application that renders a webview and you can interact with it without down frames.

So, do the fact that we are nostalgic nerd guys, we have tried to port on those FPGA platforms some old games, that we had previously ported on a webview thanks to the DosBox project. The performances are very impressive, the colors and the sounds from the 90′ are fantastic!

Here below there are some screenshot of the games that run on the FPGA described before:

A new MuseBox Frontend

So, we cannot forget about our product MuseBox. We have worked hard for supporting the communication between MuseBox for Machine Learning task on FPGA and HMI solution based on a Hybrid Application. Due to the fact that we have also a product that generates the artificial environment in the 3D world, we have created a flow for a compilation of a full hybrid application with the famous game engine Unity3D.

Are you curious? We will present it in the next episode!