Example Code

Programmatically Build / Replicate FPGA Build Specification and Automatically Launch Compilation

Code and Documents

Attachment

Overview

When developing FPGA code you sometimes need to launch multiple FPGA compilations at a time, for example, FPGA designs that push the limits of the hardware and are very close to being able to compile will sometimes fail and sometimes pass. Therefore, you need a way to send a batch of compilations to the compile server. This process can be performed manually by Queuing Multiple FPGA VIs for Compile, however, this process can be also automated.

Description

You can automate the creation of build specifications, generation of intermediate files and compilation using some of the build in LabVIEW VIs.As an input "Replicate_Build_Specs_and_Compile.vi" takes the name of the build specification you would like to replicate and the number new build specs you would like to create. It will then start the intermediate file generation and compilation process for each of those build specs. This processes will be repeated in a sequence for all the build specifications that were programmatically added to the project under the FPGA target.

auto_compile.jpg

Steps to Implement or Execute Code

1. Add "Replicate_Build_Specs_and_Compile.vi" to your project and open it.

2. Specify the name of the build spec you would like to replicate

3. Run the VI.

Requirements

Software:

LabVIEW 2013


Hardware

NA

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
michaeljoseph
Member
Member
on

Hello Sev_k,

This is a great tool. However, I keep running into an issue where the bitfiles have numbers appended to the file extension instead of the name.

Here is a summary of my procedure:

1) For example, say my build specification is named 'myBuild'.

2) Then in the build specification I manually edit the bitfile name to be 'myBuild.lvbitx' as opposed to the default name.

3) Then I run the 'Replicate_Build_Specs_and_Compile.vi' VI using 'myBuild' as the build specification to replicate (I usually create 4). After the bitfiles are finished they are named 'myBuild.lvbitx_1', 'myBuild.lvbitx_2', as opposed to 'myBuild_1.lvbitx', 'myBuild_2.lvbitx'.

4) Then I have to change the file names from 'myBuild.lvbitx_1' to 'myBuild_1.lvbitx' so that LabVIEW will recognize the bitfile.

Even if I can't resolve this issue, I still prefer using this VI to create multiple build specifications over manually creating multiple build specifications.

Thanks,
Michael

Sev_K
NI Employee (retired)
on

Hi Michael,

Thanks for finding this bug. I've fixed it and uploaded the updated version.Let me know if you run into any other issues.

Best Regards,

Sev

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
Contributors