Skip to content

Commit

Permalink
opt alignChecker locked flag assertion/deassertion
Browse files Browse the repository at this point in the history
  • Loading branch information
cbakalis-slac committed Oct 12, 2023
1 parent 5dc9096 commit cc5f186
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions xilinx/general/rtl/GtRxAlignCheck.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ begin
case r.state is
----------------------------------------------------------------------
when RESET_S =>
-- Set the flag
v.rst := '1';
-- Set the flags
v.rst := '1';
v.locked := '0';
-- Check the counter
if (r.rstcnt = r.rstlen) then
-- Wait for the reset transition
Expand All @@ -225,7 +226,7 @@ begin
end if;
else
-- Increment the counter
v.rstcnt := r.rstcnt+1;
v.rstcnt := r.rstcnt + 1;
end if;
----------------------------------------------------------------------
when READ_S =>
Expand All @@ -249,7 +250,7 @@ begin
-- Get the index pointer
i := conv_integer(ack.rdData(6 downto 0));
-- Increment the counter
v.sample(i) := r.sample(i)+1;
v.sample(i) := r.sample(i) + 1;
-- Save the last byte alignment check
v.last := ack.rdData(15 downto 0);
-- Check the byte alignment
Expand All @@ -266,7 +267,7 @@ begin
end if;
----------------------------------------------------------------------
when LOCKED_S =>
-- Set the flag
-- Set the flag (can now be reset only by an external resetIn/resetErr)
v.locked := '1';
----------------------------------------------------------------------
end case;
Expand All @@ -293,10 +294,7 @@ begin
v.retryCnt := (others => '0');
elsif (v.rst = '1' and r.rst = '0' and resetIn = '0' and resetErr = '0') then
-- Edge-triggered
if (allBits(r.retryCnt, '1') = false) then
-- Prevent rollover
v.retryCnt := r.retryCnt + 1;
end if;
v.retryCnt := r.retryCnt + 1;
end if;

-- Reset
Expand Down Expand Up @@ -336,3 +334,6 @@ begin
axilReadSlave => mAxilReadSlave);

end rtl;


end rtl;

0 comments on commit cc5f186

Please sign in to comment.