The present disclosure relates to apparatus and methods using microbitstreams to reduce field programmable gate array (FPGA) configuration time.
Field-programmable gate arrays (FPGAs) are programmable integrated circuits that allow for configuration after construction of the circuits. In particular, FPGAs contain an array of programmable logic blocks, and reconfigurable interconnects allowing logic blocks to be wired together. Many FPGAs can be reprogrammed to implement different logic functions, allowing for flexible reconfigurable computing.
An FPGA configuration and/or functionality is generally programmed through a configuration file, or bitstream instruction, which are programmed into the device at boot-up. In some instances, such as in time sensitive systems, the programming time during boot-up is too long due to the configuration time of the bitstream, especially if bitstream encryption and authentication are used. Current techniques to reduce the configuration times of bitstreams include configuration frame removal, compressing the bitstream, or partial reconfiguration of the FPGA fabric during run time. Often these solutions do not apply encryption or authentication to the final bitstream, which leaves the user design susceptible to tampering, cloning, and malicious insertions.
The present disclosure includes methods and apparatus for decreasing configuration time of a field programmable gate array (FPGA). The apparatus and method implement parsing of a configuration data bitstream for an FPGA into critical and secondary bitstreams, reducing at least the critical bitstream by eliminating unnecessary configuration data and/or commands to obtain a reduced bitstream, and loading the reduced bitstream into the FPGA for initial FPGA configuration.
Additional features and advantages of the present invention will become apparent to those skilled in the art upon consideration of the following detailed description of the illustrative embodiments including examples describing a best mode of carrying out the invention as presently perceived.
The present examples of the inventive concepts described herein are not intended to be exhaustive or to limit the present disclosure to the precise forms disclosed. Rather, the presently disclosed embodiments have been chosen to enable one skilled in the art to practice the disclosed inventive concepts.
The presently disclosed apparatus and methods solve the previously discussed problems of time sensitivity and encryption/encoding by providing a bitstream reduction technique to produce what is termed “MicroBitstreams,” (also referred to herein as a “reduced bitstream”) which are created by a processor and/or algorithm run on at least one processor (which may be external to or, alternatively, within an FPGA device) that reduces the bitstream size and leverages partial reconfiguration through a bootloader preconfigured in the FPGA to load in secondary functionalities during run time. MicroBitstreams separate the final FPGA design into secondary and critical functionalities. The critical functionality will be included in the MicroBitstream that is encoded/encrypted alongside the bootloader, which is, in turn, used to load in the secondary functionalities after boot-up through dynamic Partial Reconfiguration (PR). This bifurcation or separation reduces the total configuration frames that are needed in the MicroBitstream, therefore decreasing the boot-up time. The average decrease in total configuration time when using a MicroBitstream compared to a normal encrypted bitstream is 88.70%, and 57.61% when compared to an encrypted compressed bitstream. MicroBitstreams offer the use of FPGAs in time-sensitive systems, thus decreasing program development costs and time spent in the design process.
As further background, it is noted that a binary configuration file, or bitstream, is used to configure an FPGA's logic, routing, and clocking resources. The user can use any supported configuration interfaces in order to load the bitstream into the FPGA such as the Joint Test Action Group (JTAG) interface. A bitstream is typically made up of three sections: (1) a header; (2) configuration data, and (3) a footer. Both the header and footer contain configuration commands to write or read from the FPGA's configuration registers. The configuration registers are referenced within the bitstream by the configuration commands to begin configuration, enable the decryption engine, poll the status of the FPGA, and other operations. Configuration data contains the configuration that makes up the user design within the FPGA fabric. Due to the size of FPGAs, the configuration data within the bitstream make up the vast majority of the bitstream length.
Protecting the FPGA typically starts with securing the configuration data in the bitstream. Even though the generation of the configuration data is closed source, the user design can be recovered through reverse-engineering of the bitstream. Hence, FPGA vendors provide bitstream encryption and authentication to help protect the bitstream and prevent reverse-engineering. Bitstream authentication also ensures that only bitstreams created by the intended user can be loaded into the FPGA, or that any non-approved modification to the bitstream halts the configuration process and resets the FPGA. Encryption and authentication are important in protecting the user design, especially with FPGAs being used in high performance data centers, automotive systems, and other sensitive applications.
Bitstreams that are generated using vendor Electronic design automation (EDA) toolchains contain the configuration for the entire FPGA fabric, even if parts of the fabric are not being used by the user design. Therefore to help condense the size of bitstreams, some vendors' EDA tool chains offer the ability to compress bitstreams. For AMD-Xilinx FPGAs, bitstream compression leverages an FPGA configuration register, Multiple Frame Write Register (MFWR), to write reoccurring data in the bitstream to multiple frames. If successive configuration frames contain the same data, then bitstream compression will wrap those configuration frames into one write command to the MFWR. Bitstream compression does decrease the overall configuration time, as leveraging the MFWR allows the FPGA to write data for multiple frames without having to interpret each configuration frame individually from the bitstream. With the bitstream being smaller there is less data being sent over any of the configuration interfaces. The non-volatile memory needed to store the bitstream is also allowed to be smaller. All are benefits of using the vendor supplied bitstream compression.
Bitstream compression, however, still writes to every configuration frame whether it contains data or is empty. Hence, valuable configuration time is still spent writing unnecessary data to the FPGA fabric. On the other hand, Microbitstreams, as disclosed herein, remove unnecessary writes to the FPGA fabric by looking at the contents of each configuration frame and determining if the contents are and/or the frame is needed.
The presently disclosed apparatus and methods employ a reduced bitstream (stylized or termed herein as “microbitstreams,” “Microbitstreams,” or “MicroBitstreams”) technique that provides an encrypted reduced bitstream to decrease the boot-up time of a FPGA. With the fabric of modern FPGAs growing with every new device, the time it takes to configure the FPGA fabric increases consequently. Since the entire fabric cannot be used and typically sections of the fabric are not used by the design, a portion of the configuration time is spent configuring the fabric to all zeroes. MicroBitstreams cut the unused configuration data from the bitstream, therefore minimizing the bitstream. MicroBitstreams also leverage a bootloader to configure the FPGA at run-time allowing the initial design included in the MicroBitstream to include only the necessary, or critical, logic at boot-up. The MicroBitstream includes encryption and authentication to protect the design from IP theft/cloning, Trojan insertion, and tamper/modification. Additionally, MicroBitstreams allow the boot-up time of an FPGA to be reduced significantly including the design to still be protected from malicious entities.
The present disclosure using MicroBitstreams provides separation of the FPGA design into secondary and critical functionalities. The critical functionalities are included in the MicroBitstream alongside a bootloader, which is used to load in the secondary functionality after boot-up through dynamic Partial Reconfiguration (PR). This separation reduces the total number of configuration frames that are needed in the MicroBitstream therefore decreasing the boot-up time. The user bitstream may be generated using a vendor EDA toolchain, although the invention is not limited to such, and contains the critical functionality and boot loader that will go through the MicroBitstreams process. In the microbitstream process, an initial step is removal of unnecessary configuration frames from the bitstream. The remaining configuration frames are encrypted with the same user specified symmetric key that will be stored in the FPGA. At boot-up the MicroBitstream is decrypted and loaded into the FPGA starting the critical functionality of the FPGA design and the boot loader. The boot loader then programs in the remaining functionality (e.g., the secondary functionalities) of the FPGA design at run-time, thus leveraging the partial reconfiguration process of modern FPGAs. The reduced number of configuration frames within the MicroBitstream allows the FPGA to boot-up at a much faster rate than previously capable. Hence, more time-critical applications can include FPGAs in their solution.
Dynamic partial reconfiguration (PR) is used to configure sections of the FPGA during run time. User designs are then able to be updated on the fly, creating a dynamic environment for the user. AMD-Xilinx FPGA's PR, for example, is accomplished through the use of an Internal Configuration Access Port (ICAP) hard IP. The ICAP is a 32-bit wide configuration interface which can be accessed through internal resources in the FPGA. The ICAP can individually address each configuration frame in the FPGA like any other configuration interface. With PR the FPGA does not halt the current design while it is configuring the FPGA, which allows a secondary configuration to be applied during run time.
During the design stage, a user defines what is considered critical configuration information/design and what will be the secondary configuration information/design. The two portions of the design are carefully partitioned to prevent the configuration in the secondary bitstream from writing over the previous configuration of the critical configuration (i.e., information that is in the MicroBitstream). Partitioning the fabric of current FPGAs may be easily accomplished using vendor provided Electronic Design Automation (EDA) toolchains. Most state-of-the-art FPGA vendors include tools within their EDA toolchain to constrain portions of a user design to specific locations in the FPGA fabric. The EDA toolchains also include Design Rule Checks (DRCs) to help ensure that the two designs are partitioned correctly and will not write over one another. Therefore, a user is able to quickly and easily partition the two separate parts of the design (critical functionality and secondary functionality). Thus, loading in a secondary bitstream at run time will not write over the previous functionalities causing the design to fail. The presently disclosed MicroBitstreams leverages partial reconfiguration through a bootloader to program the secondary configuration into the FPGA at run-time. The ICAP is used by the bootloader to load in that secondary bitstream.
Before generating the bitstream, the presently disclosed MicroBitstreams forces the use of individually addressed configuration frames within the generated bitstream.
To prepare the MicroBitstream for encryption, the Control Register 0 (CTL0) command in the bitstream will need to be updated to enable the internal decryption engine. The DEC bit in the CTL0 data word needs to be set to a one to enable the AES decryptor. The CTL0 command exists in both the header and footer of the bitstream, thus both commands will need to be changed. If the AES symmetric key for the FPGA is programmed into the eFUSE, then the CTL0 command will also need to set the EFUSE KEY bit to a one. The default symmetric key storage is the battery-backed RAM (BBRAM). Every write to either the CTL0 or CTL1 registers must have a write to the MASK register before it, hence the MASK command must be updated too. The MicroBitstream is now ready to be encrypted using the specified encryption algorithm Advanced Encryption Standard-Galois Counter Mode (AES-GCM).
To ensure that MicroBitstreams can decrease the total configuration times of AMD-Xilinx FPGAs, for example, multiple tests of the MicroBitstream process were performed using different designs for the Kintex Ultrascale+KCU116 evaluation board (xcku5p-2ffvb676c). The efficacy of the Microbitstreams was tested by measuring the time required to configure a KCU116 FPGA fabric. Timing results were observed while configuring the FPGA over a Joint Test Action Group (JTAG) configuration interface at a frequency of 15 MHz and captured by a Saleae Logic Pro 16 logic analyzer.
In operation, three separate designs were developed to test the MicroBitstreams capability. Each design contained critical functionality and the previously discussed bootloader to load in the secondary functionality. The first design starts with a LED on as the critical functionality, and then after the bootloader loads in the secondary functionality at run time the LED is turned off (LED On to Off). The second design is similar but starts with the LED off and then turns it on after loading the secondary functionality during run time (LED Off to On). The final design consists of an LED toggle controller through a Universal Asynchronous Receiver/Transmitter (UART) for the critical functionality, and then an Arbiter Physically Unclonable Function (PUF) for the secondary functionality. For each design, multiple bitstreams were generated to create a normal encrypted bitstream, compressed encrypted bitstream, and a per-frame bitstream. Both the normal and compressed encrypted bitstreams were not modified, but the per-frame bitstream was used to create the encrypted MicroBitstream. Unencrypted bitstreams were also generated for testing of each design and compression to highlight the timing decrease of MicroBitstreams compared to unencrypted bitstreams as well. To program the FPGA with each bitstream, the AMD-Xilinx Vivado toolchain was used to load each bitstream into the FPGA through the USB to JTAG onboard circuitry. Each bitstream utilized the on-chip decryption and authentication engine.
As an example,
Further the apparatus 900 includes a data reducer 906 that reduces the critical bitstream and to a smaller or smallest form (i.e., MicroBitstreams) by removing unnecessary configuration information (configuration data and/or commands as discussed earlier) from the bitstream to obtain a reduced bitstream (e.g., MicroBitstream). In aspects, the data reducer 906 is configured to eliminate the at least one of unnecessary configuration data or commands to obtain the reduced bitstream by excluding writing the at least one of unnecessary configuration data or commands into the reduced bitstream. As seen, the reduced bitstream is output to an encoder/authentication/encryption module or software or firmware 908 that applies encoding and/or encryption to the reduced bitstream. In other examples, the data reducer may output the reduced bitstream to a bootloader 910 as shown with a dashed connection. The bootloader 910, in turn, loads the reduced bitstream to the FPGA to be first executed for starting configuration of the FPGA. Of further note, although the data parser 902 and data reducer 906 are shown as separate portions, these portions, modules or software may be implemented as a single unit, module, software or algorithm that accomplishes the generation of reduced bitstream as shown by the dashed box around these portions 902 and 906.
Apparatus 900 further includes the bootloader 910 that is configured to load the reduced bitstream into an FPGA as mentioned above. In some aspects, the bootloader 910 may be part of an FPGA as indicated by the dashed box or loaded into the FPGA prior to or concurrent with the reduced bitstream in some aspects. Furthermore, it is noted that the data parser 902 outputs the secondary bitstream, either to the encoder/authentication/encryption module 908 for encoding, authentication, and/or encryption of the secondary bitstream for subsequent input to the bootloader 910, which loads the secondary bitstream to FPGA after the reduced bitstream is running for FPGA fabric configuration (i.e., the FPGA is running) or may also wait until the reduced bitstream has finished running in other aspects. The secondary bitstream data (e.g., secondary storage/user configuration data) is loaded to the FPGA by the bootloader 910 after the initial, critical configuration of the FPGA has been performed and running.
It is noted that one or more of the portions of apparatus 900 (e.g., 902, 906, 908, and/or 910) may constitute one or more processors that further may execute software or general processing, including the execution of software or one or more computer implementatble instructions stored in a memory or computer-readable medium 912. As used herein, software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. The software, when executed by the apparatus 900, causes the apparatus to perform the various functions described herein for any particular apparatus. The computer-readable medium and/or memory 912 may also be used for storing data that is manipulated by the processing elements (e.g., 902, 906, 908, and/or 910) when executing software.
Next, method 1000 includes loading the reduced bitstream into the FPGA for initial FPGA configuration as shown in block 1006. Once the initial configuration is completed using the reduced bitstream, flow proceeds to block 1008 where the secondary bitstream is loaded into the FPGA, such as with a bootloader as discussed previously, after initial FPGA configuration is started (or, alternatively, when complete) and the FPGA is running.
In some aspects, it will apparent from the above discussion that the presently disclosed reduced bitstreams (i.e., MicroBitstreams) provide for separating FPGA design into two partitions to initially reduce the amount of configuration within the MicroBitstream. The empty configuration is then removed and not compressed like other solutions use to decrease the size of the bitstream. MicroBitstreams also includes encryption and authentication to the bitstream, ensuring the user design is secure. With most time-sensitive applications existing in critical systems the user design needs to be secured to prevent modifications and cloning.
It is noted that the presently disclosed MicroBitstreams relate to other known bitstream size reduction techniques using compression. In particular, the known techniques apply compression using device supplied commands allowing for easy compression and requires no extra circuitry for decompression. The techniques also leverage partial reconfiguration to allow the initial, or static, bitstream to be compressed further than originally allowed. MicroBitstreams, however, do not utilize the device-supplied commands for compression, but instead remove configuration data that is empty, and applies encryption and authentication that is not applied in the known compression techniques.
Furthermore, the present methods and apparatus afford decrease of the total configuration time of modern FPGAs, and provide security for the user design through encryption and authentication. This enables the use of FPGAs in time-sensitive systems where typically ASICs are developed and used. Systems are then able to utilize FPGAs to develop and produce a solution quicker and cheaper than before.
Although the presently disclosed inventive concepts have been described in detail with reference to certain preferred embodiments and examples, variations and modifications exist within the spirit and scope of the invention as described and defined in the following claims.
The present application claims the benefit of and priority to U.S. Provisional Patent Application Ser. No. 63/528,541, filed Jul. 24, 2023, and entitled “MICROBITSTREAMS FOR REDUCING FIELD PROGRAMMABLE GATE ARRAY CONFIGURATION TIME,” the disclosure of which is expressly incorporated by reference herein.
The invention described herein was made in the performance of official duties by employees of the Department of the Navy and may be manufactured, used and licensed by or for the United States Government for any governmental purpose without payment of any royalties thereon. This invention (Navy Case 211676US02) is assigned to the United States Government and is available for licensing for commercial purposes. Licensing and technical inquiries may be directed to the Technology Transfer Office, Naval Surface Warfare Center Crane, email: Crane_T2@navy.mil.
| Number | Date | Country | |
|---|---|---|---|
| 63528541 | Jul 2023 | US |