Exemplo n.º 1
0
def set_mphy_reg_val(mphy_reg, val):
    smon.write(mphy_reg.get_address_decorated(), val, 'confettikanone')
Exemplo n.º 2
0
def get_mphy_reg_val(mphy_reg):
    return smon.read(mphy_reg.get_address_decorated())
Exemplo n.º 3
0
#!/usr/bin/python3

from mphy_regs import sbri_rx1_mphy_regs
import os
import math
import time

try:
    import SBriPyMonitor as smon
except:
    print('unable to load module SBriPyMonitor. exiting...')
    exit()
if not smon.connect():
    print('could not connect to sbri monitor')
    exit()

# RX1 MPHY manipulation: dev 1, Byte 2, pb->tx, ifb->rx

REG_IFB_MPHY = 42
REG_PB_MPHY = 43
REG_GEN_EYESCAN = 63
CHANNEL_NUM = 2
INTF_ID = 0

def decorate_address(param24, param16, addr):
    return addr | ((param16 & 0xff) << 16) | ((param24 & 0xff) << 24)
    
def generate_eyescan(vert_step, horz_step):
    smon.write(decorate_address(INTF_ID, CHANNEL_NUM, REG_GEN_EYESCAN), 0x10000 | (vert_step << 8) | horz_step, 'confettikanone')
    
def get_mphy_reg_val(mphy_reg):
Exemplo n.º 4
0
def generate_eyescan(vert_step, horz_step):
    smon.write(decorate_address(INTF_ID, CHANNEL_NUM, REG_GEN_EYESCAN), 0x10000 | (vert_step << 8) | horz_step, 'confettikanone')
import os
import math
import time

REG_IFB_MPHY = 42
REG_PB_MPHY = 43
REG_GEN_EYESCAN = 63
CHANNEL_NUM = 2
INTF_ID = 0

try:
    import SBriPyMonitor as smon
    if not smon.connect(): raise RuntimeError()
except:
    print(
        'Unable to load SBri module or connect to SBri monitor. Only simulation mode is supported.'
    )


def decorate_address(param24, param16, addr):
    return addr | ((param16 & 0xff) << 16) | ((param24 & 0xff) << 24)


def generate_eyescan(vert_step, horz_step):
    smon.write(decorate_address(INTF_ID, CHANNEL_NUM, REG_GEN_EYESCAN),
               0x10000 | (vert_step << 8) | horz_step, 'confettikanone')


def get_mphy_reg_val(mphy_reg):
    return smon.read(mphy_reg.get_address_decorated())