cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xainalvi
Visitor
Visitor
10,597 Views
Registered: ‎02-13-2016

Nexys2 writing flash issue Help

Jump to solution

Hello I am quite new to fpga.

I need to write into my Xilinx Nexys2 strata flash JS28F128 chip.

 

Can some1 please help me. I dont know why my code is not working.

I have attached my code. 

My testbench and the required waveform. 

1.jpg

 

2.png

Thank you.

0 Kudos
Reply
1 Solution

Accepted Solutions
chapman
Xilinx Employee
Xilinx Employee
20,224 Views
Registered: ‎09-05-2007

PLEASE read the documentation more carefully. The reference design files are explained on page 19 and the green colour coding tells you which files are not included and where to obtain them. However, did you notice that a BIT file is included in the ZIP file so you can download and try the reference design immediately (to a Spartan-3E Starter Kit)? It is a fully working reference design.

 

Pages 23 to 26 provide an overview of how this reference design writes individual bytes or bursts of up to 32-bytes into the Flash. There are further descriptions contained within comments in the source code of the reference design. Note that ‘byte commands’ also need to be transmitted to the StrataFlash device as well as the data. Did you read what I said about hundreds of micro seconds and polling the status register? The timing of the signals during a write is only part of what has to be implemented correctly to store data in one of these devices.

Ken Chapman
Principal Engineer, Xilinx UK

View solution in original post

6 Replies
xainalvi
Visitor
Visitor
10,544 Views
Registered: ‎02-13-2016

Any takers ? kinda desperate for help. 

0 Kudos
Reply
chapman
Xilinx Employee
Xilinx Employee
10,463 Views
Registered: ‎09-05-2007

My quick look at your code gives me the impression that you are only writing to the RAM buffer inside the Flash device and not actually writing the buffer contents into the Flash memory. Note that when the Flash is programmed it takes hundreds of micro seconds (not nano seconds) to complete each storage and you would normally poll the 'Status Register' to determine when each write has completed. I don't see anything that does this in your code. Please look at my reference design for more clues...

 

http://www.xilinx.com/products/boards/s3estarter/r​eference_designs.htm

 

PicoBlaze RS-232 StrataFlash™ Programmer
Turns the Spartan-3E FPGA into an Intel StrataFlash programmer. The FPGA connects to a PC via an RS232 UART. Via HyperTerminal (not included), download an MCS file to the Intel StrataFlash parallel NOR Flash memory, check the memory ID, bulk erase the entire 128Mbit Flash, and read and write Flash data.

 

In particular, pages 23 to 26 of the document for this reference design... 

 

http://www.xilinx.com/products/boards/s3estarter/files/s3esk_picoblaze_nor_flash_programmer.pdf

 

 

Ken Chapman
Principal Engineer, Xilinx UK
xainalvi
Visitor
Visitor
10,452 Views
Registered: ‎02-13-2016

Thank you for your reply. I fear the design file you provide is incomplete, it does not include the processor component that reads/writes to the strata flash particularly. Moreover, the timing diagram provided in your reference design is rather similar to the one I've been trying to implement (please refer to attached testbench above). I've been stuck trying to access this strata flash as per the datasheet, I'm trying to achieve a simple 1 byte write to begin with and I can't understand what is it that I'm missing.

 

 

 

Untitled.jpg

0 Kudos
Reply
chapman
Xilinx Employee
Xilinx Employee
20,225 Views
Registered: ‎09-05-2007

PLEASE read the documentation more carefully. The reference design files are explained on page 19 and the green colour coding tells you which files are not included and where to obtain them. However, did you notice that a BIT file is included in the ZIP file so you can download and try the reference design immediately (to a Spartan-3E Starter Kit)? It is a fully working reference design.

 

Pages 23 to 26 provide an overview of how this reference design writes individual bytes or bursts of up to 32-bytes into the Flash. There are further descriptions contained within comments in the source code of the reference design. Note that ‘byte commands’ also need to be transmitted to the StrataFlash device as well as the data. Did you read what I said about hundreds of micro seconds and polling the status register? The timing of the signals during a write is only part of what has to be implemented correctly to store data in one of these devices.

Ken Chapman
Principal Engineer, Xilinx UK

View solution in original post

xainalvi
Visitor
Visitor
10,403 Views
Registered: ‎02-13-2016
Thank you so much. I am sorry i bothered you this much.
I think i can work from here.
0 Kudos
Reply
xainalvi
Visitor
Visitor
9,943 Views
Registered: ‎02-13-2016
Sorry to bother you but once the flash is written onto my board. I have used it on a spartan 3e and a nexys2.
I need to now connect another board to retrieve the mcs file stored in strataflash and program it on to that board so the board with picoblaze does not have to be reporgrammed.
I do not want to use the xilinx software and just use the hardware to transfer the mcs file.
Is it possible ?
0 Kudos
Reply