-- --
---------------------------------------------------------------
--- proc1: process (clock, fifo_gsr)
--- begin
--- if (fifo_gsr = '1') then
--- read_allow <= '0';
--- elsif (clock'EVENT AND clock = '1') then
--- read_allow <= read_enable AND NOT emptyg;
--- end if;
--- end process proc1;
---
--- proc2: process (clock, fifo_gsr)
--- begin
--- if (fifo_gsr = '1') then
--- write_allow <= '0';
--- elsif (clock'EVENT AND clock = '1') then
--- write_allow <= write_enable AND NOT fullg;
--- end if;
--- end process proc2;
-
write_allow <= write_enable AND NOT fullg;
read_allow <= (read_enable or read_after_write) AND NOT empty;-- ;
fcnt_allow <= write_allow XOR read_allow; -- and not read_after_write