FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5741 Discussions

Is MAX 10 On-Chip flash Status register ever reports 'write successful'?

VStrakh
Novice
787 Views

In my project for MAX 10 fpga I have instantiated on-chip flash block. So far so good, I can read flash content in bursts or word-by-word, it work in real hardware and runs ok in simulation.

 

But when I try to simulate writes to flash I always get 'ws' bit in status register reported as zero, and according to ug_m10_ufm.pdf this should mean that write had failed.

 

I have sector write protection disabled, I can see 'busy' field properly changing between IDLE and BUSY_WRITE, but I never see the 'write success' bit set to 1. Even being tested on real hardware, I see the data is written into UFM, I can read it back later. I see bit 'read successful' reported as 1 after I read the flash content (actually, it's pretty always set to 1). But 'write successful' is never reported as 1.

 

I've tried to compare my work with 'AN547 Auto power' template, only to find out that AN547 doesn't use Status register at all, relying on `waitrequest`/`readdatavalid` signals for timing, and re-reading the data being written to check if write was successful.

 

So, should I bother checking the Status register at all?

 

Also, it seems that "ModelSim-Altera" doesn't simulate the writes to flash, because AN547 simulation stops with error, caused by the fact that values read from flash during simulation are always correspond to uninitialized flash content (0xffff). It never reads back the values written during simulation.

Any possible help or explanations for that?

0 Kudos
1 Solution
VStrakh
Novice
129 Views

Well, I'll have to apologize.

 

Because of the missed connection in the top level module, I've got control register data input lines hanging unconnected. I was monitoring the output lines of the control unit, but not the inputs of the flash block, so didn't notice the issue.

Whatever happened after that - nonfunctional simulation or partly performing system in real hw - has nothing to do with the flash block's specs or its responsibilities, and it is entirely my mistake.

 

I get proper status indications and fully functional simulation after I fixed my errors.

View solution in original post

2 Replies
VStrakh
Novice
130 Views

Well, I'll have to apologize.

 

Because of the missed connection in the top level module, I've got control register data input lines hanging unconnected. I was monitoring the output lines of the control unit, but not the inputs of the flash block, so didn't notice the issue.

Whatever happened after that - nonfunctional simulation or partly performing system in real hw - has nothing to do with the flash block's specs or its responsibilities, and it is entirely my mistake.

 

I get proper status indications and fully functional simulation after I fixed my errors.

View solution in original post

YuanLi_S_Intel
Employee
129 Views
I am glad it works properly now.
Reply