Phenomenon:
1. When case is more complex (contains a for loop to read/write mem)
When discovering a for loop there is always a assembly instruction that does not perform a skip, (in fact, the assembly is not ripe and the instructions are too many to analyze the instructions rationally).
The fact is that the instructions are correct, but the execution is wrong ( so debug must be guaranteed not to change the nature of the situation to simplify case, compile the simplest sequence of instructions, easy to analyze the principle behind the sequence of instructions, otherwise it will not be able to locate the compiler error ).
2. When case is relatively simple (write to only a few mem addresses)
The discovery address is not the same as the data pair, and the system does not write the specified value at the specified address. But there are many addresses and data. My gut tells me that Stack's push/pop is messy and doesn't follow the rules of FIFO.
The stack is also a memory read and write operation, but a series of read and write operations have special significance (in a fixed memory space).
after that, we focus on the operation of the read-write unit in the stack by observing the data manipulation on the Systembus. found that the data on the Systembus is not right, lying trough.
At this time suspect 1. The compilation itself is wrong. (But it's possible, if the process is wrong, but it was right.) It is also necessary to analyze a simple sequence of instructions by analyzing the sequence of instructions, sometimes. )
2.memory interface did wrong. The interface was found to be wrong.
Important Tips:
1.push/pop is also the memory space read and write operation.
2. Be sure to know that the phenomenon is right, or wrong or not know.
3. Multi-view interface, do not go too deep inside the module to track the signal.
4. Be very familiar with the system abstract data flow.
5. Simplify the system to simplify the code, easy to analyze the positioning problem.
6. Through manufacturing errors, analyze the phenomenon to verify the guesswork.
7. Try to isolate the problem, do not let the module problem spread to the system level, otherwise very small bug to the system will be hidden deep, not easy to locate.
MEM Read operation mode summary (related to stack out stack)