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