Anything related to computer forensics (new section!)
Post a reply

ONFI nand controller interface with nand flash

June 16th, 2024, 0:36

Hello.

I am doing ONFI 4.x interface with NAND flash onfi 2.2 compliant. The ONFI controller was downloaded from opencore website.

I made onfi 4.x comatiable with my target nand device. However, when I write 5 bytes (80h) into target device it does not end writing and continues....
I tried to edit file but I think its not allowed to make changes.

Can't we make changes in the file even if it's downloaded to my local directory in viavdo. it seems nand_master.vhd is connected to somewhere in the onfi website.

When I send a request to write (80h) it sends all the block, page bytes (8192) on the bus and it never ends. Technically, it should issue 10h after the 5 bytes of data_in write.





-- this loop don't make controller stop wrting

elsif(substate = MS_WRITE_DATA3)then

if(byte_count < data_bytes_per_page + oob_bytes_per_page)then

substate <= MS_WRITE_DATA1;

else

substate <= MS_SUBMIT_COMMAND1;

end if;

n_state <= M_NAND_PAGE_PROGRAM;

state <= M_WAIT;



-- It should do like this

elsif(substate = MS_SUBMIT_COMMAND1)then

cle_data_in <= x"0010";

n_state <= M_NAND_PAGE_PROGRAM;

state <= M_WAIT;

substate <= MS_WAIT;



Anybody know how to solve this issue so write operation should stop after writing 5 bytes and issue10h.
Attachments
Capture.JPG

Re: ONFI nand controller interface with nand flash

June 22nd, 2024, 16:17

I have ported the code from opencores to Verilog, since I prefer Verilog over VHDL. It is partly working, but not yet fully working. Feel free to play around with it and I would be happy about any pull requests: https://github.com/thesourcerer8/nand_controller/
Post a reply