增加cdr的配置选项,可以让cdr正常工作
This commit is contained in:
@@ -5,6 +5,7 @@ global_dev_num = 4
|
||||
global_setting_dev_clk = dict()
|
||||
global_using_8b10b = False
|
||||
global_spi_type = 0
|
||||
global_cdr_type = 0
|
||||
|
||||
def bringup():
|
||||
gen_file_def = "sys_bringup"
|
||||
@@ -226,6 +227,11 @@ def __GenDevice(id, TerminateNode = False):
|
||||
+"\t.io_multiCLK_14(%s[14]),\n"%(multiclk, )
|
||||
+"\t.io_multiCLK_15(%s[15]),\n\n"%(multiclk, )
|
||||
|
||||
+"\t.io_multiCLKDiv4_0(%s[0]),\n"%(multiclk, )
|
||||
+"\t.io_multiCLKDiv4_1(%s[4]),\n"%(multiclk, )
|
||||
+"\t.io_multiCLKDiv4_2(%s[8]),\n"%(multiclk, )
|
||||
+"\t.io_multiCLKDiv4_3(%s[12]),\n\n"%(multiclk, )
|
||||
|
||||
+"\t.io_dDatIn(dDat_w[%d]),\n"%(id, )
|
||||
+"\t.io_dDatOut(%s),\n"%(dout_code, )
|
||||
+"\t.io_uDatIn(%s),\n"%(din_code, )
|
||||
@@ -450,15 +456,20 @@ def set_using_8b10b(isUsing8b10b):
|
||||
global global_using_8b10b
|
||||
global_using_8b10b = isUsing8b10b
|
||||
|
||||
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_spi_type
|
||||
global global_cdr_type
|
||||
|
||||
trans_code = 0x0
|
||||
|
||||
if global_using_8b10b:
|
||||
trans_code = 0x1
|
||||
|
||||
return genIFRwDataCode(dev, 0x09, True, 1, [global_spi_type, ], wlog=False, iface=iface)+genIFRwDataCode(dev, 0x004c, True, 2, [trans_code, 0x59], wlog = False)
|
||||
|
||||
|
||||
return genIFRwDataCode(dev, 0x09, True, 1, [global_spi_type, ], wlog=False, iface=iface)\
|
||||
+genIFRwDataCode(dev, 0x004c, True, 2, [trans_code, 0x59], wlog = False)\
|
||||
+genIFRwDataCode(dev, 0x004e, True, 2, [global_cdr_type, 0x60], wlog = False)
|
||||
|
||||
Reference in New Issue
Block a user