COMPUTER-IMPLEMENTED METHOD AND SYSTEM FOR DYNAMICALLY EXECUTING AN APPLICATION PROGRAM BY A PLATFORM
Patent Information
- Application Number
- DE502021008167
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-08-26
- Filing Date
- 2021-08-11
- Publication Date
- 2025-08-14
- Estimated Expiration
- 2041-08-11
AI Technical Summary
Existing methods for developing and deploying application programs on platforms with FPGAs are inflexible, require separate packages for different hardware, and lack automated updates, especially for hardware-accelerated logic, which is not compatible with modern agile software delivery processes.
A method and system that dynamically switch between execution and programming modes to load and execute application programs on programmable logic, allowing flexible reconfiguration based on predetermined criteria, such as resource utilization, and enabling seamless deployment across platforms with or without FPGAs.
This approach enhances flexibility and efficiency by optimizing resource utilization and performance, reducing development and maintenance efforts, and supporting secure, automated updates for hardware-accelerated logic.
Description
[0001] The invention relates to a computer-implemented method and a system for dynamically executing at least one application program by a platform having a processor with a program memory and programmable logic, wherein the processor and the programmable logic support a programming mode and an execution mode, and in the programming mode, at least one first application program with at least one first module is loaded and programmed from an application database into the program memory and / or into the programmable logic in an executable manner as at least one first program code, and in the execution mode, the at least one first program code is executed.
[0002] Programmable logic devices (FPGAs) enable the implementation of hardware-accelerated application logic. However, applications currently must be tailored to a specific FPGA hardware platform.
[0003] Updating the hardware-accelerated application logic at runtime is not possible or can only be done manually.
[0004] Application developers also cannot develop a single application package that works across a range of platforms, including platforms without FPGAs, such as in the cloud, where the lack of hardware acceleration can be compensated for by running multiple application instances in parallel.
[0005] These limitations no longer meet the increasing demands of IT / OT processes for rapid and flexible delivery of software components required by the introduction of modern agile software delivery processes, i.e. DevOps.
[0006] Most state-of-the-art FPGAs are configured at hardware boot time. This requires creating a boot image with a configuration bitstream for the FPGA and rebooting the hardware to load the new image.
[0007] Modern FPGAs support dynamic partial reconfiguration of the programmable logic on the FPGA. This allows a portion of the programmable logic to be reconfigured at runtime.
[0008] This feature is used either at development time to partially reconfigure the FPGA using development tools, provided the FPGA host or device is directly connected to the development / debug interface such as USB, or during operation using complex host programming interfaces.
[0009] For applications that need to run on different platforms, the established approach is to create two different application packages.
[0010] One package version supports general-purpose CPUs and another package version supports FPGA-accelerated logic for a specific hardware platform.
[0011] This process has several disadvantages. Creating two separate application packages requires different processes and development steps, often involving manual steps.
[0012] The packages are then deployed separately to the respective target platforms depending on the hardware capabilities of each platform.
[0013] This increases the development and maintenance effort for these separate packages and leads to longer deployment times due to the manual steps.
[0014] To support secure updates in the execution procedure, the application logic must be updated at device runtime. While this can be achieved for software-based microservices, it is currently not fully automated for microservices with hardware-accelerated application logic.
[0015] Several existing publications have focused on the concept of partial reconfiguration of FPGAs, which forms the basis for this invention.
[0016] In "A Cloud-Scale Acceleration Architecture", Adrian M. Caulfield et al., 2016 49th Annual IEEE / ACM International Symposium on Microarchitecture (MICRO), the authors describe the use of reconfigurable logic to accelerate both network-level functions and application logic using reconfigurable FPGAs, as well as to realize direct FPGA-to-FPGA network communication.
[0017] Furthermore, the concept of partial reconfiguration of FPGAs is an established technique that has been described in various publications, e.g., "Modular dynamic reconfiguration in Virtex FPGAs", P. Sedcole, B. Blodget, T. Becker, J. Anderson, P. Lysaght, IEE Proceedings-Computers and Digital Techniques, Volume 153, Issue 3, "Incremental reconfiguration for pipelined applications", H. Schmit, Proceedings, The 5th Annual IEEE Symposium on Field-Programmable Custom Computing Machines Cat. No. 97TB100186, or "Dynamic hardware plugins in an FPGA with partial run-time reconfiguration", Edson L. Horta, John W. Lockwood, David E. Taylor, David Parlour, DAC '02: Proceedings of the 39th annual Design Automation Conference, June 2002, p. 343-348.
[0018] In "An Efficient Algorithm for Online Management of 2D Area of Partially Reconfigurable FPGAs", Jin Cui, Qingxu Deng, Xiuqiang He, Zonghua Gu, IEEE 2007 Design, Automation & Test in Europe Conference & Exhibition, an efficient algorithm for finding the complete set of maximally empty rectangles on a partially runtime reconfigurable 2D FPGA is described.
[0019] In "A framework for secure remote updating of bitstream on runtime reconfigurable embedded platforms", Tran Thanh, Pham Ngoc Nam, Tran Hoang Vu, Nguyen Van Cuong, IEEE 2012 Fourth International Conference on Communications and Electronics (ICCE), a secure and efficient remote updating of FPGA bitstream on runtime reconfigurable embedded platforms is described in order to implement a solution only in hardware, for example without operating system support.
[0020] State-of-the-art platforms comprise one or more processors with one or more cores and include programmable logic that is fully or partially programmable and erasable.
[0021] Typically, an application program is developed for such platforms. This application program is customized to the platform, compiled with drivers, and programmed into the platform once. However, this has the disadvantage of being inflexible, making changes difficult to implement, and not always running the application program with optimal performance because platform operating parameters, such as memory usage, a highly variable number of incoming alarms, a network connection with load-dependent data transfer rates, the platform's operating temperature during certain times of day, etc., are not adequately taken into account.
[0022] The publication WO 2013 / 192231 A1 shows a system with a processor and an FPGA, in which a process scheduler of the operating system of the common platform statically or dynamically assigns the execution of program code to either the processor or the FPGA.
[0023] The publication WO 2013 / 192236 A1 also shows a system with a processor and an FPGA, in which a process scheduler of the operating system of the common platform statically or dynamically assigns the execution of program code to either the processor or the FPGA.
[0024] It is the object of the invention to provide a method and a system with which a flexible reprogramming of the platform is enabled during operation of a platform having a processor and programmable logic for an application program, wherein the application program is to be provided by an application database connected to the platform.
[0025] The object is achieved by a method of the type mentioned at the outset, wherein in execution mode the programmable logic checks on the basis of at least one predetermined criterion whether a second application program with at least one second module should be loaded from the application database, and if this is the case, a switch is made to programming mode, and at least the at least one second module is loaded into the programmable logic in an executable manner as at least one second program code, then a switch is made to execution mode in which the at least one second program code is executed.
[0026] The term "executable" in this context means that the program code of an application program is specifically composed and compiled for a target platform and can be executed directly when stored in a program memory or in the programmable logic on the target platform.
[0027] When assembling, program libraries can be taken into account, for example for different drivers, such as an "FPGA Region Driver", an "FPGA Manager Driver", an "FPGA Bridge Driver" or a "Vendor FPGA Driver".
[0028] The following aspects are taken into account: There is an operating system-level driver that grants access to the programmable logic in "programming mode", and there is an operating system-level driver that manages the individual reconfigurable partitions of the programmable logic and synchronizes access to them, which falls into the context of an FPGA region driver, and there is a driver that grants access to the loaded application logic in "execution mode".
[0029] Individual drivers can, for example, outsource parts of their functionality to an FPGA.
[0030] If the compiled program code is intended for storage and execution in the programmable logic, "executable" also implies the storage or corresponding programming of the programmable logic.
[0031] For example, when compiling the application program, several modules can be created which are intended to be executed by the processor or the programmable logic.
[0032] The processor can contain multiple cores on which different modules run.
[0033] The programmable logic allows several independent logic modules to be implemented.
[0034] It's clear that after programming, the program mode must be switched to execution mode. This can happen automatically, for example, after the logic has been successfully programmed.
[0035] If no explicit programming mode is provided, for example in a processor, the programming mode can be viewed as the provision of new program code in the program memory for execution by the processor.
[0036] Switching between execution mode and programming mode can be initiated or performed by the processor or the programmable logic.
[0037] At least one predefined criterion can be applied, for example a resource utilization of the processor or the programmable logic.
[0038] This allows the application program to decide for itself in which form, namely either by the processor or by the programmable logic, the program code can be executed.
[0039] This results in a high degree of flexibility in program execution and a very high degree of efficiency in the execution itself.
[0040] Since the execution of the program code is less dependent on the execution specifications of an operating system of the platform, the influence of an operating system's process scheduler can be reduced and, in particular, the dynamic execution performance of the platform can be increased overall.
[0041] Data or program code can be provided to the program memory, for example, by the processor or by DMA (direct memory access).
[0042] Hardware-accelerated application logic that can be deployed flexibly on FPGAs can also be called a "hardware microservice."
[0043] In contrast, there are “software microservices” that run exclusively on general-purpose CPUs.
[0044] A hardware microservice includes: A bit stream or bit sequence for the FPGA's programmable logic (PL) containing the compiled application logic. An operating system driver for accessing application logic in the programmable logic from user space. A user-space implementation that provides interfaces to the hardware-accelerated application logic for use by other microservices.
[0045] In the present context, dynamic execution of one or more application programs by a platform means that a configuration change is made during execution, whether the application program or its program code or parts thereof, such as modules or "microservices", are executed by the processor or the programmable logic.
[0046] Modules or "microservices" can, for example, be defined by a second application program that performs the same task as a first application program. In this case, the executable program codes differ, but the first and second application programs can be identical and differ only in their implementation, i.e., in their modules or program codes.
[0047] A program code, a module or a microservice can be an implementation of an application program or a part of it.
[0048] Several different implementations of an application program are possible, for example for different platforms or for different configurations within the application program, such as variable distributions of logic and software modules, i.e. microservices.
[0049] The aforementioned bitstream of a microservice can also be an implementation of an application program.
[0050] The first program code can be an executable program code of the first application program that is optimized for a target platform and / or configured according to a user specification or the current performance of the platform.
[0051] The second program code can be an executable program code of the second application program that is optimized for a target platform and / or configured according to a user specification or the current performance of the platform, which second application program can correspond to the first application program.
[0052] The execution of an application program corresponds to the execution of the program code on the platform in execution mode.
[0053] This can improve performance and also simplify the licensing of software from libraries, as the software is optimized.
[0054] Licensing a hardware microservice may involve a complex implementation of a license check, which requires resources that are not available to the platform for executing the application program. However, it may also be stipulated that no license is required for the implementation of the same microservice in software. Accordingly, licensing may be a decision-making option for the implementation of the microservice.
[0055] For programmable logic, the programming mode can, for example, be a special operating mode in which logic gates of an FPGA are configured. Simultaneous execution can be prevented.
[0056] For example, the programming mode of a processor may correspond to its execution mode, i.e. the microprocessor's program memory may change during the execution of a program code.
[0057] In a further development of the invention, it is provided that when checking whether the second application program should be loaded, the utilization of the processor, the main memory of the processor, the program memory, or the program logic during execution of the first application program is determined and taken into account accordingly.
[0058] This allows for dynamic adaptation of the application program and thus optimal utilization of the platform's resources or optimal performance for the execution of the application program.
[0059] In a further development of the invention, it is provided that when checking whether the second application program should be loaded, a utilization of the processor, the main memory of the processor, the program memory, or the program logic during execution of the second application program is calculated, preferably estimated, and taken into account accordingly.
[0060] This allows the application program to be dynamically adapted to an estimated future resource requirement of the platform, thereby achieving optimal utilization of the platform's resources or optimal performance for the execution of the application program.
[0061] In a further development of the invention, it is provided that the processor and / or the programmable logic are used to determine whether the first and / or the second module is to be stored in the program memory or in the programmable logic, preferably in execution mode.
[0062] This allows the application program to be dynamically adapted during the execution of the program code by the program code itself, thus achieving optimal utilization of the platform's resources or optimal performance for the execution of the application program.
[0063] This allows the complexity of the platform to be kept simple.
[0064] In a further development of the invention, it is provided that an application management module, which is executed by a management system included in the platform and which is inserted into the connection between the application database and the processor and the programmable logic, determines whether the first and / or the at least one second module is stored in the program memory or in the programmable logic, preferably in execution mode.
[0065] This allows the application program to be dynamically adapted during the execution of the program code by a corresponding management module, thus achieving optimal utilization of the platform's resources or optimal performance for the execution of the application program.
[0066] The administration module is part of a management system that is designed to manage and configure the platform, perform status queries on the platform, or provide a connection to the application database.
[0067] By using the management module for dynamic adaptation of the program code, the performance of the program code execution is not affected.
[0068] In a further development of the invention, it is provided that the executably loaded, at least one second module comprises a corresponding second processor program code for execution by the processor in the program memory, as well as a corresponding second logic program code for execution by the programmable logic in the programmable logic.
[0069] This ensures that both an executable program code for execution by the processor and an executable program code for execution by the programmable logic are available for the same module and that dynamic switching between these two program codes is possible.
[0070] This can be used advantageously, for example, to select and execute the desired program code depending on performance, without the need for corresponding programming in programming mode immediately beforehand.
[0071] In a further development of the invention, it is provided that the predetermined criterion is the exceeding of an operational limit value of the platform, the reaching of a predetermined state for the first application program, the triggering of an alarm or an error message on the platform, or the reaching of a predetermined time.
[0072] This can be advantageously used, for example, to perform a needs-based reconfiguration of application program modules. This allows a predefined, desired execution performance of the program code to be implemented.
[0073] In a further development of the invention, it is provided that at least two application programs, preferably at least three application programs and particularly preferably at least five or at least ten application programs are executed dynamically.
[0074] This makes it possible to ensure that a number of application programs with their respective program codes are executed optimally on the platform by allowing coordination between the respective modules of the application programs.
[0075] In a further development of the invention, it is provided that the first and the second application program are identical, but the at least one first and the at least one second program code are different.
[0076] This makes it possible, for example, to reconfigure, recompile and reprogram only the modules or program codes within an application program, thus achieving a runtime-dependent distribution of the modules between the processor and the programmable logic.
[0077] The object according to the invention is also achieved by a system of the type mentioned at the outset, which is designed to carry out the method according to the invention.
[0078] In a further development of the invention, it is provided that the system further comprises an application management system with an execution memory and an application database, which is configured to execute an application management module and to provide an application program to the platform.
[0079] This ensures that applications for programming the platform can be provided in a simple manner, especially during the operation of the platform.
[0080] The invention is explained in more detail below using an exemplary embodiment shown in the accompanying drawings. In the drawings: Fig. 1 schematically shows a delivery process for platform software, Fig. 2 schematically shows a system according to the invention for the dynamic execution of an application program, Fig. 3-5 configuration examples for a dynamic delivery of an application program.
[0081] Fig. 1 shows a schematic of a delivery process for platform software from an application program 10 via a delivery pipeline 20, i.e. the delivery of the software from a database to the platform 30.
[0082] Fig. 2 shows a system S according to the invention for the dynamic execution of an application program 11 of an application 10 by a platform 30.
[0083] The platform 30 has a processor with a program memory 31 and a programmable logic 32, and is configured to execute the application program 10 in the form of at least one program code by means of the processor 31 and the programmable logic 32.
[0084] The system S further comprises an application management system AADM-S with an execution memory and an application database ADB, for example an app store.
[0085] The application management system AADM-S is configured to execute an application management module AADM.
[0086] For example, the application management module AADM can send a configuration query CONFIG to the platform 30 to determine a current load due to the operation of an application program on the platform 30.
[0087] If a change to the current programming of the processor 31 or the logic 32 is desired, a corresponding query can be made to the application database ADB by means of a corresponding load request LOAD by the application management module AADM in order to carry out a modification of the program code on the platform and to provide the application program 10 that corresponds to a desired configuration.
[0088] In the present context, a configuration can be understood as a distribution of functional modules of an application program in the form of corresponding program codes MP for execution by the processor 31 and / or program codes ML for execution by the programmable logic 32.
[0089] The determination of the application program from the ADB database, the composition and compilation or formation of modules of the application program 11 into program codes is carried out by means of a so-called "delivery pipeline" 20, which is part of the application management system AADM-S.
[0090] The generation of the program code can, for example, include frameworks or other libraries 21 as well as FPGA region drivers 22, FPGA manager drivers 23, FPGA bridge drivers 24 or vendor FPGA drivers 25.
[0091] Fig. 3 to Fig. 5schematically show the dynamic delivery of an application 10 to a platform 30 by means of the "delivery pipeline" 20.
[0092] An application program 11 with several software modules 12-15 is shown, which, for example, cover various technical functionalities of the application program 11.
[0093] For example, depending on the current performance of an application program executed by the platform, a request can be generated to reconfigure the application program 11.
[0094] In Fig. 3a first configuration example is shown in which the application program 11 is prepared in modules for execution by the processor 31, that is, including the necessary libraries, drivers for execution by the processor and its interfaces, compiled and program codes 112-114 formed and stored in the program memory of the processor 31.
[0095] However, a module is prepared for execution by the programmable logic 32, i.e., including the necessary libraries, drivers for execution by the logic and their interfaces, it is compiled and a program code 215 is formed and the logic is programmed accordingly.
[0096] In Fig. 4a second configuration example is shown in which the application program 11 is prepared in modules for execution by the processor 31, that is, including the necessary libraries, drivers for execution by the processor and its interfaces, compiled and program codes 112-113 formed and stored in the program memory of the processor 31.
[0097] However, a module is prepared for execution by the programmable logic 32, i.e., including the necessary libraries, drivers for execution by the logic and their interfaces, compiled and program codes 214-215 formed and the logic programmed accordingly.
[0098] In Fig. 5a third configuration example is shown in which the application program 11 is prepared in modules for execution by the processor 31, that is, including the necessary libraries, drivers for execution by the processor and its interfaces, compiled and program codes 112-115 formed and stored in the program memory of the processor 31.
[0099] However, a module is prepared for execution by the programmable logic 32, i.e., including the necessary libraries, drivers for execution by the logic and their interfaces, it is compiled and a program code 215 is formed and the logic is programmed accordingly.
[0100] In this configuration, the program code 115 and the program code 215 correspond to the corresponding module of the application program 11. Consequently, the same functionality for the module is available both for execution by the processor 31 and for execution by the logic 32 and can be called dynamically, depending on the situation. List of reference symbols:
[0101] 10Application 11Application program 112-115, 214, 215Program code 12-15Software module 20Delivery pipeline, management system 21Library 22FPGA region driver 23FPGA manager driver 24FPGA bridge driver 25Vendor FPGA driver 30Platform 31Processor with program memory 32Programmable logic AADMApplication management module ADBApplication database CONFIGConfiguration query of processor and logic LOADLoad request for application program M-LProgram code / module / application logic for programmable logic M-PProgram code / module / application logic for processor
Claims
1. Computer-implemented method for the dynamic execution of at least one application program (10) by a platform (30) that has a processor comprising a program memory (31) and has a programmable logic unit (32), wherein the processor (31) and the programmable logic unit (32) support a programming mode and an execution mode, and, in the programming mode, a first application program comprising at least one first module is loaded into the program memory and / or into the programmable logic unit (32) so as to be executable as at least one first program code from an application database (ADB) and programmed and, in the execution mode, the at least one first program code is executed, characterized in that, in the execution mode, the programmable logic unit (32) checks, based on at least one predefined criterion, whether a second application program (11) comprising at least one second module (12-15) should be loaded from the application database (ADB), and if so, a change is made to the programming mode, and at least the at least one second module (12-15) is loaded into the programmable logic unit (32) so as to be executable as at least one second program code (112-115, 214-215), and a change is then made to the execution mode, in which the at least one second program code (112-115, 214-215) is executed.
2. Method according to Claim 1, wherein, in the check as to whether the second application program (11) should be loaded, the usage level of the processor, of the working memory and of the program memory of the processor (31) or of the programmable logic unit (32) are determined and accordingly taken into consideration during the execution of the first application program.
3. Method according to Claim 1, wherein, in the check as to whether the second application program (11) should be loaded, a usage level of the processor, of the working memory and of the program memory of the processor (31) or of the programmable logic unit (32) is calculated, preferably estimated, and accordingly taken into consideration during the execution of the second application program (11).
4. Method according to either of Claims 2 and 3, wherein the programmable logic unit (32) is used to define whether the first and / or the second module (12-15) should be stored in the program memory (31) or in the programmable logic unit (32), preferably in the execution mode.
5. Method according to one of the preceding claims, wherein an application management module (AADM), which is executed by a management system contained in the platform and which is incorporated into the connection between the application database (ADB) and the processor (31) and the programmable logic unit (32), defines whether the first and / or the at least one second module (12-15) is stored in the program memory (31) or in the programmable logic unit (32), preferably in the execution mode.
6. Method according to one of the preceding claims, wherein the at least one second module (12-15) loaded so as to be executable comprises a corresponding second processor program code (115) for execution by the processor (31) in the program memory (31), and a corresponding second logic program code (215) for execution by the programmable logic unit (32) in the programmable logic unit (32).
7. Method according to one of the preceding claims, wherein the predefined criterion is the exceedance of an operative limit value of the platform, the reaching of a predefined state for the first application program, triggering of an alarm or a fault notification on the platform, or the reaching of a predefined time.
8. Method according to one of the preceding claims, wherein at least two application programs, preferably at least three application programs and particularly preferably at least five or at least ten application programs are executed dynamically.
9. Method according to one of the preceding claims, wherein the first and the second application program (11) are identical, but the at least one first and the at least one second program code (112-115, 214-215) are different.
10. System for the dynamic execution of at least one application program (10) by a platform (30) that has a processor comprising a program memory (31) and has a programmable logic unit (32), wherein the processor (31) and the programmable logic unit (32) support a programming mode and an execution mode, and the system is configured, in the programming mode, to load a first application program comprising at least one first module into the programmable logic unit (32) so as to be executable as at least one first program code from an application database (ADB), to program same and, in the execution mode, to execute same, characterized in that the system (S) is configured to carry out the method according to one of the preceding claims.
11. System according to the preceding claim, furthermore comprising an application management system (AADM-S) comprising an execution memory and an application database (ADB), which system is configured to execute an application management module (AADM) and to provide an application program (10) to the platform (30).