A Method for Calculating Hard QoS Guarantees for Networks-on-Chip