Networks-on-Chips: Theory and Practice