HDL Code Generation 2D-matrices

I have a question to ask, my input is 4 images mixed 4x200000 matrix and a 4x4 matrix, to do matrix multiplication. It told me "HDL Code generation does not support 2D-matrices as function inputs." How can I change it?

답변 (1개)

Tim McBrayer
Tim McBrayer 2018년 1월 30일

0 개 추천

The only current way to do this is by implementing your own matrix multiplication. You will need 200000 * 4 * 4 = 3200000 multiplications to compute this matrix product, so I would not suggest a fully parallel approach. You could use the HDL multiply-accumulate block or the dot product block to compute each output value, and implement selection logic to feed the single-pixel compute core the correct set of vector inputs from your data source.

댓글 수: 4

Walter Roberson
Walter Roberson 2018년 1월 30일
... however before that I think the user is going to have to serialize the inputs, because there is no way an FPGA is going to have that many input pins.
Yu Chen
Yu Chen 2018년 2월 23일
Sorry, I probably have this concept, but in this part should I change from code or do I have to call a converter out?
Walter Roberson
Walter Roberson 2018년 2월 23일
Is your code written in MATLAB, or are you using Simulink? If you are using Simulink then there are blocks you can call to serialize and deserialize; in particular there is the Vision HDL blocks .
Yu Chen
Yu Chen 2018년 2월 26일
편집: Yu Chen 2018년 2월 26일
My code is written in Matlab,can I not use blocks? Because I do not quite understand that teaching website, its block image is very vague.Currently I am having problems in this section, "set target interface".

댓글을 달려면 로그인하십시오.

카테고리

질문:

2018년 1월 30일

편집:

2018년 2월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by