We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be2f599 commit b6241f0Copy full SHA for b6241f0
boards/milkymist-one/standby/standby.v
@@ -193,6 +193,18 @@ always @(posedge clk, negedge locked)
193
rescue <= next_rescue;
194
`endif
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
+
208
always @(*) begin
209
d = 16'hxxxx;
210
icap_en_n = 1'b1;
@@ -206,7 +218,8 @@ always @(*) begin
218
case(state)
219
IDLE: begin
220
`ifdef AUTO_ON
- next_state = DUMMY;
221
+ if(timer[19])
222
+ next_state = DUMMY;
223
`else
211
224
next_rescue = btn1_r;
212
225
if(btn2_r & ~btn2_r2)
0 commit comments