Update: 03 Apr 2020
Many of us are presently working remotely and there has been a surge in compute requirements. Some of us brought the FPGA boards home but the compute servers are in office. This is a rehash of on how you can take advantage of the cloud to complete your builds faster.
---------------------------------------------------------------------------
Any serious hardware or software development effort will have a regression test suite. This article focuses on those tests that require constant (re-)compilation of FPGA designs and on how to speed up the turnaround times in order to keep tests, e.g. regression, running steadily.
Imagine if you have 5 designs or variations of the same overall design to build for every regression.
set design_list [list "A/A.xpr" "B/B.xpr" "C/C.xpr" "D/D.xpr" "E/E.xpr"] foreach each_design $design_list { open_project "$each_design" reset_run synth_1 launch_runs synth_1 impl_1 wait_on_run impl_1 close_project }
If each design takes 4 hours, then off-loading each build to a different machine can save a huge chunk of time.
With these considerations, we developed additional Tcl capabilities into FPGA Expansion Pack, a plugin to Vivado that enables the use of high-performance build machines in the Amazon cloud.
What is the FPGA Expansion Pack (FEP)
Comprising of a set of automation scripts and cloud utilities, FEP presents simple graphical and Tcl command-line interfaces to users to compile FPGA designs in the cloud. Subsequently download results back to their local environment as if the builds were done on-premise. The FEP can be downloaded here and you will need a Plunify Cloud account to get started.
How to use the cloud-enabled Tcl API
To use the previous example, this is how it would look like if you use FEP's Tcl API to compile in the cloud:
foreach each_design $design_list { fep::runCloudCompile -project "$each_design" -serverclass RA1 }
Each design will be off-loaded to a separate cloud server so the builds will happen concurrently.
You can also change the active run, e.g. impl_5, in a loop for each design so that you can fire off different design runs at the same time.
# To choose a design run, make it active current_run impl_5
The FEP comes with a Tcl API that aims to introduce as few changes to your existing scripts as possible, for example:
To compile your project:
fep::runCloudCompile -project "/home/user2002/bft_2017_2/bft_2017_2.xpr" -serverclass "RA1"
where
-project points to your project
-serverclass specifies the type of cloud build machine to use.
(Here is a list of server class type. A "RA2" would have around 30Gb of RAM and costs only 76 cents per hour, including tools)
This command returns a "Job ID", which is a number representing the build running in the cloud. To download the results, simply use
fep::runCloudDownload -jobid <jobid, e.g. 12345>
If the job is completed, the results will be downloaded and sync with your Vivado project as a new design run.
Supporting Non-project Modes
For non-project mode, the current approach is to convert the non-project mode into a project mode using the "save_project_as". While this may not be as intuitive to non-project users, this ensures all necessary files are captured and uploaded to the cloud.
How to get started
1. Go to https://support.plunify.com/en/documentation/install-and-run-fpga-expansion-pack/ for the instructions on where to download and install the plugin.
2. Download sample scripts from our github.
3. Refer to this page to get started.