Exemplo n.º 1
0
def nftest_regread_expect(addr, val):
    if sim:
        #nftest_regread(addr)
        simReg.regreadstim(addr)
        simReg.regRead(addr, val)
        return 1
    else:
        read_value = hwRegLib.regread(addr)
        logfile = open(hwlog_path, 'a')
        logfile.write('Read register address ' + format(addr, '#08x') +
                      ': expected value -> ' + format(val, '#08x') +
                      ', read as -> ' + format(read_value, '#08x') + ' ')
        if (read_value == val):
            logfile.write('<<PASS>>\n')
            logfile.close()
            return 1
        else:
            logfile.write('<<FAIL>>\n')
            logfile.close()
            return 0
Exemplo n.º 2
0
def nftest_regread(addr):
    if sim:
        simReg.regreadstim(addr)
        return 0
    return hwRegLib.regread(addr)
Exemplo n.º 3
0
def nftest_regread(addr):
    if sim:
        simReg.regreadstim(addr)
        return 0
    return hwRegLib.regread(addr)
Exemplo n.º 4
0
def nftest_regread(addr):
        simReg.regreadstim(addr)
        return 0