Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

User Flash Memory Simulation in Quartus II

Altera_Forum
Honored Contributor II
1,139 Views

Hi all, 

 

My device is EPM570T100C5. In Quartus II, i use UFM. All settings are below: 

 

SPI interface portocol 

Read/Write 

Base mode 

no .mif file 

5.56MHz osc(for simulation) 

500,000 ns erase time(for simulation) 

1,600 ns program time(for simulation) 

 

In the Waveform file, i input 2 data. The first data is at the time of 10us and the second at 730us. For the first data, the UFM can erase, write and read correctly.  

 

But the second data can not write into the UFM, though in the Write Step, the waveform of opcode, address and data is right in simulation report. The Erase Step cost just about 10us(not 500us which i set) and the Write Step cost a long time(about 500us). When reading, the output is all 1s. It seems that after erasing, the Read Step is following. 

 

Why?Is there any requirement between two Erase Steps?Or, someting wrong during simulation?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
405 Views

From my experience with the SPI megafunction, it works fine. Some of the things you might want to check: 

 

1. Write enabled for the UFM (with the instructions) 

2. Whether the block is write-protected (by reading back the status register data) 

 

You can also check the nRDY bit and see if the erase or programming is happening. If erase or programming is happening, you should wait until the process is completed. 

 

Hope this helps.
0 Kudos
Altera_Forum
Honored Contributor II
405 Views

Thanks.  

 

I use RDSR Step to find out whether the nRDY is busy.  

Because the interface is powered-up in the write disable state, i set WREN when the nRDY is not busy. Then, i set BP0 & BP1 zero before going to ERASE STEP. After the erase opcode, i use RDSR again to check out the erase step completed and then step into WRITE STEP. 

 

I think that's it. 

 

Yesterday, i use Parallel interface to control the UFM, it works well:)
0 Kudos
Reply