toggle_detect_false<='0'WHENsnk_in_pp.sync='1';-- ELSE will be impossible since the toggle_detect_false may only be triggered once on the first sync
sync_detect<=snk_in.validWHEN(snk_in.sync='1'ORsnk_in_p.sync='1'ORsnk_in_pp.sync='1')ELSE'0';-- @sync, first 3 cycles would try to read from the wrong (old) RAM block, detect this problem
-- Only count sequential valid data on the same address when: address is the same as last and 1 or 2 cycles after the sync when in sync_detect; address is the same as last and past the initialisation and outside sync_detect
-- Detect a (valid) repeating address seperated by one other address past the initialisation and outside the first two cycles of a (new) sync --also @sync, one wil be true; use NOT(1 or 1) instead of (0 or 0)
-- Read RAM when subsequent addresses are not the same, when there is no toggle detected and only when the same address is not going to be written to. When a sync is detected don't read in the old RAM block.