Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Tool for transforming python code to FPGA for Machine Learning

Status
Not open for further replies.

adwnis123

Full Member level 4
Joined
Jun 19, 2014
Messages
214
Helped
0
Reputation
0
Reaction score
1
Trophy points
18
Activity points
1,737
Hello, Is there any tool that can transform python code for Machine Learning into VHDL (preferably), so that can be uploaded to a Xilinx Spartan 3E FPGA?
 

Hi,

Maybe there is...but it's against the idea software vs hardware,

It's an often made mistake to look/write HDL like software.
Software is processed sequentially, one instruction after the other.
Hardware processes all at once. There are no instructions.

Use a microcontroller when you want to write software.
Use a PLD and HDL when you need hardware.

They work completeley different. Each has it's benefits and drawbacks.

Klaus
 
MyHDL is a python based tool for writing python and converting to HDL.
But you have to write the code specifically for MyHDL, you cannot just convert any old python.
 
Hello, Is there any tool that can transform python code for Machine Learning into VHDL (preferably), so that can be uploaded to a Xilinx Spartan 3E FPGA?

Hi,

it will be rather effortless to find way to to deploy trained ANN to FPGA. I am talking for most populat frameworks for deep learning (ANN) written in Python "TensorFlow" and "Keras". You are making model and train ANN in Keras for example and then deploy trained ANN to FPGA. So far I try Keras and TensorFlow with GPUs (Nvidia GeForce GTX1050 TI) and it is working fine, I didn't try it with FPGAs, but these links may be helpful:

https://www.easics.com/products/deep-learning-fpga

https://github.com/hls-fpga-machine-learning/hls4ml

**broken link removed**

https://github.com/hls-fpga-machine-learning/keras-training

https://github.com/danielholanda/LeFlow

Regards
 
The vivado webpack is free. It only supports the smaller devices though.
 
The vivado webpack is free. It only supports the smaller devices though.

Hello,

as @TrickyDicky said "Vivado HLS" (Webpack version) is free. You must create free account at xilinx.com and get "Webpack license" and copy it to catalog which is available from Vivado (the best is to add this catalog to PATH environment variable of Windows or Linux). This free licence allow to work with most of types of Xilinx FPGAs, for example Artix-7, Spartan-7, Zybo. These families of FPGAs should be enough for basic AI and deep learning.

Regards
 
When I go to the xilinx site to get the 30-day license for Vivado, it requires a "Host ID Value". What do I put here?
Also, I cannot understand why Xilinx gives me only 30-day license, since I am not going to make money from the software...I am only a hobbyist...
 

The webpack is a free version with no limits. The 30 day license is a 30 day trial of a full paid for licence. The webpack only supports the lower end devices. If you have a device not supported by the webpack, you'll need a full paid for licence. WHy should it matter if you're a hobbiest or not?

even amateur photographers have to pay for Photoshop, why should Xilinx be any different?

https://www.xilinx.com/products/design-tools/vivado/vivado-webpack.html
 
I have downloaded: "Vivado HLx 2019.2: All OS installer Single-File Download" does this support Webpack? (I want to use it with PYNQ-Z1) or should I have to download it from the link you post it: https://www.xilinx.com/products/design-tools/vivado/vivado-webpack.html ??

Yes, of course, there are cameras with 50-70$, if Xilinx wants this level of money for a license I can afford it...no problem!!
 

That install is fine - and when installing select "webPACK" as the install option
 
Hello,

as @TrickyDicky said "Vivado HLS" (Webpack version) is free. You must create free account at xilinx.com and get "Webpack license" and copy it to catalog which is available from Vivado (the best is to add this catalog to PATH environment variable of Windows or Linux). This free licence allow to work with most of types of Xilinx FPGAs, for example Artix-7, Spartan-7, Zybo. These families of FPGAs should be enough for basic AI and deep learning.

Regards

Ok I have installed WebPack Vivado finally. I am following these instructions....
https://fastmachinelearning.org/hls4ml/setup/QUICKSTART.html
How do I add the path on Ubuntu?

Thank you...

- - - Updated - - -

Also, this error:

mojito@ubuntu:~/Desktop/vivado/hls4ml/example-models$ hls4ml convert -c keras-config.yml
hls4ml: command not found

I cannot understand, I am following the instructions...!!
 


Ok, I have managed after many days to make it work... However I get this error:

Code:
ERROR: [HLS 200-70] Part 'xcku115-flvb2104-2-i' is not installed.
command 'ap_source' returned error code
    while executing
"source build_prj.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 [list source $arg] "

when running this command:

Code:
hls4ml build -p my-hls-test -a

I believe this is a component for the paid version right?? I have installed Vivado Webpack..!

Thank you...
 

Hello,

"xcku115-flvb2104-2-i" is high-end Ultrascale FPGA. Are you doing your project for Ultrascale FPGA? Maybe you should change in project properties type of using FPGA chip?

Best Regards
 
I changed the target FPGA! Nothing works! I believe it's time to transform myself the python code to Vivado from scratch... Too many days wasted!
 

Is it possible to build a CNN on Matlab and transform it to vhdl code? Has anyone experience on this? Thanks...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top