cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mnorvalls
Visitor
Visitor
578 Views
Registered: ‎05-18-2020

Programming an FPGA with Xilinx Platform Cable USB II via separate C++ application

Jump to solution

Hello all,

I am very new to Xilinx, but I will try to explain my need in as much detail as possible, thank you for any help ahead of time!

I am looking to program FPGAs via a C++ application that will talk to my Platform Cable USB II device and then program the FPGAs. Since the C++ application will get the file and key locations from the user to write to the FPGA, I do not want the Vivado GUI. I was hoping for something like a C++ API to command the USB programmer I have, or worst case, command line calls.

The C++ program will get the locations of all the files needed to program the FPGA and I just need to pass that to some Vivado backend to do the programming.

Are there any options for doing this?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
ibaie
Xilinx Employee
Xilinx Employee
476 Views
Registered: ‎10-06-2016

Hi @mnorvalls 

I'm more familiar with SDK/Vitis tools than Vivado so I will provide my approach to accomplish your goal From embedded tools perspective the FPGA programming can be done either using the GUI (SDK or Vitis) or using System Debugger (XSDB), but as long as you want to avoid a GUI you just need to consider the second option.

XSDB provides a scriptable interface like Vivado so the easier way to implement your feature is having a simple XSDB script that programs the FPGA giving as input the required parameters. Your host application or script just need to execute XSDB to run the script.

 

i.e. a bash script if you host is Linux
#! bash
bitstream="/home/username/bitstream.bit"
echo "Program FPGA, bitstream: $bitstream"
xsdb myscript.tcl <bitstreamfile>

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.

View solution in original post

0 Kudos
1 Reply
ibaie
Xilinx Employee
Xilinx Employee
477 Views
Registered: ‎10-06-2016

Hi @mnorvalls 

I'm more familiar with SDK/Vitis tools than Vivado so I will provide my approach to accomplish your goal From embedded tools perspective the FPGA programming can be done either using the GUI (SDK or Vitis) or using System Debugger (XSDB), but as long as you want to avoid a GUI you just need to consider the second option.

XSDB provides a scriptable interface like Vivado so the easier way to implement your feature is having a simple XSDB script that programs the FPGA giving as input the required parameters. Your host application or script just need to execute XSDB to run the script.

 

i.e. a bash script if you host is Linux
#! bash
bitstream="/home/username/bitstream.bit"
echo "Program FPGA, bitstream: $bitstream"
xsdb myscript.tcl <bitstreamfile>

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.

View solution in original post

0 Kudos