QNICE-FPGA icon indicating copy to clipboard operation
QNICE-FPGA copied to clipboard

MEGA65: HyperRAM: Very first control register read needs two reads

Open sy2002 opened this issue 3 years ago • 1 comments

When I use a freshly programmed FPGA (fresh HyperRAM controller), and then read the control registers, the value of the first read at the first control register is wrong:

Control Registers:     (Output should be: 0081, 000C, 00F6, 00FF)
00DE
000C
00F6
00FF

When I then restart the same test program (without reset/restart, etc., just run the test program again), then the values are all read correctly:

Control Registers:     (Output should be: 0081, 000C, 00F6, 00FF)
0081
000C
00F6
00FF

I did an experiment:

If I read the very first value of the very first control register two times instead of one time, then I am receiving the correct value, even if I did it directly after programming the FPGA.

sy2002 avatar Aug 21 '20 21:08 sy2002

The operative work on this issue is done in the MEGA65 core repo:

https://github.com/MEGA65/mega65-core/issues/281

sy2002 avatar Oct 10 '20 13:10 sy2002