private void readIncomingFlits() {
		m_inputPort.readInputFlit();
		Flit flit = m_inputPort.peekNextFlit();
		
		if(flit != null) {
			flit.setTimeReceived(Simulator.clock());
			m_receivedFlits.add(m_inputPort.takeNextFlit());
			console("Received flit "+flit);
			m_inputPort.incCurrVCCredits();
			
			// Only record stats once per packet, remove the packet from received
			if(flit instanceof TailFlit) {
				
				boolean gotHead = false;
				int bodyCount = 0;
				int bodySize = -1;
				for(Iterator<Flit> it  = m_receivedFlits.iterator(); it.hasNext(); ) {
					Flit f = it.next();
					if(flit.getMsgId() == f.getMsgId()) {
						if(f instanceof HeaderFlit) {
							gotHead = true;
							bodySize = ((HeaderFlit)f).getLength();
						}
						if(f instanceof BodyFlit)
							bodyCount++;
						it.remove();
					}
				}

				if(gotHead && bodyCount == bodySize) {
					Stats.retirePacket(m_nodeId, flit);
				} else {
					System.err.println("Error: incomplete packet");
				}
			}
		}
		Stats.retireFlit(m_nodeId, flit);
	}