Altera_Forum
Honored Contributor
9 years agoWhat's wrong with my .mif file
Hi,
I'm trying to initialize a ROM with a .mif file. I'm doing this for the first time, so probably there is just a simple mistake in my file. I used this guide http://quartushelp.altera.com/15.0/mergedprojects/reference/glossary/def_mif.htm to create a MATLAB function, generating the .mif file from a Vector. When I try to run Analysis & Synthesis I get the errorError (127000): Can't read Memory Initialization File or Hexadecimal (Intel-Format) File ./memoryInit/HRTF_L_real_memory_init.mif for ROM instance ALTSYNCRAM. If the file exists, it is not in correct format.
As the file definetively exists, I think there is an error in the generated .mif file, but I cant find it. This is the content of my file: -- Initializes Memory with real part of HRTF
DEPTH = 128;
WIDTH = 24;
ADDRESS_RADIX = DEC;
DATA_RADIX = DEC;
CONTENT BEGIN
0 : 1453995;
1 : -407270;
2 : -1036098;
3 : 611439;
4 : 758496;
5 : -898662;
6 : -290369;
7 : 952990;
8 : -273384;
9 : -645373;
10 : 674711;
11 : 44172;
12 : -795250;
13 : 732454;
14 : 131981;
15 : -676438;
16 : 244137;
17 : 426225;
18 : -442342;
19 : -7580;
20 : 237441;
21 : -116884;
22 : 109939;
23 : -244708;
24 : 62768;
25 : 326625;
26 : -295678;
27 : -348030;
28 : 632600;
29 : -22360;
30 : -761058;
31 : 600332;
32 : 386669;
33 : -693439;
34 : 94945;
35 : 462130;
36 : -309804;
37 : -112644;
38 : 115880;
39 : 108653;
40 : -11007;
41 : -253252;
42 : 151222;
43 : 291637;
44 : -412082;
45 : -53376;
46 : 420135;
47 : -184003;
48 : -207262;
49 : 137134;
50 : 118460;
51 : -60077;
52 : -20043;
53 : 12417;
54 : -4027;
55 : 4579;
56 : -3210;
57 : 4502;
58 : -1979;
59 : 3468;
60 : -1226;
61 : 1857;
62 : -2058;
63 : 1855;
64 : 333;
65 : 1855;
66 : -2058;
67 : 1857;
68 : -1226;
69 : 3468;
70 : -1979;
71 : 4502;
72 : -3210;
73 : 4579;
74 : -4027;
75 : 12417;
76 : -20043;
77 : -60077;
78 : 118460;
79 : 137134;
80 : -207262;
81 : -184003;
82 : 420135;
83 : -53376;
84 : -412082;
85 : 291637;
86 : 151222;
87 : -253252;
88 : -11007;
89 : 108653;
90 : 115880;
91 : -112644;
92 : -309804;
93 : 462130;
94 : 94945;
95 : -693439;
96 : 386669;
97 : 600332;
98 : -761058;
99 : -22360;
100 : 632600;
101 : -348030;
102 : -295678;
103 : 326625;
104 : 62768;
105 : -244708;
106 : 109939;
107 : -116884;
108 : 237441;
109 : -7580;
110 : -442342;
111 : 426225;
112 : 244137;
113 : -676438;
114 : 131981;
115 : 732454;
116 : -795250;
117 : 44172;
118 : 674711;
119 : -645373;
120 : -273384;
121 : 952990;
122 : -290369;
123 : -898662;
124 : 758496;
125 : 611439;
126 : -1036098;
127 : -407270;
END; Does anybody see an obvious mistake?