修改配套的测试用例和程序,默认上电使用8b10b

This commit is contained in:
2025-10-13 15:56:03 +08:00
parent e4a78182df
commit 80cf9ed40b
3 changed files with 11 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ from pyutils import *
global_dev_num = 4
global_setting_dev_clk = dict()
global_using_8b10b = False
global_using_4b5b = False
global_spi_type = 0
global_cdr_type = 0
@@ -452,22 +452,22 @@ def set_spi_interface(spi_type):
global global_spi_type
global_spi_type = spi_type
def set_using_8b10b(isUsing8b10b):
global global_using_8b10b
global_using_8b10b = isUsing8b10b
def set_using_transcode(isUsing4b5b):
global global_using_4b5b
global_using_4b5b = isUsing4b5b
def set_cdr_type(cdr_type):
global global_cdr_type
global_cdr_type = cdr_type
def using_proper_workmode(dev, iface=1):
global global_using_8b10b
global global_using_4b5b
global global_spi_type
global global_cdr_type
trans_code = 0x0
if global_using_8b10b:
if global_using_4b5b:
trans_code = 0x1
return genIFRwDataCode(dev, 0x09, True, 1, [global_spi_type, ], wlog=False, iface=iface)\