From d514e092522b0da5071b59180a0f7fd97ae0217d Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 29 Sep 2022 19:49:36 +0200
Subject: [PATCH] Use c_input_rst to avoid initial X in sim.

---
 .../libraries/sdp/src/vhdl/sdp_statistics_offload.vhd     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd
index aac7778fe7..cf79a67303 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd
@@ -212,6 +212,8 @@ ARCHITECTURE str OF sdp_statistics_offload IS
     payload_err          : STD_LOGIC;
   END RECORD;
 
+  CONSTANT c_input_rst : t_input := (0, 0, (OTHERS=>'0'), 0, c_sdp_crosslets_info_rst, 0, '0');  -- to avoid initial 'X' in sim
+
   -- Offload control
   TYPE t_reg IS RECORD
     packet_count         : NATURAL RANGE 0 TO c_nof_packets_max;
@@ -230,9 +232,9 @@ ARCHITECTURE str OF sdp_statistics_offload IS
 
   SIGNAL p                        : t_parameters;
 
-  SIGNAL reg_input                : t_input;
-  SIGNAL prev_input               : t_input;
-  SIGNAL hdr_input                : t_input;
+  SIGNAL reg_input                : t_input := c_input_rst;
+  SIGNAL prev_input               : t_input := c_input_rst;
+  SIGNAL hdr_input                : t_input := c_input_rst;
 
   SIGNAL r                        : t_reg;
   SIGNAL nxt_r                    : t_reg;
-- 
GitLab