ENTITY rf_fifo_ptset IS
PORT (
  nop 	 : in  BIT;
  inc 	 : in  BIT;
  cks    : in  BIT;
  nreset  : in  BIT;
  ptm1   : in  BIT;
  pt     : inout BIT;
  vdd	 : in  BIT;
  vss	 : in  BIT
);
END rf_fifo_ptset;

ARCHITECTURE VBE OF rf_fifo_ptset IS
  SIGNAL latchm	 : REG_BIT REGISTER;
  SIGNAL latchs	 : REG_BIT REGISTER;
  SIGNAL ckmux     : BIT;

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

  ckmux <= nop or inc or (not nreset);
  
  label0 : BLOCK (ckmux = '1')
  BEGIN
    latchm <= GUARDED ((inc and ptm1) or (pt and nop) or (not nreset));
  END BLOCK label0;

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

  pt <= (not latchs);

END;
