Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1174 Discussions

DE1 Altera UP Flash Memory IP Core, No CFI table found & Error code: 8

Altera_Forum
Honored Contributor II
2,364 Views

Hi, 

 

I've been trying to get the on board flash memory working with the DE1 using the UP flash memory IP core but I can't get it working. Firstly, I'm using the DE1 Media computer instead of my own QSYS implementation (which gave the same error) so I'm under the impression that it should work without much tinkering. I read the relevant documentation as well and the requirements seem to be met in the example design.  

 

However when I try to use the flash programmer through Eclipse I get a No CFI table found (at the address of the flash memory) along with an error code 8. After reading through the forum it seems like this is a common problem but mostly with external flash memory. I'd appreciate any help on the matter if someone happens to read this. I'm using Quartus 64 bit 13.0.1 on a Windows 8 system. Thanks in advance. 

 

Ammar
0 Kudos
12 Replies
Altera_Forum
Honored Contributor II
493 Views

Hey again. I got the flash working so I decided to post here in the hope that it might be beneficial to others. Firstly I was unable to get the UP IP Core working no matter what I tried. Instead I used a CFI flash controller + a tristate conduit bridge. The flash portion of the 5th lab here (SRAM Flash Interrupt): http://www.csun.edu/~glaw/ee520.htm was very helpful. 

 

So the overall steps to get the flash working were: 

1. make qsys changes according to pdf tutorial 

2. make pin assignment for the FL_CE_N pin at PIN_AB15 (is missing from the DE1 pin assignment qsf file) 

3. make connections in top level entity 

4. change read out, write out, and chip select to standard logic (from std_logic_vector(0 downto 0)) as given here: http://www.alterawiki.com/wiki/new_qsys_issues#tri-state_conduits_and_vhdl_component 

5. set fl_rst_n <= '1' 

 

 

After this the CFI is detected fine and the flash programs correctly. I got the zipfs working as well. Hope this helps somebody. It doesn't seem like this part of the forum is very active so perhaps Altera should look into it, if someone from altera actually ever reads this lol. 

 

Ammar
0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Could you please upload that document to some public server? It request an ID and password. 

 

Thank you :)
0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Sure. It wasn't like that before! Hope it helps. https://anonfiles.com/file/5c34cd5147a97a63e7b9479c8298f836

0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Many thanks, my goal is using zipfs to read file from flash memory, and I've got stuck in many days due to the unfamiliar Stratix II board. Hope this will work.

0 Kudos
Altera_Forum
Honored Contributor II
493 Views

It's strange, when I use the default setting of Am29LV128, there is no flash mem that could be display in NIOS Flash Programmer, so I use the CFI configuration instead (include modify in hold time, setup time etc). 

This time Flash Programmer detects the flash memory, but when I start, the error code 4 appears for this command: 

 

nios2-flash-programmer "E:/Develop/Thesis.FPGA/stratix_ii_zipfs/software/zipfs_demo_bsp/flash/files_flash.flash" --base=0x1000000 --sidp=0x2081008 --id=0x12241108 --accept-bad-sysid --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-0]' --program 

 

I've met this case many times, still no solution for it. Could you share the qsys design of your system? My email is anhpvt248@gmail.com.
0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Well make sure you set the generic tristate controller according to the flash memory on your board. My goal was also to get the zipfs working and setting up the flash correctly was the main issue. After that it was relatively straightforward. Good luck.

0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Hi Ammar, 

 

Thank you very much for your delicate help :D 

 

I'm facing a massive problem: the actual flash memory on my Stratix II board is completely different from the document they supply (Spasion vs AMD), and maybe the data bus is different too. 

 

Could you please let me know what flash memory and preset you have used?
0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Hey. Well the flash on my board was exactly the same as the document since I'm using a DE1 board. When you add the tristate controller to QSYS and look at its options you can see some available presets. There's a couple for AMD as well. If your flash is one of those, then you can use it directly. If it's not then you'll probably have to use datasheet for your flash to get the information. There's also a chance that someone else has already gotten the information out if the flash is popular.

0 Kudos
Altera_Forum
Honored Contributor II
493 Views

Maybe the reason zipfs did not run is the memory. I wonder why, it sounds so ridiculous since I use SDRAM instead of On-chip memory, the system works fine when other parameters are kept unchange :)) 

 

I'm done with zipfs now, thank you again Ammar, for your invaluable help :D
0 Kudos
Altera_Forum
Honored Contributor II
493 Views

It's good you were able to get it running. Hmm I never tried using on-chip memory since I was already using SDRAM in my system so I didn't encounter a problem like that. You're welcome!

0 Kudos
Altera_Forum
Honored Contributor II
493 Views

One more question: have you ever tried zipfs with subfolder? Like read file at "/mnt/rozipfs/subfolder/text.txt"? 

 

I've tried and it was failed.
0 Kudos
Altera_Forum
Honored Contributor II
493 Views

I'm afraid I haven't tried it and I'm not sure if it would work. You may have to change the mount point to that subfolder. If you figure it out please do share.

0 Kudos
Reply