#=========================================================================
# Mesh Unit Test
#=========================================================================

import random

from math         import sqrt
from pclib.ifcs import NetMsg

#-------------------------------------------------------------------------
# mk_msg
#-------------------------------------------------------------------------
def mk_msg( dest, src, seqnum, payload ):
  msg         = NetMsg( nrouters, nmessages, payload_nbits )
  msg.src     = src
  msg.dest    = dest
  msg.seqnum  = seqnum
  msg.payload = payload
  return msg

#-------------------------------------------------------------------------
# terminal_msgs
#-------------------------------------------------------------------------
def terminal_msgs():

  size = 8

  src_msgs  = [ [] for x in xrange( nrouters ) ]
  sink_msgs = [ [] for x in xrange( nrouters ) ]