Documentation for architecture GOL/EvtMux/a0
VHDL Contents
1 architecture a0 of EvtMux is
27
28 signal RdReqB : std_logic;
29 signal FEN : std_logic;
30 signal EndEvtInt : std_logic;
31 signal BOTEvt : std_logic;
32 signal EOTEvt : std_logic;
33 signal Hpar : std_logic;
34 signal ECnt : std_logic_vector(11 downto 0);
35 signal HeadTrail : std_logic_vector( 1 downto 0);
36 signal Fdata : std_logic_vector(31 downto 0);
37 constant ID_SEP : std_logic_vector(3 downto 0) := "1101"; constant ID_EOE : std_logic_vector(5 downto 0) := "001110"; constant ID_BOT : std_logic_vector(2 downto 0) := "101"; constant ID_EOT : std_logic_vector(3 downto 0) := "1100"; begin
48
49 EndEvt <= EndEvtInt;
50 RdReq <= RdReqB;
51
52 RdReqB <= '1' when (EmptyB = '0' and FullS = '0' and EndEvtInt = '0' and ForceIdle = '0') else '0';
54
55 BOTEvt <= '1' when (FEN = '1' and WF(31 downto 29) = ID_BOT) else '0'; EOTEvt <= '1' when (FEN = '1' and WF(31 downto 28) = ID_EOT) else '0'; EndEvtInt <= '1' when (FEN = '1' and WF(31 downto 28) = ID_SEP
63 and WF(25 downto 20) = ID_EOE) else '0'; Headtrail <= (BOTEvt & EOTEvt) when (GTMode(1) = '1') else "00";
68 with HeadTrail select Fdata <=
69 WF(31 downto 27) & '0' & WF(25) & WF(24) & ECnt & WF(11 downto 0) when "10", WF(31 downto 27) & '0' & WF(25) & WF(24) & ECnt & WF(11 downto 0) when "01", WF(31 downto 27) & '0' & WF(25 downto 0) when others;
75 prReq:
76 process (SClk, Rst_n)
77 begin
78 if (Rst_n = '0') then
79 FEN <= '0';
80 WrDS <= '0';
81 elsif (rising_edge(SClk)) then
82 FEN <= RdReqB;
85 WrDS <= FEN;
86 end if;
87 end process;
88
89 prBuf:
90 process (SClk, Rst_n)
91 begin
92 if (Rst_n = '0') then
93 DS <= (others => '0');
94 elsif (rising_edge(SClk)) then
95 if (FEN = '1') then
96 DS <= Fdata(31 downto 27) & Hpar & Fdata(25 downto 0);
97 end if;
98 end if;
99 end process;
100
101 prCnt:
102 process (SClk, Rst_n)
103 variable cnt : unsigned(11 downto 0);
104 begin
105 if (Rst_n = '0') then
106 cnt := (others => '0');
107 elsif (rising_edge(SClk)) then
108 if (GTMode(2 downto 0) = "000" or ECR = '1') then
109 cnt := (others => '0');
110 elsif (EndEvtInt = '1') then
111 cnt := cnt + 1;
112 end if;
113 end if;
114 ECnt <= std_logic_vector(cnt);
115 end process;
116
117 prPar:
126 process (Fdata, Even_Odd_n)
127 variable par : std_logic;
128 begin
129 par := not Even_Odd_n; for i in 31 downto 0 loop
131 par := par xor Fdata(i);
132 end loop;
133 Hpar <= par;
134 end process;
135
136 end architecture a0 ;