MEGA65 / mega65-core

MEGA65 FPGA core
Other
240 stars 85 forks source link

HyperRAM: Very first control register read needs two reads #281

Closed sy2002 closed 2 weeks ago

sy2002 commented 4 years ago

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.

gardners commented 4 years ago

Weird. Again, we should try to observe this under simulation, and see if we can make head or tail of it.

sy2002 commented 3 years ago

Retested this issue with the new version from https://github.com/MEGA65/mega65-core/issues/280#issuecomment-699468911:

The problem still persists.

lydon42 commented 2 weeks ago

same as #280 isn't this old news? @sy2002 @gardners

gardners commented 2 weeks ago

As for #280 I think we can close it. Users shouldn't access those registers, anyway.