Can you provide a complete python example code that demonstrates how to translate a python program into a hardware program that vivado can run. #1339
Unanswered
1yunfanzhang
asked this question in
Q&A
Replies: 1 comment
-
Thank you for asking. I just wanted to update you that we are working on an FPGA tutorial for Xilinx (with a slightly more complicated program): #1438 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am a graduate student in the Key Laboratory of Optical Communication of Shanghai Jiao Tong University. Now we want to deploy some AI-based discrete signal algorithms of optical fiber communication to xilinx FPGA. Our optical communication algorithms are all written in python, and our code is about thousands of lines, and AI algorithms in python are added. I have read your documentation and downloaded dace, but I find that your documentation and examples do not seem to have a complete example to illustrate how to translate python into hardware code, can you provide a complete example from python to hardware language (such as how to generate a hardware language that xilinx's vivado can run)? Thank you very much
For example, now that I have xilinx's vitis environment, I want to convert the following simple addition example python into a hardware language that vivado can run. I can now get SDFG data flow graphs, but what other dace commands should I use in python next? How to make this program output to xilinx's vivado hardware language?Can you provide a complete python example code that demonstrates how to translate a python program into a hardware program that vivado can run.
import dace
@dace.program
def vector_add9(A: dace.float32[10], B: dace.float32[10], C: dace.float32[10]):
C[:] = A + B
if name == "main":
# Create input and output arrays
import numpy as np
A = np.random.rand(10).astype(np.float32)
B = np.random.rand(10).astype(np.float32)
C = np.zeros_like(A)
Beta Was this translation helpful? Give feedback.
All reactions