Getting previous read data instead of current one

In reply to Subrahmanyam:

It works percfectly. It’s doing what you are instructing. It writes to addr = 0 and it reads from addr = 3, which has still the reset value.
Where is your problem.