MAtlab HDL代码生成不支持可变大小矩阵类型

时间:2016-06-21 22:32:52

标签: matlab verilog hdl-coder

我正在研究图像处理算法。我想通过MATLAB HDL编码器将其转换为Verilog HDL。但是我在转换时遇到的错误是错误'' :错误:HDL代码生成不支持可变大小矩阵类型。我还尝试使用zeros()预先定义变量的大小;但这也行不通。请帮我解决这个问题。

function  img_or = Intra_Order(image_wide, image_high, org)

img_or = zeros(1,1966080);
img_or = uint8(img_or);

org = reshape(org,[1080,1920]);
img = reshape(org',[1,1920*1080]);

write_addr = 1;

%file_size = image_wide * image_high;

% Order input frame
for i=0:(image_high/64 - 1)
    for j = 0:(image_wide/64 - 1)
        for k = 0:63

              read_addr = j*64 + i*image_wide*64 + image_wide*k + 1;
            img_or(write_addr:write_addr+63) = img(read_addr:read_addr+63);
            write_addr = write_addr + 64;

          end
      end
  end

0 个答案:

没有答案