File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
apps/guass-pyramid/ready-val Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,8 @@ module Blur#(
314314 input logic clk,
315315 input logic reset,
316316
317+ output logic [1 : 0 ] state,
318+
317319 input logic valid_i,
318320 output logic ready_i,
319321 input logic [D0 - 1 : 0 ][D1 - 1 : 0 ][7 : 0 ] in,
@@ -341,6 +343,7 @@ Conv2D#(.N(N)) conv2d(
341343localparam Idle= 0 , Send_Conv= 1 , Recv_Conv= 2 , Writing= 3 ;
342344
343345logic [1 : 0 ] st, nxt_st;
346+ assign state = st;
344347always_ff @ (posedge clk) begin
345348 if (reset) st <= '0 ;
346349 else st <= nxt_st;
@@ -354,15 +357,18 @@ always_comb begin
354357 end
355358 Send_Conv: if (conv_ready_i) nxt_st = Recv_Conv;
356359 Recv_Conv: begin
357- if (valid_o ) begin
360+ if (conv_valid_o ) begin
358361 if (last_chunk) nxt_st = Writing;
359362 else nxt_st = Send_Conv;
360363 end
361364 end
362- Writing: if (ready_o) nxt_st = Recv_Conv ;
365+ Writing: if (ready_o) nxt_st = Idle ;
363366 endcase
364367end
365368
369+ // Send the ready signal to the convolution module.
370+ assign conv_ready_o = st == Recv_Conv;
371+
366372// The current image we are working on. We latch the value when a valid input
367373// is accepted.
368374logic [D1 - 1 : 0 ][D1 - 1 : 0 ][7 : 0 ] image;
You can’t perform that action at this time.
0 commit comments