diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-10-25 19:13:19 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-10-25 19:13:19 -0600 |
| commit | 5202bce32bd9157508ed48da37e114b7ade0ec70 (patch) | |
| tree | bc5eeac42915e5e2ddf2cd6fb8d17f9dc6053eb5 /rtl/gfx/pipeline_flow.sv | |
| parent | c1c1f1e823099c82d02e94827a64d7a0b223048e (diff) | |
rtl/gfx: implement skid buffers
Diffstat (limited to 'rtl/gfx/pipeline_flow.sv')
| -rw-r--r-- | rtl/gfx/pipeline_flow.sv | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rtl/gfx/pipeline_flow.sv b/rtl/gfx/pipeline_flow.sv index 2b9c891..15986d0 100644 --- a/rtl/gfx/pipeline_flow.sv +++ b/rtl/gfx/pipeline_flow.sv @@ -1,5 +1,3 @@ -`include "gfx/gfx_defs.sv" - module pipeline_flow #(parameter STAGES=0) ( @@ -16,14 +14,16 @@ module pipeline_flow logic valid[STAGES]; - assign stall = !in_ready; - assign in_ready = out_ready || !out_valid; - assign out_valid = valid[STAGES - 1]; + skid_flow skid + ( + .in_valid(valid[STAGES - 1]), + .* + ); always_ff @(posedge clk or negedge rst_n) if (!rst_n) valid[0] <= 0; - else if (in_ready) + else if (!stall) valid[0] <= in_valid; genvar i; @@ -32,7 +32,7 @@ module pipeline_flow always_ff @(posedge clk or negedge rst_n) if (!rst_n) valid[i] <= 0; - else if (in_ready) + else if (!stall) valid[i] <= valid[i - 1]; end endgenerate |
