Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

So I have this matlab code that I want to convert to VHDL. I have worked on the

ID: 1847394 • Letter: S

Question

So I have this matlab code that I want to convert to VHDL. I have worked on the code so it is able to be accepted into the HDL converter for Matlab (I am using 2013A), except for one error. The error I get is the following: "HDL Code generation does not support 2D-matrices as function inputs." Here is a screenshot:


https://www.dropbox.com/s/5u7nsdm2hc4bo8g/error.JPG


Here is the two matlab files that I am using as well:


https://www.dropbox.com/s/lixf58y7lucgiyp/KalmanFiltering.m


https://www.dropbox.com/s/hi8ro2u37k6v4hz/KalmanFilteringTest.m


And just in case, here is the original kalman filter matlab code that I started with for reference:


https://www.dropbox.com/s/mxiqnojm800xx9z/Kalman.m


So this is the error I am currently stuck on. I have been able to solve a few before this one, but I am not sure what to change these matricies to in order for it to be compatible in VHDL. Thank you in advance!

Explanation / Answer

%linear dimension of membrane -- bigger is lower pitch nx = 5 ; ny=50; u = zeros(nx,ny); %time t u1 = zeros(nx,ny); %time t-1 u2 = zeros(nx,ny); %time t-2 uHit = zeros(nx,ny); %input strike % 0 lower pitch % rho = (vel*dt/dx)^2 rho = 0.5; % eta = damping*dt/2 % higher damping => shorter sound eta = 0.0002 ; % boundary condition -1.0
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote