diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-05-02 21:03:05 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-05-02 21:03:17 -0600 |
| commit | 405c0287c80c34b0e9dfb9d9326b86d12433b4c4 (patch) | |
| tree | ef38368c911bae30ff9c528dcf4a8fbfbc227fa7 /platform/wavelet3d/gfx_skid_flow.sv | |
| parent | 50b71c7f0ea2574eb4802e1a12fe8b0920a4ca7f (diff) | |
platform/wavelet3d: implement shader cores
This commit contains over a month of intermittent work (I don't have
enough free time to do this the right way)
Diffstat (limited to 'platform/wavelet3d/gfx_skid_flow.sv')
| -rw-r--r-- | platform/wavelet3d/gfx_skid_flow.sv | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/wavelet3d/gfx_skid_flow.sv b/platform/wavelet3d/gfx_skid_flow.sv new file mode 100644 index 0000000..7890ae3 --- /dev/null +++ b/platform/wavelet3d/gfx_skid_flow.sv @@ -0,0 +1,31 @@ +module gfx_skid_flow +( + input logic clk, + rst_n, + + input logic in_valid, + out_ready, + + output logic in_ready, + out_valid, + stall +); + + logic was_ready, was_valid; + + assign stall = ~in_ready; + assign in_ready = was_ready | ~was_valid; + assign out_valid = in_valid | stall; + + always_ff @(posedge clk or negedge rst_n) + if (~rst_n) begin + was_ready <= 0; + was_valid <= 0; + end else begin + was_ready <= out_ready; + + if (~stall) + was_valid <= in_valid; + end + +endmodule |
