From 5ad1cf6310ed09e2c53ccd4e113d85abf763db8c Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Fri, 20 Mar 2020 11:21:39 +0100 Subject: [PATCH] L2SDP-61 : Added function RESET_DP_SOSI_CTRL(), it works in sim with dp_pipeline.vhd, but not tried on HW yet. --- libraries/base/dp/src/vhdl/dp_stream_pkg.vhd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libraries/base/dp/src/vhdl/dp_stream_pkg.vhd b/libraries/base/dp/src/vhdl/dp_stream_pkg.vhd index a9782fa140..bf43a639f3 100644 --- a/libraries/base/dp/src/vhdl/dp_stream_pkg.vhd +++ b/libraries/base/dp/src/vhdl/dp_stream_pkg.vhd @@ -233,6 +233,9 @@ PACKAGE dp_stream_pkg Is SIGNAL siso_arr : IN t_dp_siso_arr; SIGNAL ready_reg : INOUT STD_LOGIC_VECTOR); + -- Reset only the control fields of the DP sosi record + FUNCTION RESET_DP_SOSI_CTRL(sosi : t_dp_sosi) RETURN t_dp_sosi; + -- Resize functions to fit an integer or an SLV in the corresponding t_dp_sosi field width -- . Use these functions to assign sosi data TO a record field -- . Use the range selection [n-1 DOWNTO 0] to assign sosi data FROM a record field to an slv @@ -455,6 +458,17 @@ PACKAGE BODY dp_stream_pkg IS BEGIN proc_dp_siso_alert(1, clk, sosi_arr, siso_arr, ready_reg); END proc_dp_siso_alert; + + -- Reset only the control fields of the DP sosi record + FUNCTION RESET_DP_SOSI_CTRL(sosi : t_dp_sosi) RETURN t_dp_sosi IS + VARIABLE v_sosi : t_dp_sosi := sosi; + BEGIN + v_sosi.sync := '0'; + v_sosi.valid := '0'; + v_sosi.sop := '0'; + v_sosi.eop := '0'; + RETURN v_sosi; + END RESET_DP_SOSI_CTRL; -- Resize functions to fit an integer or an SLV in the corresponding t_dp_sosi field width FUNCTION TO_DP_BSN(n : NATURAL) RETURN STD_LOGIC_VECTOR IS -- GitLab