descrambler_53bitOrder49.vhd
Go to the documentation of this file.
1 -------------------------------------------------------
6 -------------------------------------------------------
7 
9 LIBRARY ieee;
10 USE ieee.std_logic_1164.all;
11 
13 USE work.lpgbtfpga_package.all;
14 
17  PORT (
18  -- Clocks & reset
19  clk_i : in std_logic;
20  clkEn_i : in std_logic;
21 
22  reset_i : in std_logic;
23 
24  -- Data
25  data_i : in std_logic_vector(52 downto 0);
26  data_o : out std_logic_vector(52 downto 0);
27 
28  -- Control
29  bypass : in std_logic
30  );
31 END descrambler53bitOrder49;
32 
34 ARCHITECTURE behavioral OF descrambler53bitOrder49 IS
35 
36  SIGNAL memory_register : std_logic_vector(52 downto 0);
37  SIGNAL descrambledData : std_logic_vector(52 downto 0);
38 
39  attribute keep : string;
40  attribute keep of descrambledData : signal is "true";
41  attribute keep of memory_register : signal is "true";
42 
43 BEGIN --========#### Architecture Body ####========--
44 
45  -- Scrambler output register
46  reg_proc: PROCESS(clk_i)
47  BEGIN
48 
49  IF rising_edge(clk_i) THEN
50  IF reset_i = '1' THEN
51  descrambledData <= (OTHERS => '0');
52  memory_register <= (OTHERS => '0');
53 
54  ELSIF clkEn_i = '1' THEN
55  memory_register <= data_i;
56 
57  if bypass = '1' then
58  descrambledData <= data_i;
59  else
60  descrambledData(52 downto 49) <= data_i(52 downto 49) xnor data_i(12 downto 9) xnor data_i(3 downto 0);
61  descrambledData(48 downto 40) <= data_i(48 downto 40) xnor data_i(8 downto 0) xnor memory_register(50 downto 42);
62  descrambledData(39 downto 0) <= data_i(39 downto 0) xnor memory_register(50 downto 11) xnor memory_register(41 downto 2);
63  end if;
64 
65  END IF;
66 
67  END IF;
68 
69  END PROCESS;
70 
71  data_o <= descrambledData;
72 
73 END behavioral;
74 --=================================================================================================--
75 --#################################################################################################--
76 --=================================================================================================--
descrambler53bitOrder49 - 53bit Order 49 descrambler
_library_ ieeeieee
Include the IEEE VHDL standard LIBRARY.