Skip to content

Commit f941d7c

Browse files
committed
expose stable signals
1 parent 44c4ba9 commit f941d7c

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

apps/guass-pyramid/ready-val/valid-hold.sv

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,16 @@ module Pyramid (
523523
input logic ready_o,
524524
output logic[7:0][7:0][7:0] out, // 8x8 output image
525525

526-
// Debug signals
526+
/// Debug signals
527+
// Blur states
527528
output logic[1:0] blur0_st,
528529
output logic[1:0] blur1_st,
529-
output logic[1:0] blur_up_st
530+
output logic[1:0] blur_up_st,
531+
532+
// Latched outputs
533+
output logic[7:0][7:0][7:0] level0_stable,
534+
output logic[3:0][3:0][7:0] level1_stable,
535+
output logic[7:0][7:0][7:0] upsampled_stable
530536
);
531537

532538
// Main state machine
@@ -625,7 +631,6 @@ Blur#(.D0(10), .D1(10)) blur0(
625631

626632
// Store the image produced by the first level once valid is asserted
627633
// in the right state.
628-
logic[7:0][7:0][7:0] level0_stable;
629634
always_ff @(posedge clk) begin
630635
if (reset)
631636
level0_stable <= '0;
@@ -661,14 +666,13 @@ Blur#(.D0(6), .D1(6)) blur1(
661666
.out(blur1_out), .valid_o(blur1_valid_o), .ready_o(blur1_ready_o)
662667
);
663668

664-
logic[3:0][3:0][7:0] level1_out_stable;
665669
always_ff @(posedge clk) begin
666670
if (reset)
667-
level1_out_stable <= '0;
671+
level1_stable <= '0;
668672
else if (st == Level1_Recv && blur1_valid_o)
669-
level1_out_stable <= blur1_out;
673+
level1_stable <= blur1_out;
670674
else
671-
level1_out_stable <= level1_out_stable;
675+
level1_stable <= level1_stable;
672676
end
673677

674678
// 3. UPSAMPLE PATH (blur.fil lines 341-351):
@@ -679,7 +683,7 @@ end
679683

680684
logic[7:0][7:0][7:0] upsample_out;
681685
Upsample#(.W(8), .D0(4), .D1(4)) upsample(
682-
.in(level1_out_stable), .out(upsample_out)
686+
.in(level1_stable), .out(upsample_out)
683687
);
684688

685689
logic[9:0][9:0][7:0] pad_up_out;
@@ -694,7 +698,6 @@ Blur#(.D0(10), .D1(10)) blur_up(
694698
.in(pad_up_out), .valid_i(blur_up_valid_i), .ready_i(blur_up_ready_i),
695699
.out(blur_up_out), .valid_o(blur_up_valid_o), .ready_o(blur_up_ready_o)
696700
);
697-
logic[7:0][7:0][7:0] upsampled_stable;
698701
always_ff @(posedge clk) begin
699702
if (reset)
700703
upsampled_stable <= '0;

0 commit comments

Comments
 (0)