UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
9,297 Views
Registered: ‎09-21-2010

Reading from BPI Flash with VHDL

My goal is to put some user data (specifically, inputs for an FFT core) in the JS28F256P30 flash device on the ML605 board, then read it out using a simple VHDL interface.  I've successfully programmed the flash through Impact and used readback to verify that the contents match my input file.  Judging by the JS28F256P30 data sheet, the device starts up in asynchronous read mode by default, and reading from it should be fairly straightforward; however, when I attempt this, I just see ones on the data bus.  Here is my VHDL code:

 

FPGA_FWE_B <= '1';
FLASH_WAIT <= '0';
FPGA_FOE_B <= '0';
FPGA_FCS_B <= '0';
P30_CS_SEL <= '0';

fl_addr_int <= "000000000000000000000011";
LEDs8 <= FLASH_D(7 downto 0);

FLASH_A <= fl_addr_int;

 

I am just looking at one address for now, in an attempt to verify the read operation.  Does anyone know what's wrong, or have an example of something similar?  I've been looking around, but it seems as though people usually just use the flash for storing configuration files and software, and don't try to put raw data in it and then read from specific addresses like this.

0 Kudos
6 Replies
Teacher rcingham
Teacher
9,261 Views
Registered: ‎09-09-2010

Re: Reading from BPI Flash with VHDL

How many clock cycles between outputting the address and reading the data?

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Adventurer
Adventurer
9,260 Views
Registered: ‎09-21-2010

Re: Reading from BPI Flash with VHDL

As many as you like.  That code that you see is not happening inside any process; since I am only trying to look at the one address for now, I am just putting the address on the lines and letting it sit there forever.  The data bus is perpetually connected to the LEDs as well.  I did this in a deliberate attempt to rule out timing issues.

 

The only downside to this that I can think of, is that the flash might need to see some sort of rising or falling edge before it puts data on the bus -- but that shouldn't be the case in asynchronous read mode, should it?  Or am I missing something?

0 Kudos
Teacher rcingham
Teacher
9,206 Views
Registered: ‎09-09-2010

Re: Reading from BPI Flash with VHDL

That should work, assuming that you have the various control signals as they should be - from timing diagram in data sheet,

ADV#, CE#, OE# all 0, RST# at 1.

 


------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Adventurer
Adventurer
9,199 Views
Registered: ‎09-21-2010

Re: Reading from BPI Flash with VHDL

I don't have access to the #ADV and #RST signals from the FPGA, but from the ML605 board's schematics, it seems that the #ADV pin on the flash chip is tied low, and the #RST chip is tied high.  So I'm mystified as to why it doesn't work.  From studying the schematic, I think I need to change P30_CS_SEL to '1' to get the CE pin on the flash chip to go low; but even that doesn't help.

0 Kudos
Visitor sfrisbie
Visitor
8,638 Views
Registered: ‎11-21-2009

Re: Reading from BPI Flash with VHDL

I was wondering if you got this to work?  I have an Avnet virtex-5 board which uses a 128P30 flash device and am seeing the same behavior.  I am pulling ADV#, CE#, and OE# low, and WE# and CLK high. I'm setting the address to one which I've verified has data through a readback in IMPACT.  All I get back is logic high on all data lines.

0 Kudos
Visitor humtm
Visitor
8,225 Views
Registered: ‎05-08-2012

Re: Reading from BPI Flash with VHDL

Hello

 

cgauer, I was wondering if you managed this to work. I was planning on using the BPI memory on the ML605 to store some data for DAC output.

Could you manage to work around this problem?

 

Best regards

 

Humberto

0 Kudos