def concat( *args ):

  assert isinstance( args[0], Bits.Bits )

  # Calculate total new bitwidth
  nbits = sum( [ x.nbits for x in args ] )

  # Create new Bits and add each bits from bits_list to it
  concat_bits = Bits.Bits( nbits )

  begin = 0
  for bits in reversed( args ):
    concat_bits[ begin : begin+bits.nbits ] = bits
    begin += bits.nbits

  return concat_bits

#-----------------------------------------------------------------------
# reduce_and
#-----------------------------------------------------------------------
Return a Bits which is the concatenation of the Bits in bits_list.
dataset/ETHPy150Open cornell-brg/pymtl/pymtl/datatypes/helpers.py/concat