User`s manual

150 fwdata <= 16’h60;
151 fop <= ‘FLASHOP_WRITE;
152 state <= state+1;
153 end
154
155 8’h05:
156 begin
157 // Issue "confirm clear lock bits" command
158 faddress <= 0;
159 fwdata <= 16’hD0;
160 fop <= ‘FLASHOP_WRITE;
161 state <= state+1;
162 end
163
164 8’h06:
165 begin
166 // Read status
167 faddress <= 0;
168 fop <= ‘FLASHOP_READ;
169 state <= state+1;
170 end
171
172 8’h07:
173 if (frdata[7] == 1) // Done clearing lock bits
174 if (frdata[6:1] == 0) // No errors
175 begin
176 faddress <= 0;
177 fop <= ‘FLASHOP_IDLE;
178 state <= state+1;
179 end
180 else
181 status <= ‘STATUS_LOCK_BIT_ERROR;
182 else // Still busy, reread status register
183 begin
184 faddress <= 0;
185 fop <= ‘FLASHOP_READ;
186 end
187
188 //////////////////////////////////////////////////////////////////////
189 // Block Erase Sequence
190 //////////////////////////////////////////////////////////////////////
191 8’h08:
192 begin
193 status <= ‘STATUS_ERASING;
194 fwdata <= 16’h20; // Issue "erase block" command
195 fop <= ‘FLASHOP_WRITE;
77