Xilinx的COE文件格式有区别

Xilinx的FIR的COE文件应该是这样的:

fileID = fopen('fir_h.coe','w');
fprintf(fileID,'%s\n%s\n','radix=10;','coefdata=');
fprintf(fileID,'%.0f,\n',h);
fclose(fileID);

radix=10;
coefdata=
            -809,
           -1746,
           -1540,
            1874,
            9528,
           19918,
           29092,
           32767,
           29092,
           19918,
            9528,
            1874,
           -1540,
           -1746,
            -809;

xilinx的BRAM的COE文件应该是这样:

fileID = fopen('fir_h.coe','w');
fprintf(fileID,'%s\n%s\n','memory_initialization_radix=10;','memory_initialization_vector=');
fprintf(fileID,'%.0f,\n',h);
fclose(fileID);
---------------------
作者:zhangduojia
来源:CSDN
原文:https://blog.csdn.net/zhangduojia/article/details/81427814

最新文章