Platform

Resources

Community

Platform

Resources

Community

A Unified Approach to FPGA Firmware Management and Distribution with Dagger

November 20, 2024

Nov 20, 2024

Diego Ciangottini

Vikram Vaswani

Share
Share
Share
Share

Field-programmable gate arrays (FPGAs) are a specialized type of digital circuit, intended for configuration and reconfiguration "in the field." They have applications in any field that requires low power, low latency computation (e.g. medical devices, physics detectors, robotics, hobby projects, etc.)

Dagger Commander Diego Ciangottini is a technologist working with the Italian National Institute for Nuclear Physics (INFN). A recurring R&D topic is the creation of a framework for hybrid computer architecture built using a combination of normal processors and FPGAs. This research is ongoing in collaboration with the University of Perugia, as one of several attempts to make FPGA hardware programming more accessible.

Challenges in FPGA Firmware Development

FPGAs are controlled by firmware, usually consisting of a bootloader, FPGA bitstream, and a minimal operating system. However, building this firmware is typically not a straightforward process due to two key challenges:

  • Lack of standardization: Each FPGA board often requires custom build instructions and unique interfaces, making it hard to establish a consistent firmware development process. The firmware and the programming syntax for different boards may differ due to hardware limitations. 

  • Vendor-specific ecosystems: Although initiatives like Yosys are a push toward a more open future, most vendors still operate closed ecosystems. This makes it difficult to share demos and example code, and to work collaboratively with others in the community.


    Most of the time, ready-made builds for specific boards are not available, requiring researchers and users to rebuild everything from source - a complex and time-consuming task. This lack of openness complicates collaborative development, as contributors often can’t share pre-built firmware, leading to redundant efforts in rebuilding from source.

Using Dagger to Simplify FPGA Firmware Builds and Distribution

To address these challenges, Diego harnessed Dagger’s capability to streamline the firmware distribution process. In a recent community call, Diego demonstrated how he overcame these challenges with Dagger. Taking a leaf from multi-arch container images, Diego decided to create a Dagger module to construct a single container image hosting multiple firmware artifacts for different FPGA boards, vendors and models along with the algorithm code (so that anyone can easily rebuild a specific firmware out of the box). 

Dagger takes care of building the image and publishing to a standard container registry. End-users can then load the relevant firmware onto any supported FPGA board from the registry.

Diego's Dagger module is publicly available and consists of two Dagger Functions:

  • A build() Dagger Function to build and push a firmware image to a registry. The function can also export the firmware locally if required.

  • A push() Dagger Function to push a pre-built firmware binary.

Here's an example of using it to build and push an image with firmware for Lattice IceStick to Docker Hub:

dagger call build --push \
  --device-spec lattice/ice40/yosys \
  --target DOCKER-HUB-USERNAME/my_fpga_firmware:v1 \
  --context

Once the image is published, it can be easily loaded onto an FPGA board with the tools provided by the producers of the board.

Advantages of Using Dagger for FPGA Firmware Management

Dagger Functions are programmable, reusable and run everything in containers, resulting in the following benefits:

  • Cross-compatibility: You can create firmware for multiple vendors, boards and models using containers and clean, maintainable Go code (or any of the other supported programming languages) instead of relying on unreliable shell scripts.

  • Reusable, consistent API: You can expose a clean API for building firmware images. This allows others to reuse the same functionality to create and share their own firmware images with colleagues in a vendor-neutral manner.

  • Efficient Caching: You get all the benefits of Dagger's caching, which accelerates container builds significantly.

This Dagger-based solution leverages the OCI standard to store an algorithm along with different firmware for several boards and the corresponding metadata. By adopting a GitOps approach, the tasks of building FPGA firmware, testing it and sharing it, become cloud-native operations with all the consequent accessibility and sustainability benefits.

Looking to streamline workflows and boost your team’s collaboration? See how Dagger pipelines can simplify your complex builds. Join us in making development more efficient and collaborative with reusable, standardized pipelines.

Watch Diego's complete demo below, and join our Discord to ask your questions, or jump right into the deep end of the pool with the Dagger Quickstart.

