Ise下利用 ip 核定制 rom用 ise 的 ip 核生成了一个 rom,其中 rom 的内存初始文件.coe 文件的生成是一个关键。可以用两种方法生成 coe 文件:(我要在 coe 文件中存放正弦波函数数据,位宽 8,位深 256)方案一:Step1.Matlab 命令x=0: 2*pi/255: 2*pi;sind=(sin(x)+1)*128;sind=floor(sind)然后生成 256 个数据sind =Columns 1 through 14128131134137140143146149153156159162165168Columns 15 through 28171174177180182185188191194196199201204207Columns 29 through 42209211214216218220223225227229231232234236Columns 43 through 56238239241242243245246247248249250251252253Columns 57 through 70253254254255255255255255255255255255255254Columns 71 through 84254253253252251251250249248247245244243241Columns 85 through 98240238237235233232230228226224222219217215Columns 99 through 112213210208205203200198195192189187184181178Columns 113 through 126175172169166163160157154151148145142139135Columns 127 through 140132129126123120116113110107104101989592Columns 141 through 1548986838077747168666360575552Columns 155 through 1685047454240383633312927252322Columns 169 through 1822018171514121110876544Columns 183 through 19632211000000000Columns 197 through 2100112234567891012Columns 211 through 2241314161719212324262830323537Columns 225 through 2383941444648515456596164677073Columns 239 through 252757881848790939699102106109112115Columns 253 through 256118121124127Step 2打开 ise 中的 coregenerator新建一个工程,然后 tools-->memory editor ,把上面的数据都输入方格里,给文件起个名字,设置为生成 coe 文件 ,这样就 ok 了这种方法太麻烦 ,得一挨个数据地输入,费时费劲儿。我们可以用vim 编辑器查看生成的 coe 文件,它的格式如下MEMORY_INITIALIZATION_RADIX=2;MEMORY_INITIALIZATION_VECTOR=10000000,10000011,10000110,10001001,10001100,01111001,01111100,01111111;因此我们只有建立一个这样格式的 tx t 文档,然后将其后缀改为.coe 就可以了 。方案二:Step1.Matlab 命令x =0: 2*pi/255: 2*pi;sind=(sin(x )+1)*128;sind=floor(sind) ;dec...