- MATLAB中生成rom可以读的.coe文件:
clc;
clear all;
close all;
width = 8; %位宽
depth = 2 ^ 8 * 2; %深度(采样点个数)
x = linspace(0, 2 * pi, depth);
y = sin(x);
y = round(y * (2 ^ (width - 1) - 1) + 2 ^ (width - 1)</
clc;
clear all;
close all;
width = 8; %位宽
depth = 2 ^ 8 * 2; %深度(采样点个数)
x = linspace(0, 2 * pi, depth);
y = sin(x);
y = round(y * (2 ^ (width - 1) - 1) + 2 ^ (width - 1)</