Field-programmable gate arrays (FPGAs) are a specialized type of digital circuit, intended for configuration and reconfiguration "in the field." They have applications in any field that requires low power, low latency computation (e.g. medical devices, physics detectors, robotics, hobby projects, etc.)

Dagger Commander Diego Ciangottini is a technologist working with the Italian National Institute for Nuclear Physics (INFN). A recurring R&D topic is the creation of a framework for hybrid computer architecture built using a combination of normal processors and FPGAs. This research is ongoing in collaboration with the University of Perugia, as one of several attempts to make FPGA hardware programming more accessible.

Challenges in FPGA Firmware Development

FPGAs are controlled by firmware, usually consisting of a bootloader, FPGA bitstream, and a minimal operating system. However, building this firmware is typically not a straightforward process due to two key challenges:

  • Lack of standardization: Each FPGA board often requires custom build instructions and unique interfaces, making it hard to establish a consistent firmware development process. The firmware and the programming syntax for different boards may differ due to hardware limitations. 

  • Vendor-specific ecosystems: Although initiatives like Yosys are a push toward a more open future, most vendors still operate closed ecosystems. This makes it difficult to share demos and example code, and to work collaboratively with others in the community.


    Most of the time, ready-made builds for specific boards are not available, requiring researchers and users to rebuild everything from source - a complex and time-consuming task. This lack of openness complicates collaborative development, as contributors often can’t share pre-built firmware, leading to redundant efforts in rebuilding from source.

Using Dagger to Simplify FPGA Firmware Builds and Distribution

To address these challenges, Diego harnessed Dagger’s capability to streamline the firmware distribution process. In a recent community call, Diego demonstrated how he overcame these challenges with Dagger. Taking a leaf from multi-arch container images, Diego decided to create a Dagger module to construct a single container image hosting multiple firmware artifacts for different FPGA boards, vendors and models along with the algorithm code (so that anyone can easily rebuild a specific firmware out of the box). 

Dagger takes care of building the image and publishing to a standard container registry. End-users can then load the relevant firmware onto any supported FPGA board from the registry.

Diego's Dagger module is publicly available and consists of two Dagger Functions:

  • A build() Dagger Function to build and push a firmware image to a registry. The function can also export the firmware locally if required.

  • A push() Dagger Function to push a pre-built firmware binary.

Here's an example of using it to build and push an image with firmware for Lattice IceStick to Docker Hub:

dagger call build --push \
  --device-spec lattice/ice40/yosys \
  --target DOCKER-HUB-USERNAME/my_fpga_firmware:v1 \
  --context

Once the image is published, it can be easily loaded onto an FPGA board with the tools provided by the producers of the board.

Advantages of Using Dagger for FPGA Firmware Management

Dagger Functions are programmable, reusable and run everything in containers, resulting in the following benefits:

  • Cross-compatibility: You can create firmware for multiple vendors, boards and models using containers and clean, maintainable Go code (or any of the other supported programming languages) instead of relying on unreliable shell scripts.

  • Reusable, consistent API: You can expose a clean API for building firmware images. This allows others to reuse the same functionality to create and share their own firmware images with colleagues in a vendor-neutral manner.

  • Efficient Caching: You get all the benefits of Dagger's caching, which accelerates container builds significantly.

This Dagger-based solution leverages the OCI standard to store an algorithm along with different firmware for several boards and the corresponding metadata. By adopting a GitOps approach, the tasks of building FPGA firmware, testing it and sharing it, become cloud-native operations with all the consequent accessibility and sustainability benefits.

Looking to streamline workflows and boost your team’s collaboration? See how Dagger pipelines can simplify your complex builds. Join us in making development more efficient and collaborative with reusable, standardized pipelines.

Watch Diego's complete demo below, and join our Discord to ask your questions, or jump right into the deep end of the pool with the Dagger Quickstart.

Field-programmable gate arrays (FPGAs) are a specialized type of digital circuit, intended for configuration and reconfiguration "in the field." They have applications in any field that requires low power, low latency computation (e.g. medical devices, physics detectors, robotics, hobby projects, etc.)

