sy2002 / QNICE-FPGA

QNICE-FPGA is a 16-bit computer system for recreational programming built as a fully-fledged System-on-a-Chip in portable VHDL.
http://qnice-fpga.com
Other
70 stars 16 forks source link

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

Open sy2002 opened 4 years 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.

sy2002 commented 4 years ago

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

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