lpgbtfpga_encoder.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 
20  PORT (
21  -- Data
22  data_i : in std_logic_vector(35 downto 0);
23  FEC_o : out std_logic_vector(23 downto 0);
24 
25  -- Control
26  bypass : in std_logic
27  );
28 END lpgbtfpga_encoder;
29 
35 ARCHITECTURE behavioral OF lpgbtfpga_encoder IS
36 
37  SIGNAL virtualFrame_C0 : std_logic_vector(14 downto 0);
38  SIGNAL virtualFrame_C1 : std_logic_vector(14 downto 0);
39  SIGNAL virtualFrame_C2 : std_logic_vector(14 downto 0);
40  SIGNAL virtualFrame_C3 : std_logic_vector(14 downto 0);
41 
42  SIGNAL FEC_s : std_logic_vector(23 downto 0);
43 
45  COMPONENT rs_encoder_N7K5
46  GENERIC (
47  N : integer := 7;
48  K : integer := 5;
49  SYMB_BITWIDTH : integer := 3
50  );
51  PORT (
52  -- Data
53  msg : in std_logic_vector((K*SYMB_BITWIDTH)-1 downto 0);
54  parity : out std_logic_vector(((N-K)*SYMB_BITWIDTH)-1 downto 0)
55  );
56  END COMPONENT;
57 
58 BEGIN --========#### Architecture Body ####========--
59 
60  virtualFrame_C0 <= "000000" & data_i(8 downto 0);
61  virtualFrame_C1 <= "000000" & data_i(17 downto 9);
62  virtualFrame_C2 <= "000000" & data_i(26 downto 18);
63  virtualFrame_C3 <= "000000" & data_i(35 downto 27);
64 
67  PORT MAP (
68  msg => virtualFrame_C0,
69  parity => FEC_s(5 downto 0)
70  );
71 
74  PORT MAP (
75  msg => virtualFrame_C1,
76  parity => FEC_s(11 downto 6)
77  );
78 
81  PORT MAP (
82  msg => virtualFrame_C2,
83  parity => FEC_s(17 downto 12)
84  );
85 
88  PORT MAP (
89  msg => virtualFrame_C3,
90  parity => FEC_s(23 downto 18)
91  );
92 
93  FEC_o <= FEC_s WHEN bypass = '0' ELSE (OTHERS => '0');
94 
95 END behavioral;
96 --=================================================================================================--
97 --#################################################################################################--
98 --=================================================================================================--
in msgstd_logic_vector%(%(K%*%SYMB_BITWIDTH)%-%1%%%downto%%%0%)
Message to be encoded.
lpgbtfpga_encoder - Downlink FEC encoder
rs_encoder_N7K5 - N7K5 Reed-Solomon encoder
rs_encoder_N7K5 rse0_instrse0_inst
Reed-Solomon N7K5 encoder (encodes data_i(8 downto 0))
rs_encoder_N7K5 rse1_instrse1_inst
Reed-Solomon N7K5 encoder (encodes data_i(17 downto 9))
rs_encoder_N7K5 rse3_instrse3_inst
Reed-Solomon N7K5 encoder (encodes data_i(35 downto 27))
out paritystd_logic_vector%(%((N%-%K)%*%SYMB_BITWIDTH)%-%1%%%downto%%%0%)
FEC output.
rs_encoder_N7K5 rse2_instrse2_inst
Reed-Solomon N7K5 encoder (encodes data_i(26 downto 18))