Dagger Commander Diego Ciangottini is a technologist working with the Italian National Institute for Nuclear Physics (INFN). A recurring R&D topic is the creation of a framework for hybrid computer architecture built using a combination of normal processors and FPGAs. This research is ongoing in collaboration with the University of Perugia, as one of several attempts to make FPGA hardware programming more accessible.

Challenges in FPGA Firmware Development

FPGAs are controlled by firmware, usually consisting of a bootloader, FPGA bitstream, and a minimal operating system. However, building this firmware is typically not a straightforward process due to two key challenges:

  • Lack of standardization: Each FPGA board often requires custom build instructions and unique interfaces, making it hard to establish a consistent firmware development process. The firmware and the programming syntax for different boards may differ due to hardware limitations. 

  • Vendor-specific ecosystems: Although initiatives like Yosys are a push toward a more open future, most vendors still operate closed ecosystems. This makes it difficult to share demos and example code, and to work collaboratively with others in the community.


    Most of the time, ready-made builds for specific boards are not available, requiring researchers and users to rebuild everything from source - a complex and time-consuming task. This lack of openness complicates collaborative development, as contributors often can’t share pre-built firmware, leading to redundant efforts in rebuilding from source.

Using Dagger to Simplify FPGA Firmware Builds and Distribution

To address these challenges, Diego harnessed Dagger’s capability to streamline the firmware distribution process. In a recent community call, Diego demonstrated how he overcame these challenges with Dagger. Taking a leaf from multi-arch container images, Diego decided to create a Dagger module to construct a single container image hosting multiple firmware artifacts for different FPGA boards, vendors and models along with the algorithm code (so that anyone can easily rebuild a specific firmware out of the box). 

Dagger takes care of building the image and publishing to a standard container registry. End-users can then load the relevant firmware onto any supported FPGA board from the registry.

Diego's Dagger module is publicly available and consists of two Dagger Functions:

  • A build() Dagger Function to build and push a firmware image to a registry. The function can also export the firmware locally if required.

  • A push() Dagger Function to push a pre-built firmware binary.

Here's an example of using it to build and push an image with firmware for Lattice IceStick to Docker Hub:

dagger call build --push \
  --device-spec lattice/ice40/yosys \
  --target DOCKER-HUB-USERNAME/my_fpga_firmware:v1 \
  --context

Once the image is published, it can be easily loaded onto an FPGA board with the tools provided by the producers of the board.

Advantages of Using Dagger for FPGA Firmware Management

Dagger Functions are programmable, reusable and run everything in containers, resulting in the following benefits:

  • Cross-compatibility: You can create firmware for multiple vendors, boards and models using containers and clean, maintainable Go code (or any of the other supported programming languages) instead of relying on unreliable shell scripts.

  • Reusable, consistent API: You can expose a clean API for building firmware images. This allows others to reuse the same functionality to create and share their own firmware images with colleagues in a vendor-neutral manner.

  • Efficient Caching: You get all the benefits of Dagger's caching, which accelerates container builds significantly.

This Dagger-based solution leverages the OCI standard to store an algorithm along with different firmware for several boards and the corresponding metadata. By adopting a GitOps approach, the tasks of building FPGA firmware, testing it and sharing it, become cloud-native operations with all the consequent accessibility and sustainability benefits.

Looking to streamline workflows and boost your team’s collaboration? See how Dagger pipelines can simplify your complex builds. Join us in making development more efficient and collaborative with reusable, standardized pipelines.

Watch Diego's complete demo below, and join our Discord to ask your questions, or jump right into the deep end of the pool with the Dagger Quickstart.

Get Involved With the community

Discover what our community is doing, and join the conversation on Discord & GitHub to help shape the evolution of Dagger.

Subscribe to our newsletter

Get Involved With the community

Discover what our community is doing, and join the conversation on Discord & GitHub to help shape the evolution of Dagger.

Subscribe to our newsletter

Get Involved With the community

Discover what our community is doing, and join the conversation on Discord & GitHub to help shape the evolution of Dagger.

Subscribe to our newsletter