projects/oscope/software/ltc_setup_litex_client.py
def autoBitslip(r):
    '''
    resets IDELAY to the middle,
    fires bitslips until the frame signal reads 0xF0
    '''
    setIdelay(r, 16)
    for i in range(8):
        val = r.regs.lvds_frame_peek.read()
        print(bin(val))
        if val == 0xF0:
            print("autoBitslip(): aligned after", i)
            return
        r.regs.lvds_bitslip_csr.write(1)
    raise RuntimeError("autoBitslip(): failed alignment :(")

    resets IDELAY to the middle,
    fires bitslips until the frame signal reads 0xF0
    
resets IDELAY to the middle,
fires bitslips until the frame signal reads 0xF0
resets IDELAY to the middle fires bitslips until the frame signal reads 0xF0
def autoBitslip(r):
    setIdelay(r, 16)
    for i in range(8):
        val = r.regs.lvds_frame_peek.read()
        print(bin(val))
        if val == 0xF0:
            print("autoBitslip(): aligned after", i)
            return
        r.regs.lvds_bitslip_csr.write(1)
    raise RuntimeError("autoBitslip(): failed alignment :(")
def autoBitslip ( r ) : setIdelay ( r , 16 ) for i in range ( 8 ) : val = r . regs . lvds_frame_peek . read ( ) print ( bin ( val ) ) if val == 0xF0 : print ( "autoBitslip(): aligned after" , i ) return r . regs . lvds_bitslip_csr . write ( 1 ) raise RuntimeError ( "autoBitslip(): failed alignment :(" )
resets IDELAY to the middle,
fires bitslips until the frame signal reads 0xF0
resets IDELAY to the middle fires bitslips until the frame signal reads 0xF0
'''
    resets IDELAY to the middle,
    fires bitslips until the frame signal reads 0xF0
    '''
r