On-line testing of routers in networks-on-chip