Noticed that when integrating this CPU into the complete Game Boy system made by msinger. That work is displayed at msinger/dmg-sim#1.
From msinger research, CLK_ENA should only go high after OSC_STABLE, otherwise the OSC_STABLE never goes up (this is better explained in the link above).
Extracting the logic of CLK_ENA from Seq.v, we can see it never interacts with OSC_STABLE, and goes up immediately after RESET:
| RESET |
SYNC_RESET |
CLK_ENA |
| 0 |
0 |
~(d[100] | IR[4] & d[101]) | SeqControl_1 |
| 0 |
1 |
~(d[100] | IR[4] & d[101]) |
| 1 |
x |
0 |
- d[100]: s1_op_halt_s0xx
- d[101]: s1_op_nop_stop_s0xx
Noticed that when integrating this CPU into the complete Game Boy system made by msinger. That work is displayed at msinger/dmg-sim#1.
From msinger research,
CLK_ENAshould only go high afterOSC_STABLE, otherwise theOSC_STABLEnever goes up (this is better explained in the link above).Extracting the logic of
CLK_ENAfromSeq.v, we can see it never interacts withOSC_STABLE, and goes up immediately afterRESET:~(d[100] | IR[4] & d[101]) | SeqControl_1~(d[100] | IR[4] & d[101])