From 4f5c274bcbbbdc4e7e3c9beb04b25f91a41955e8 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 25 Oct 2024 10:15:36 -0700 Subject: [PATCH] Update to AxiStreamFrameRateLimiter.vhd adding mAxisCtrl.pause support --- axi/axi-stream/rtl/AxiStreamFrameRateLimiter.vhd | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/axi/axi-stream/rtl/AxiStreamFrameRateLimiter.vhd b/axi/axi-stream/rtl/AxiStreamFrameRateLimiter.vhd index a5c2181ef3..6e780c45f8 100644 --- a/axi/axi-stream/rtl/AxiStreamFrameRateLimiter.vhd +++ b/axi/axi-stream/rtl/AxiStreamFrameRateLimiter.vhd @@ -40,6 +40,7 @@ entity AxiStreamFrameRateLimiter is sAxisSlave : out AxiStreamSlaveType; mAxisMaster : out AxiStreamMasterType; mAxisSlave : in AxiStreamSlaveType; + mAxisCtrl : in AxiStreamCtrlType := AXI_STREAM_CTRL_UNUSED_C; -- Optional: AXI Lite Interface (axilClk domain) axilClk : in sl := '0'; axilRst : in sl := '0'; @@ -135,7 +136,8 @@ begin dataIn => writeReg(1)(0), dataOut => backpressure); - comb : process (axisRst, backpressure, r, rateLimit, sAxisMaster, txSlave) is + comb : process (axisRst, backpressure, mAxisCtrl, r, rateLimit, sAxisMaster, + txSlave) is variable v : RegType; variable i : natural; begin @@ -157,8 +159,16 @@ begin when IDLE_S => -- Update the variable if (r.rateLimit = 0) or (r.rateLimit /= r.frameCnt) then - v.tValid := '1'; + -- Check if back pressure mode + if (backpressure = '0') then + -- Accept data if not paused downstream + v.tValid := not(mAxisCtrl.pause); + else + -- Accept data + v.tValid := '1'; + end if; else + -- Blow off data v.tValid := '0'; end if;