From 689c8712c2581efde31e9f359c0741a4bcf2d92b Mon Sep 17 00:00:00 2001 From: Raptor Engineering Development Team Date: Sat, 9 Apr 2022 15:18:23 -0500 Subject: [PATCH] Revert "Avoid timing violation on ECP5 PHY PAUSE signal" This reverts commit 11d72971fc1656daa05abfa7ff33f697eb3d629f. Inadvertently added debug garbage in this commit. --- examples/headless/main.c | 10 ++++------ gram/phy/ecp5ddrphy.py | 20 +------------------- libgram/src/dfii.c | 6 ------ 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/examples/headless/main.c b/examples/headless/main.c index 43bfab7..37d22bd 100644 --- a/examples/headless/main.c +++ b/examples/headless/main.c @@ -131,10 +131,10 @@ int main(int argc, char *argv[]) { #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 @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) { 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; @@ -201,9 +201,7 @@ int main(int argc, char *argv[]) { fflush(stdout); } printf("\n"); -#endif -#if 0 printf("Auto calibrating... "); res = gram_generate_calibration(&ctx, &profile2); if (res != GRAM_ERR_NONE) { diff --git a/gram/phy/ecp5ddrphy.py b/gram/phy/ecp5ddrphy.py index 007c143..32a6792 100644 --- a/gram/phy/ecp5ddrphy.py +++ b/gram/phy/ecp5ddrphy.py @@ -101,28 +101,10 @@ class _DQSBUFMSettingManager(Elaboratable): 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"): diff --git a/libgram/src/dfii.c b/libgram/src/dfii.c index 8049a07..17e18da 100644 --- a/libgram/src/dfii.c +++ b/libgram/src/dfii.c @@ -56,12 +56,6 @@ static void dfii_set_mr(const struct gramCtx *ctx, uint8_t mr, uint16_t val) { #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); -- 2.30.2