Documentation for architecture MGTR/RxDecode/a0
VHDL Contents
1 architecture a0 of RxDecode is
23
24 constant IDLE_Data1 : std_logic_vector (15 downto 0) := x"BC50";
26 constant IDLE_Data2 : std_logic_vector (15 downto 0) := x"BCC5";
27 constant IDLE_K : std_logic_vector (1 downto 0) := "10";
28 constant CharExt_Data : std_logic_vector (15 downto 0) := x"F7F7";
30 constant CharExt_K : std_logic_vector (1 downto 0) := "11";
31 constant ErrProp_Data : std_logic_vector (15 downto 0) := x"FEFE";
33 constant ErrProp_K : std_logic_vector (1 downto 0) := "11";
34
35 constant plain : std_logic := '0';
36
37 begin
38
39 pr1:
40 process (RxClk, Rst_n)
41 begin
42 if (Rst_n = '0') then
43 RxIsValid <= '0';
44 RxIsCharExt <= '0';
45 RxIsErrProp <= '0';
46 RxD <= (others => '0');
47 elsif (rising_edge(RxClk)) then
48 if (RxInSync = '1') then
49 if ((RxCharIsK = CharExt_K) and (RxData = CharExt_Data)) then
50 RxIsValid <= '1';
51 RxIsCharExt <= '1';
52 RxIsErrProp <= '0';
53 RxD <= RxData;
54 elsif ((RxCharIsK = ErrProp_K) and (RxData = ErrProp_Data)) then
55 RxIsValid <= '1';
56 RxIsCharExt <= '0';
57 RxIsErrProp <= '1';
58 RxD <= RxData;
59 elsif (RxCharIsK /= IDLE_K) then
60 RxIsValid <= '1';
61 RxIsCharExt <= '0';
62 RxIsErrProp <= '0';
63 if (plain = '1') then
64 RxD (15 downto 0) <= RxData(15 downto 0);
70 else
71 RxD (15 downto 8) <= RxData(7 downto 0);
77 RxD (7 downto 0) <= RxData(15 downto 8);
78 end if;
79 else
80 RxIsValid <= '0';
81 RxIsCharExt <= '0';
82 RxIsErrProp <= '0';
83 end if;
85 else
86 RxIsValid <= '0';
87 RxIsCharExt <= '0';
88 RxIsErrProp <= '0';
89 end if;
91 end if;
92 end process;
93
94 end architecture a0 ;