I'm currently doing simulation with my NOR-controller design and S29JL064J Verilog simulation model. I experienced a strange behavior of DQ7 when I do Sector Erase simulation. A description of what I did is as follows.
1, The S29JL064J Verilog model is downloaded from Cypress official website; it's info is listed below:
Date: 13 Nov 29
2, My simulation flow is as follows:
(1) Program 256 bytes of random data to NOR, starting from address = 00_1000h, and let address + 1 after each 16-bit-word program is finished successfully;
(2) Read 256 bytes from NOR, starting from address = 00_1000h, and I can see that these data are consistent with the data I programmed in step (1).
(3) Issue the Sector Erase command sequence to NOR, the address to be erased is 00_0000h.
(4) Read DQ7-DQ0 and go through the polling process.
3, What I saw in my simulation is:
Program and read seemed OK, which indicates that my simulation environment, my testbench, should be OK;
However, the first polling immediately after Sector Erase just gives me DQ7 = 1, which seems somewhat weird or strange.
4, Upon careful re-reading of S29JL064J datasheet, page 34 says: "During the Embedded Erase algorithm, Data# Polling produces a 0 on DQ7. When the Embedded Erase algorithm is complete, or ..., Data# Polling produces a 1on DQ7."
So, in my expectations, the first polling should give me DQ7=0, but the S29JL064J simulation model seems to behave otherwise. My simulation waveform is shown below, all these signals are S29JL064J's port signals:
I mark my operations in yellow rectangles:
In the first yellow block, the NOR flash is fed with Sector Erase command sequence;
In the second yellow block, as you can see now RY/BY# (the RY signal near the bottom of the waveform) is low, which indicates the NOR device is busy doing internal erase operations, but polling DQ7 gives me 1, which is UNEXPECTED behavior.
5. To debug this, I delved a little bit deeper into the S29JL064J Verilog model. After grabing the model's FSM state into waveform, I can see that, with the input of Sector Erase command sequence, the FSM state machine's current_state signal (near the bottom of the above waveform) went through the following states:
RESET --> Z001 --> PREL_SETBWB --> C8 --> C8_Z001 --> C8_PREL --> SERS, and then it just stays in SERS state.
In the above timing diagram, while the S29JL064J's internal state machine actually stays in SERS(7'd17), the second yellow block the polling of DQ7 gives 1. Meanwhile, a signal "Status" in the model just changes from 0 to 1 (last signal in the above waveform), which I guess should be the "1" that DQ7 captures.
From my amateurish understanding of the Verilog model, and by guessing from the "SERS" acronym, now the S29JL064J should be doing Sector ERaSe, but polling DQ7 gives me 1.
6. So, my question is, is there a possibility that the S29JL064J Verilog model might be giving wrong poll result at DQ7-DQ0 during Sector Erase?
Or, is my NOR controller issuing wrong commands to the S29JL064J Verilog simulation model?