#if 1
struct gramProfile profile = {
.mode_registers = {
- 0xb30, 0x806, 0x200, 0x0
+ 0xb20, 0x806, 0x200, 0x0
},
- .rdly_p0 = 5,
- .rdly_p1 = 5,
+ .rdly_p0 = 2,
+ .rdly_p1 = 2,
};
#endif
#if 0
gram_init(&ctx, &profile, (void*)ddr_base, (void*)0x00009000, (void*)0x00008000);
printf("done\n");
-#if 1
+#if 0
printf("Rdly\np0: ");
for (size_t i = 0; i < 8; i++) {
profile2.rdly_p0 = i;
fflush(stdout);
}
printf("\n");
-#endif
-#if 0
printf("Auto calibrating... ");
res = gram_generate_calibration(&ctx, &profile2);
if (res != GRAM_ERR_NONE) {
with m.State("Idle"):
with m.If(self.rdly_csr.w_stb):
m.d.sync += self.pause.eq(1)
- m.next = "RdlyUpdateRequestedDelay1"
-
- with m.State("RdlyUpdateRequestedDelay1"):
- m.next = "RdlyUpdateRequestedDelay2"
-
- with m.State("RdlyUpdateRequestedDelay2"):
- m.next = "RdlyUpdateRequestedDelay3"
-
- with m.State("RdlyUpdateRequestedDelay3"):
- m.next = "RdlyUpdateRequested"
+ m.next = "RdlyUpdateRequested"
with m.State("RdlyUpdateRequested"):
m.d.sync += self.readclksel.eq(self.rdly_csr.w_data)
- m.next = "ResetPauseDelay1"
-
- with m.State("ResetPauseDelay1"):
- m.next = "ResetPauseDelay2"
-
- with m.State("ResetPauseDelay2"):
- m.next = "ResetPauseDelay3"
-
- with m.State("ResetPauseDelay3"):
m.next = "ResetPause"
with m.State("ResetPause"):
#define MR0_DLL_RESET (1 << 8)
void dfii_initseq(const struct gramCtx *ctx, const struct gramProfile *profile) {
- /* Assert reset */
- dfii_set_p0_address(ctx, 0x0);
- dfii_set_p0_baddress(ctx, 0);
- dfii_setcontrol(ctx, 0);
- cdelay(50000);
-
/* Release reset */
dfii_set_p0_address(ctx, 0x0);
dfii_set_p0_baddress(ctx, 0);