anchor.diff:     interface PipeOut#(a) out;
   endinterface
   
  -
   module mkSerialFIFOTX(SerialFIFOTX#(a))
      provisos(Bits#(a, asize),
   	    Add#(1,a__,TMul#(2,asize)),
  
positive.code:    interface PipeOut#(a) out;
  endinterface
  
  
  interface SerialFIFOTX#(type a);
     interface PipeIn#(a) in;
     interface PipeOut#(Bit#(1)) out;
  
negative.code:    Clock clk <- exposeCurrentClock;
     Reset rst <- exposeCurrentReset;
  
     Gearbox#(asize, 1, Bit#(1)) gb <- mkNto1Gearbox(clk,rst,clk,rst);
  
     interface PipeIn in;
        
        method Action enq(a din);
  	 gb.enq(unpack(pack(din)));
        endmethod
        
        method Bool notFull() = gb.notFull;
        
     endinterface
     
     interface PipeOut out;
     
        method Bit#(1) first();
  	 return(unpack(pack(gb.first)));
        endmethod
        
        method Action deq() = gb.deq;
     
        method Bool notEmpty() = gb.notEmpty;
        
     endinterface
  endmodule
  