예제 #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]))