Data transfer between HPS - FPGA using Python on HPS

Hello, I am currently doing my project which requires me to use DE1-SoC.
The project is to perform bearing health’s prognostic, it includes 3 parts which are: feature extraction, linear regression, and remaining useful life estimation using polynomial regression.
What I have is the Python code for the above 3 functions, and I want to perform feature extraction on the FPGA side.
The general idea is the dataset goes into HPS, then send to FPGA for feature extraction, and send the result back HPS to perform the other 2 functions.
The objective is to reduce the processing time as feature extraction will take the most time to process.
My question is: is it possible?
Because so far the tutorial I found, the C or C++ language is used in HPS to communicate with FPGA, I cant find any which uses Python.
If it is possible, how can it be done?
I have tried a few tutorials to understand the HPS-FPGA communication but maybe my version of Quartus Prime is not the same with the tutorials, some steps were missing and took me quite a while to google them and troubleshoot, and at the end, I managed to get the output as stated in the tutorial but I can’t understand how I did it. Previously I only use Quartus Prime to write Verilog for FPGA only, and I still consider myself a totally newbie to Platform Designer(formerly as Qsys) even though I have tried a few tutorial.
So I would really need someone to enlighten me.
Or is it more ideal to just use HPS to perform all the things?
Thank you!

Hi,
I think that you need first do a tutorial about Platform Designer tool like:

Sahand Kashami-Akaharma

Other tool that it is also interesting is OpenCL for hw/sw codesign
https://software.intel.com/en-us/articles/opencl-tutorials

What is your board , FPGA and Quartus version?

Regards
Cándido

If you want to use linux as your OS in HPS you can see the FPGA as another device that needs to be mapped in order to get access to it.
have a look on these:


BR,

Hi!
first of all thanks for replying.
And sorry for leaving this thread not replied for so long because I was refining the python code for my project at the same time learn and do more tutorials about Qsys.

@Mikernl Thanks for posting the links! I have tried the CycloneV HPS FIFO. However I am still not quite get how it works actually. I managed to get the results after following the instruction. But I wish to know how exactly how the data being transfer from HPS to the FPGA, and after some work and how the FPGA send back the data to HPS. Because what I can understand from the tutorial is just control the FPGA peripherals such as LEDs from HPS side… But I am going to send dataset in .txt to fpga and send back to HPS after work done in FPGA…
I haven’t try the tutorial in the second link you shared, hopefully can get some insight from there…

@candido Thanks for posting the links! After doing a few tutorials about Qsys, I have some rough idea on how it works.
And I found that OpenCL seems very popular for people who tend to use FPGA as an accelerator. I I haven’t really read about OpenCL because I am focusing on Qsys, afraid not enough time for me to learn OpenCL.