⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pm5337_debug.tcl

📁 用于EOS芯片的驱动程序, 供参考 参考
💻 TCL
📖 第 1 页 / 共 3 页
字号:
#------------------------------------------------------------------------------# SCRIPT NAME: pm5337_debug.tcl## DESCRIPTION: 	This file includes the following procedures: ##               LINE_SONET Subsystem Loopbacks:#                 1) LINE_LD1_Loopback#                 2) LINE_LD2_Loopback#                 3) LINE_LD3_Loopback#                 3) LINE_LD4_Loopback##               SYS_SONET Subsystem Loopbacks:#                 4) ESSI_LD1_Loopback#                 5) ESSI_LD2_Loopback#            #               EOS Subsystem Loopbacks:#                 6) EOS_SD1_Loopback#                 7) EOS_SONET_CST_Loopback (EOS_LD4_Loopback)#                 8) EOS_VCAT_CST_Loopback (EOS_LD3_Loopback)#                9) EOS_BUF_SYS_Loopback#                10) EOS_GMII_SYS_Loopback#                10) EOS_GMII_CST_Loopback#                12) EOS_MAC_CST_Loopback (EOS_LD1_Loopback)#                13) EOS_GFP_CST_Loopback (EOS_LD2_Loopback)##               PDH Subsystem Loopbacks:#                14) DE1_LD1_Loopback#                15) DE1_SD1_Loopback#                16) DE3_LD1_Loopback#                17) DE3_LD2_Loopback#                18) DE3_SD1_Loopback#                19) DE3_SD2_Loopback#                20) DE3_SD3_Loopback#                21) EC1DE3_LD1_Loopback#                22) EC1DE3_SD1_Loopback#                23) M13DS3_D1_Loopback##               Others:#                24) DDR_Read#                25) DDR_Write#                26) DDR_RW_Test  #               ## NOTES:# REVISION History:# Preliminary 1 - Script created##------------------------------------------------------------------------------#------------------------------------------------------------------------------# PROC NAME:  LINE_LD1_Loopback## DESCRIPTION:  This procedure enables/disables the diagnostic loopback from the #               Rx analog logic to Tx analog logic.## PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (line interface 1), 1 (line interface 2)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc LINE_LD1_Loopback {devID port enable} {    if {$enable == 1} {    # Set reserved bit 14 and 15 in 0x1040 to 1    wr adm 0x1040 0xC000      }     if {$enable == 0} {    # Set reserved bit 14 in 0x1040 to 0    wr adm 0x1040 0x0000  }    if {$port == 0} {    # Enble Rx to Tx loopback    admwrb $devID 0x1030 14 $enable    admwrb $devID 0x1036 13 $enable    }    if {$port == 1} {    # Enble Rx to Tx loopback    admwrb $devID 0x1037 14 $enable    admwrb $devID 0x103D 13 $enable      }  }#------------------------------------------------------------------------------# PROC NAME:  LINE_LD2_Loopback## DESCRIPTION:  This procedure enables/disables the diagnostic loopback from the#               Rx Section/Line Processor to the Tx Section/Line Processor.## PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (line interface 1), 1 (line interface 2)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc LINE_LD2_Loopback {devID port enable} {     if {$port == 0 && $enable == 1} {          admwrb $devID 0x102B 3 0    admwrb $devID 0x102B 2 1        admwrb $devID 0x102B 7 0      admwrb $devID 0x102B 6 1       }      if {$port == 0 && $enable == 0} {          admwrb $devID 0x102B 3 0    admwrb $devID 0x102B 2 0                admwrb $devID 0x102B 7 0      admwrb $devID 0x102B 6 0  }  if {$port == 1 && $enable == 1} {    admwrb $devID 0x102B 11 1    admwrb $devID 0x102B 10 1        admwrb $devID 0x102B 15 0    admwrb $devID 0x102B 14 1   }  if {$port == 1 && $enable == 0} {    admwrb $devID 0x102B 11 1    admwrb $devID 0x102B 10 0        admwrb $devID 0x102B 15 0    admwrb $devID 0x102B 14 0      }     }#------------------------------------------------------------------------------# PROC NAME:  LINE_LD3_Loopback## DESCRIPTION:  This procedure enables/disables the diagnostic loopback from the#               LOPP ingress to HOPP egress## PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (line interface 1), 1 (line interface 2)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc LINE_LD3_Loopback {devID port enable} {       if {$port == 0 && $enable == 1} {          admwrb $devID 0x102B 5 0    admwrb $devID 0x102B 4 1        admwrb $devID 0x102B 7 0      admwrb $devID 0x102B 6 1       }      if {$port == 0 && $enable == 0} {          admwrb $devID 0x102B 5 0    admwrb $devID 0x102B 4 0        admwrb $devID 0x102B 7 0      admwrb $devID 0x102B 6 0      }  if {$port == 1 && $enable == 1} {    admwrb $devID 0x102B 13 1    admwrb $devID 0x102B 12 1       admwrb $devID 0x102B 15 0    admwrb $devID 0x102B 14 1      }    if {$port == 1 && $enable == 0} {    admwrb $devID 0x102B 13 1    admwrb $devID 0x102B 12 0        admwrb $devID 0x102B 15 0    admwrb $devID 0x102B 14 0        }      }#------------------------------------------------------------------------------# PROC NAME:  LINE_LD4_Loopback## DESCRIPTION:  This procedure enables/disables the diagnostic loopback from the#               LOPP ingress to HOPP egress## PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (line interface 1), 1 (line interface 2)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc LINE_LD4_Loopback {devID port enable} {       if {$port == 0 && $enable == 1} {          admwr $devID 0x102C 0x00000FFF  }      if {$port == 0 && $enable == 0} {          admwr $devID 0x102C 0x00000000  }  if {$port == 1 && $enable == 1} {    admwr $devID 0x102D 0x00000FFF  }  if {$port == 1 && $enable == 0} {    admwr $devID 0x102D 0x00000000  }  }#------------------------------------------------------------------------------# PROC NAME:  ESSI_LD1_Loopback## DESCRIPTION:  This procedure enables/disables the metallic loopback from the Rx#               to Tx analog logic#               ## PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (ESSI Link 1), 1 (ESSI Link 2), #               port - 2 (ESSI Link 3), 3 (ESSI Link 4)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc ESSI_LD1_Loopback {devID port enable} {      if {port == 0} {     admwrb $devID 0x062B 14 $enable    admwrb $devID 0x0707 13 $enable  }       if {port == 1} {     admwrb $devID 0x064B 14 $enable    admwrb $devID 0x0717 13 $enable  }   if {port == 2} {     admwrb $devID 0x066B 14 $enable    admwrb $devID 0x0727 13 $enable  }   if {port == 3} {     admwrb $devID 0x068B 14 $enable    admwrb $devID 0x0737 13 $enable  }}#------------------------------------------------------------------------------# PROC NAME:  ESSI_LD2_Loopback## DESCRIPTION:  This procedure enables/disables the diagnostic loopback from the #               output of RX MABC to input of TX MABC#               ## PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (ESSI Link 1), 1 (ESSI Link 2), #               port - 2 (ESSI Link 3), 3 (ESSI Link 4)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc ESSI_LD2_Loopback {devID port enable} {      if {$port == 0} {     admwrb $devID 0x0604 12 $enable  }    if {$port == 1} {     admwrb $devID 0x0604 13 $enable  }    if {$port == 2} {     admwrb $devID 0x0604 14 $enable  }    if {$port == 3} {     admwrb $devID 0x0604 15 $enable  }    }#------------------------------------------------------------------------------# PROC NAME:  EOS_LD1_Loopback## DESCRIPTION:  This procedure enables/disables the Client Side (LAN) loopback#               # PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (port 1) ... 7 (port 8)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc EOS_LD1_Loopback {devID port enable} {  set addr [expr 0xED09 + $port * 0x20]    admwrb $devID $addr 4 $enable}#------------------------------------------------------------------------------# PROC NAME:  EOS_SD1_Loopback## DESCRIPTION:  This procedure enables/disables the SMII system side loopback#               # PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##               port - 0 (port 1) ... 7 (port 8)##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------proc EOS_SD1_Loopback {devID port enable} {  set addr [expr 0xEF09 + $port]    admwrb $devID $addr 2 $enable}#------------------------------------------------------------------------------# PROC NAME:  EOS_SONET_CST_Loopback## DESCRIPTION:  This procedure enables/disables the SONET/SDH Client (LAN) #               Loopback#               # PARAMETERS:	devID  - This parameter is used to specify the device #                        under configuration##		enable	- 0 (disable), 1 (enable)# 		# NOTES: #------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -