Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

standby: work around intermittent reconfiguration problem

  • Loading branch information...
commit b6241f072e4cd5ff8de7f050b6c4e3553962002c 1 parent be2f599
Sébastien Bourdeauducq authored November 28, 2011

Showing 1 changed file with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. 15  boards/milkymist-one/standby/standby.v
15  boards/milkymist-one/standby/standby.v
@@ -193,6 +193,18 @@ always @(posedge clk, negedge locked)
193 193
 		rescue <= next_rescue;
194 194
 `endif
195 195
 
  196
+`ifdef AUTO_ON
  197
+/* HACK: for some reason, reconfiguring right away fails intermittently.
  198
+ * Work around this with a timer.
  199
+ */
  200
+reg [19:0] timer;
  201
+always @(posedge clk, negedge locked)
  202
+	if(~locked)
  203
+		timer <= 20'd0;
  204
+	else
  205
+		timer <= timer + 20'd1;
  206
+`endif
  207
+
196 208
 always @(*) begin
197 209
 	d = 16'hxxxx;
198 210
 	icap_en_n = 1'b1;
@@ -206,7 +218,8 @@ always @(*) begin
206 218
 	case(state)
207 219
 		IDLE: begin
208 220
 `ifdef AUTO_ON
209  
-			next_state = DUMMY;
  221
+			if(timer[19])
  222
+				next_state = DUMMY;
210 223
 `else
211 224
 			next_rescue = btn1_r;
212 225
 			if(btn2_r & ~btn2_r2)

0 notes on commit b6241f0

Please sign in to comment.
Something went wrong with that request. Please try again.