def test_random( dump_vcd, test_verilog ):
  tvec_random = [ [ randint(0,0xff) for i in xr(4) ] for y in xr(20) ]
  run_test_vector_sim( SortUnitFlatRTL(),
    mk_test_vector_table( 3, tvec_random ), dump_vcd, test_verilog )
def test_dups( dump_vcd, test_verilog ):
  run_test_vector_sim( SortUnitFlatRTL(), mk_test_vector_table( 3, [
    [ 2, 8, 9, 9 ], [ 2, 8, 2, 8 ], [ 1, 1, 1, 1 ]
  ]), dump_vcd, test_verilog )
def test_sorted( dump_vcd, test_verilog ):
  run_test_vector_sim( SortUnitFlatRTL(), mk_test_vector_table( 3, [
    [ 1, 2, 3, 4 ], [ 1, 3, 5, 7 ], [ 4, 3, 2, 1 ]
  ]), dump_vcd, test_verilog )
def test_stream( dump_vcd, test_verilog ):
  run_test_vector_sim( SortUnitFlatRTL(), mk_test_vector_table( 3, [
    [ 4, 3, 2, 1 ], [ 9, 6, 7, 1 ], [ 4, 8, 0, 9 ]
  ]), dump_vcd, test_verilog )
def test_random(dump_vcd, test_verilog):
    tvec_random = [[randint(0, 0xff) for i in xr(4)] for y in xr(20)]
    run_test_vector_sim(SortUnitFlatRTL(),
                        mk_test_vector_table(3, tvec_random), dump_vcd,
                        test_verilog)
def test_sorted(dump_vcd, test_verilog):
    run_test_vector_sim(
        SortUnitFlatRTL(),
        mk_test_vector_table(3, [[1, 2, 3, 4], [1, 3, 5, 7], [4, 3, 2, 1]]),
        dump_vcd, test_verilog)
def test_dups(dump_vcd, test_verilog):
    run_test_vector_sim(
        SortUnitFlatRTL(),
        mk_test_vector_table(3, [[2, 8, 9, 9], [2, 8, 2, 8], [1, 1, 1, 1]]),
        dump_vcd, test_verilog)
def test_stream(dump_vcd, test_verilog):
    run_test_vector_sim(
        SortUnitFlatRTL(),
        mk_test_vector_table(3, [[4, 3, 2, 1], [9, 6, 7, 1], [4, 8, 0, 9]]),
        dump_vcd, test_verilog)