-
- assign data = rd ?
- addr == `ADDR_NR50 ? nr50 :
- addr == `ADDR_NR51 ? nr51 :
- addr == `ADDR_NR52 ? nr52 : 8'bzzzzzzzz
+
+ reg rdlatch;
+ reg [15:0] addrlatch;
+
+ assign data = rdlatch ?
+ addrlatch == `ADDR_NR50 ? nr50 :
+ addrlatch == `ADDR_NR51 ? nr51 :
+ addrlatch == `ADDR_NR52 ? nr52 : 8'bzzzzzzzz