增加8b10b的测试用例,并与4b5b共享测试用例

This commit is contained in:
2025-09-09 01:21:02 +08:00
parent b51b56688a
commit 58b65da129
9 changed files with 104 additions and 9 deletions

View File

@@ -3,8 +3,7 @@ from pyutils import *
global_dev_num = 4
global_setting_dev_clk = dict()
global_using_8b10b = False
def bringup():
gen_file_def = "sys_bringup"
@@ -30,6 +29,12 @@ def bringup():
+genIFRwDataCode(2, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(3, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genIFRwDataCode(4, 0x78, True, 4, [0xff, 0xff, 0xff, 0xff])
+genMessageCode("--设置合适的底层编码4b5b or 8b10b")
+using_proper_code(0)
+using_proper_code(1)
+using_proper_code(2)
+using_proper_code(3)
+using_proper_code(4)
)
main_dev = [0x01, ]
@@ -404,4 +409,18 @@ def __gen_slv_clk(clk, ph, period):
def teardown():
#add_tc_2_runlist("")
pass
pass
def set_using_8b10b(isUsing8b10b):
global global_using_8b10b
global_using_8b10b = isUsing8b10b
def using_proper_code(dev):
global global_using_8b10b
if global_using_8b10b:
return genIFRwDataCode(dev, 0x004c, True, 2, [0x1, 0x59], wlog = False)
else:
return genIFRwDataCode(dev, 0x004c, True, 2, [0x0, 0x59], wlog = False)