示例#1
0
def test_socket_rand_cons():
    skip_ifndef('SIM_SOCKET_TEST', 'RANDOM_TEST')

    cons = []
    cons.append(
        randomize(T_DIN,
                  'din',
                  eot_cons=['data_size == 50', 'trans_lvl1[0] == 4']))

    verif(drv(t=T_DIN, seq=rand_seq('din', 30)),
          f=qcnt(sim_cls=partial(SimSocket, run=True)),
          ref=qcnt(name='ref_model'))

    sim(extens=[partial(SVRandSocket, cons=cons)])
示例#2
0
def test_directed_cosim(cosim_cls, lvl, din_delay, dout_delay):
    seq = DIR_SEQ
    dut = get_dut(dout_delay)
    verif(drv(t=T_DIN, seq=seq) | delay_rng(din_delay, din_delay),
          f=dut(sim_cls=cosim_cls, lvl=lvl),
          ref=qcnt(name='ref_model', lvl=lvl),
          delays=[delay_rng(dout_delay, dout_delay)])
    sim()
示例#3
0
def test_random_cosim(cosim_cls, din_delay, dout_delay):
    skip_ifndef('RANDOM_TEST')
    seq = RANDOM_SEQ
    dut = get_dut(dout_delay)
    verif(drv(t=T_DIN, seq=seq) | delay_rng(din_delay, din_delay),
          f=dut(sim_cls=cosim_cls),
          ref=qcnt(name='ref_model'),
          delays=[delay_rng(dout_delay, dout_delay)])
    sim()
示例#4
0
def get_dut(dout_delay):
    @gear
    def decoupled(din, *, lvl=0, init=1, w_out=16):
        return din \
            | qcnt(running=True, lvl=lvl, init=init, w_out=w_out) \
            | decouple

    if dout_delay == 0:
        return decoupled
    return qcnt(running=True)
示例#5
0
 def decoupled(din, *, lvl=0, init=1, w_out=16):
     return din \
         | qcnt(running=True, lvl=lvl, init=init, w_out=w_out) \
         | decouple
示例#6
0
def test_synth_yosys():
    qcnt(Intf(Queue[Uint[8], 3]))
示例#7
0
def test_synth_vivado():
    qcnt(Intf(Queue[Uint[8], 3]))
示例#8
0
def test_lvl_2():
    qcnt(Intf(Queue[Uint[8], 3]), lvl=2)
示例#9
0
def test_lvl_1():
    qcnt(Intf(Queue[Uint[8], 3]))