Skip to content
Snippets Groups Projects
Commit 1b00e236 authored by David Gabriel Monk's avatar David Gabriel Monk
Browse files

Update top/firmware/hdl/LinkCombiner.vhd

parent ce59d7ab
No related branches found
No related tags found
No related merge requests found
Pipeline #3174905 passed
......@@ -364,17 +364,21 @@ begin
variable bcid : std_logic_vector(12 - 1 downto 0) := (others => '0');
begin
if rising_edge(clk_p) then
if packet_start = '1' then
for i in cNumberOfFEModules - 1 downto 0 loop
status0(i*9 + 9 - 1 downto i*9) := std_logic_vector(header_in(i*cNumberOfCICs).status);
status1(i*9 + 9 - 1 downto i*9) := std_logic_vector(header_in(i*cNumberOfCICs + 1).status);
end loop;
status := status0 & status1;
status_sr <= status_sr(status_sr'high - 1 downto 0) & status;
bcid := std_logic_vector(header_in(2).bcid);
bcid_sr <= bcid_sr(bcid_sr'high - 1 downto 0) & bcid;
if unsigned(bcid_sr(bcid_sr'high)) > unsigned(bcid_sr(bcid_sr'high - 1)) then
super_id <= super_id + 1;
if output_reset = '1' then
super_id <= (others => '0');
else
if packet_start = '1' then
for i in cNumberOfFEModules - 1 downto 0 loop
status0(i*9 + 9 - 1 downto i*9) := std_logic_vector(header_in(i*cNumberOfCICs).status);
status1(i*9 + 9 - 1 downto i*9) := std_logic_vector(header_in(i*cNumberOfCICs + 1).status);
end loop;
status := status0 & status1;
status_sr <= status_sr(status_sr'high - 1 downto 0) & status;
bcid := std_logic_vector(header_in(2).bcid);
bcid_sr <= bcid_sr(bcid_sr'high - 1 downto 0) & bcid;
if unsigned(bcid_sr(bcid_sr'high)) > unsigned(bcid_sr(bcid_sr'high - 1)) then
super_id <= super_id + 1;
end if;
end if;
end if;
end if;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment