ENTITY rf_fifo_empty IS
PORT (
  ckm 	         : in  BIT;
  nreset         : in  BIT;
  emptynext 	 : in  BIT;
  cks            : in  BIT;
  empty          : out BIT;
  vdd	         : in  BIT;
  vss	         : in  BIT
);
END rf_fifo_empty;

ARCHITECTURE VBE OF rf_fifo_empty IS
  SIGNAL latchm	 : REG_BIT REGISTER;
  SIGNAL latchs	 : REG_BIT REGISTER;

BEGIN
  ASSERT (vdd and not (vss))
  REPORT "power supply is missing on rf_fifo_empty"
  SEVERITY WARNING;

  label0 : BLOCK (ckm = '1')
  BEGIN
    latchm <= GUARDED (emptynext nand nreset);
  END BLOCK label0;

  label1 : BLOCK (cks = '1')
  BEGIN
    latchs <= GUARDED (not latchm);
  END BLOCK label1;

  empty <= (not latchs);

END;
