From 04f627b2e2dd5619dad70e7d1f36a34355bd8a6b Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Wed, 16 Aug 2017 14:22:17 +0000
Subject: [PATCH] Added c_big_endian_wb_in=TRUE, which it was by default.

---
 libraries/dsp/wpfb/tb/vhdl/tb_wpfb_unit_wide.vhd | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libraries/dsp/wpfb/tb/vhdl/tb_wpfb_unit_wide.vhd b/libraries/dsp/wpfb/tb/vhdl/tb_wpfb_unit_wide.vhd
index a798112e45..87ef454477 100644
--- a/libraries/dsp/wpfb/tb/vhdl/tb_wpfb_unit_wide.vhd
+++ b/libraries/dsp/wpfb/tb/vhdl/tb_wpfb_unit_wide.vhd
@@ -158,6 +158,8 @@ end entity tb_wpfb_unit_wide;
 
 architecture tb of tb_wpfb_unit_wide is
 
+  constant c_big_endian_wb_in      : boolean := true;
+  
   constant c_clk_period            : time := 10 ns;
   constant c_sclk_period           : time := c_clk_period / g_wpfb.wb_factor;
   
@@ -378,7 +380,11 @@ begin
       for K in 0 to c_nof_channels-1 loop  -- serial
         for S in 0 to g_wpfb.nof_wb_streams-1 loop  -- parallel
           for P in 0 to g_wpfb.wb_factor-1 loop  -- parallel
-            vP := g_wpfb.wb_factor-1-P;          -- time to big endian
+            if c_big_endian_wb_in=TRUE then
+              vP := g_wpfb.wb_factor-1-P;        -- time to big endian
+            else
+              vP := P;                           -- time in little endian
+            end if;
             if K=1 or S=1 then
               -- if present then serial channel  1 carries zero data to be able to recognize the serial channel  order in the wave window
               -- if present then parallel stream 1 carries zero data to be able to recognize the parallel stream order in the wave window
@@ -458,6 +464,7 @@ begin
 
   u_dut : entity work.wpfb_unit_dev
   generic map (
+    g_big_endian_wb_in  => c_big_endian_wb_in,
     g_wpfb              => g_wpfb,
     g_use_prefilter     => TRUE,
     g_stats_ena         => TRUE,
-- 
GitLab