make spinstate more noticeable on LA, fix CKE init timer

Tue, 10 Aug 2010 12:58:34 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Tue, 10 Aug 2010 12:58:34 +0100
changeset 1
05af11892ed8
parent 0
f797831bb66d
child 2
ceaa61ebf8a2

make spinstate more noticeable on LA, fix CKE init timer

cke init timer was running 1cy longer than it should have

wb_sdram.v file | annotate | diff | revisions
     1.1 diff -r f797831bb66d -r 05af11892ed8 wb_sdram.v
     1.2 --- a/wb_sdram.v	Mon Aug 09 20:45:49 2010 +0100
     1.3 +++ b/wb_sdram.v	Tue Aug 10 12:58:34 2010 +0100
     1.4 @@ -135,7 +135,7 @@
     1.5  					if (timer == 32'd0) begin
     1.6  						// Timer hit zero. Send a NOP.
     1.7  						state <= ST_NOP;
     1.8 -					end else if (timer <= 32'd50) begin
     1.9 +					end else if (timer < 32'd50) begin
    1.10  						// Timer value is more than zero but less than 50; CKE is on, but
    1.11  						// keep waiting for the timer to actually expire.
    1.12  						sdram_cke	<= 1'b1;
    1.13 @@ -148,6 +148,7 @@
    1.14  			ST_NOP: begin
    1.15  					// Spinstate. Hold SDRAM in NOP.
    1.16  					debug <= 3'd7;
    1.17 +					sdram_mode <= M_Nop;
    1.18  					state <= ST_NOP;
    1.19  				end
    1.20  		endcase