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.
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:
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.
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!