How can I access the values of a matrix separately?
I want values of Matrix 4*4 divide into 4 part, and store them in register then do some operation on them.
i work with xilinx system generator in matlab simulink
my function is :
function [D1,D2,D3,D4 ]= shiftRegister(In)persistent regs, regs = xl_state(zeros(1, 4), In);D1=regs(0);D2=regs(1);D3=regs(2);D4=regs(3);for m=0:3D1=D1+regs(4*m-4);D2=D2+regs(4*m-3);D3=D3+regs(4*m-2);D4=D4+regs(4*m-1);endregs.push_front_pop_back(In);end
plz see my pictures
and plz guide me and help me
Hi @alirahiminezhad ,
The input port of m-code block is named as 'In' which is a keyword in VHDL. Please avoid using HDL keywords for naming in Sysgen designs.