From 46cce982e4e744270f7424c59bdb6961e7774237 Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Tue, 23 Dec 2014 13:56:45 +0000
Subject: [PATCH] Use same string lenght for all g_mode options, to avoid
 warning on always false in if statement when lengths do not match.

---
 .../ddr/src/vhdl/io_ddr_driver_flush_ctrl.vhd | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/libraries/io/ddr/src/vhdl/io_ddr_driver_flush_ctrl.vhd b/libraries/io/ddr/src/vhdl/io_ddr_driver_flush_ctrl.vhd
index 744a446edf..4d67b776a7 100644
--- a/libraries/io/ddr/src/vhdl/io_ddr_driver_flush_ctrl.vhd
+++ b/libraries/io/ddr/src/vhdl/io_ddr_driver_flush_ctrl.vhd
@@ -27,9 +27,9 @@
 --   When the io_ddr is starting a new write access, then the write input FIFO
 --   gets filled. The filling starts dependent on:
 --
---   . g_mode = "VALID" : immediately start filling on next valid data
---   . g_mode = "SOP"   : start filling on next sop
---   . g_mode = "SYNC"  : start filling on next sync
+--   . g_mode = "VAL" : immediately start filling on next valid data
+--   . g_mode = "SOP" : start filling on next sop
+--   . g_mode = "SYN" : start filling on next sync
 --
 --   . g_use_channel = TRUE : start filling when channel matches g_start_channel
 
@@ -41,7 +41,7 @@ USE dp_lib.dp_stream_pkg.ALL;
 
 ENTITY io_ddr_driver_flush_ctrl IS 
   GENERIC (
-    g_mode          : STRING := "VALID";  -- "VALID", "SOP", "SYNC"
+    g_mode          : STRING := "VAL";  -- "VAL", "SOP", "SYN"
     g_use_channel   : BOOLEAN := FALSE;
     g_start_channel : NATURAL := 0;
     g_nof_channels  : POSITIVE := 1
@@ -79,17 +79,17 @@ BEGIN
 
   -- Flush disable control
   no_channel: IF g_use_channel=FALSE GENERATE
-    gen_valid : IF g_mode="VALID" GENERATE flush_dis <= wr_sosi.valid; END GENERATE;
-    gen_sop   : IF g_mode="SOP"   GENERATE flush_dis <= wr_sosi.sop  ; END GENERATE;
-    gen_sync  : IF g_mode="SYNC"  GENERATE flush_dis <= wr_sosi.sync ; END GENERATE;
+    gen_valid : IF g_mode="VAL" GENERATE flush_dis <= wr_sosi.valid; END GENERATE;
+    gen_sop   : IF g_mode="SOP" GENERATE flush_dis <= wr_sosi.sop  ; END GENERATE;
+    gen_sync  : IF g_mode="SYN" GENERATE flush_dis <= wr_sosi.sync ; END GENERATE;
   END GENERATE;
     
   use_channel: IF g_use_channel=TRUE GENERATE
     channel <= TO_UINT(wr_sosi.channel(c_channel_w-1 DOWNTO 0));
     
-    gen_valid : IF g_mode="VALID" GENERATE flush_dis <= '1' WHEN wr_sosi.valid='1' AND channel=g_start_channel ELSE '0'; END GENERATE;
-    gen_sop   : IF g_mode="SOP"   GENERATE flush_dis <= '1' WHEN wr_sosi.sop  ='1' AND channel=g_start_channel ELSE '0'; END GENERATE;
-    gen_sync  : IF g_mode="SYNC"  GENERATE flush_dis <= '1' WHEN wr_sosi.sync ='1' AND channel=g_start_channel ELSE '0'; END GENERATE;
+    gen_valid : IF g_mode="VAL" GENERATE flush_dis <= '1' WHEN wr_sosi.valid='1' AND channel=g_start_channel ELSE '0'; END GENERATE;
+    gen_sop   : IF g_mode="SOP" GENERATE flush_dis <= '1' WHEN wr_sosi.sop  ='1' AND channel=g_start_channel ELSE '0'; END GENERATE;
+    gen_sync  : IF g_mode="SYN" GENERATE flush_dis <= '1' WHEN wr_sosi.sync ='1' AND channel=g_start_channel ELSE '0'; END GENERATE;
   END GENERATE;
 
   p_reg : PROCESS(rst, clk)
-- 
GitLab