📄 pm5337_core_xc.tcl
字号:
#------------------------------------------------------------------------------# FILE NAME: PM5337_CORE_XC.tcl## DESCRIPTION: This file includes the following procedures:# 1) CORE_XC_Init# 2) CORE_XC_Input_MUX_Config# 3) CORE_XC_Output_MUX_Config# # NOTES:## REVISION History:# Preliminary 1 - Script created#------------------------------------------------------------------------------#------------------------------------------------------------------------------# SCRIPT NAME: CORE_XC_Init## DESCRIPTION: This procedure performs a reset of the CORE_XC# subsystem and configures the Frame Pulse Config and# CMP Config# # PARAMETERS: devID - This parameter is used to specify the device # under configuration# frame_pulse - 0 (no pulse, smart framing mode), 1 (2 kHz clock), # 2 (asynchronous 77.76 mhz frame pulse)# cmp_config - 0 (independent mode), 1 (incremental mode with CM1 active), # 2 (incremental mode with CM2 active)## NOTES:#------------------------------------------------------------------------------proc CORE_XC_Init {devID frame_pulse cmp_config} { source /usr/lib/cgi-bin/apps/tclscripts/PM5337_util.tcl ################################### ##### CORE_XC Subsystem Reset ##### ################################### admwrb $devID 0x0009 0 1 ;# Set CORE_XC to reset mode admwrb $devID 0x0009 1 1 ;# Set MASU to reset mode after 1 ;# wait 1 ms admwrb $devID 0x000A 0 0 ;# Enable CORE_XC admwrb $devID 0x000A 1 0 ;# EnabMASU to reset mode after 1 ;# wait 1 ms admwrb $devID 0x0009 0 0 ;# Set CORE_XC to normal operation admwrb $devID 0x0009 1 0 ;# Set MASU to normal operation ##################################### ##### Frame Pulse Configuration ##### ##################################### if {$frame_pulse == 0} { # No Frame Pulse, Use Smart Framing: Disable the ASSI_FP pin with ASSI_FP_DIS admwrb $devID 0x0805 18 1 } elseif {$frame_pulse == 1} { # Use 2KHz clock: Enable the ASSI_FP pin and set clock with FP2KCLK admwrb $devID 0x0805 18 0 admwrb $devID 0x0009 19 1 } elseif {$frame_pulse == 2} { # Use Asynchronous 77.76 MHz frame pulse: Enable the ASSI_FP pin and # set clock with FP2KCLK admwrb $devID 0x0805 18 0 admwrb $devID 0x0009 19 0 } ############################################################### ##### Connection Memory Page Update Trigger Configuration ##### ############################################################### if {$cmp_config == 0} { # Set Independent Mode with SW_CMP_MODE admwrb $devID 0x0817 2 0 } elseif {$cmp_config == 1} { # Set Incremental mode with SW_CMP_MODE and CM1 with SW_CMPS admwrb $devID 0x0817 2 1 admwrb $devID 0x0817 0 0 } elseif {$cmp_config == 2} { # Set Incremental mode with SW_CMP_MODE and CM2 with SW_CMPS admwrb $devID 0x0817 2 1 admwrb $devID 0x0817 0 1 } # Set RX_J0FP_DLY to 9714 admwr $devID 0x080A 0x000325F2 # Multiframe Alignment Setup admwr $devID 0x0805 0x20A40000 # Add PDH Multiframe Alignment Setup admwr $devID 0x080D 0x3255E # Add PDH Multiframe Alignment Setup admwr $devID 0x080D 0x3255E }#------------------------------------------------------------------------------# SCRIPT NAME: CORE_XC_Input_MUX_Config## DESCRIPTION: This procedure configures the input port mux to # specify the source for following data streams # # PARAMETERS: devID - This parameter is used to specify the device # under configuration # masuL1S1 - This parameter configures the source for # MASU link 1 STM-4 #1 # masuL1S2 - This parameter configures the source for# MASU link 1 STM-4 #2 # masuL1S3 - This parameter configures the source for# MASU link 1 STM-4 #3 # masuL1S4 - This parameter configures the source for# MASU link 1 STM-4 #4 ## masuL2S1 - This parameter configures the source for# MASU link 2 STM-4 #1 # masuL2S2 - This parameter configures the source for# MASU link 2 STM-4 #2 # masuL2S3 - This parameter configures the source for# MASU link 2 STM-4 #3 # masuL2S4 - This parameter configures the source for# MASU link 2 STM-4 #4 ## auxrx1 - This parameter configures the source for # AUX RX 1# auxrx2 - This parameter configures the source for# AUX RX 2# # For each parameter, the valid SRC_SEL value and the corresponding sources are:## <interface>_ | Source# SRC_SEL[4:0] |#------------------------------------------------------------------------------ # -1 | Unused (Don't Care)# 0x00 | Add ESSI link #1 STS-12/STM-4 #1 (2488.32 Mb/s)# 0x01 | Add ESSI link #1 STS-12/STM-4 #2 (2488.32 Mb/s)# 0x02 | Add ESSI link #1 STS-12/STM-4 #3 (2488.32 Mb/s) # 0x03 | Add ESSI link #1 STS-12/STM-4 #4 (2488.32 Mb/s) # 0x04 | Add ESSI link #2 STS-12/STM-4 #1 (2488.32 Mb/s) # 0x05 | Add ESSI link #2 STS-12/STM-4 #2 (2488.32 Mb/s) # 0x06 | Add ESSI link #2 STS-12/STM-4 #3 (2488.32 Mb/s) # 0x07 | Add ESSI link #2 STS-12/STM-4 #4 (2488.32 Mb/s) # 0x08 | Add ESSI link #3 STS-12/STM-4 #1 (2488.32 Mb/s) # 0x09 | Add ESSI link #3 STS-12/STM-4 #2 (2488.32 Mb/s) # 0x0A | Add ESSI link #3 STS-12/STM-4 #3 (2488.32 Mb/s) # 0x0B | Add ESSI link #3 STS-12/STM-4 #4 (2488.32 Mb/s) # 0x0C | Add ESSI link #4 STS-12/STM-4 #1 (2488.32 Mb/s) # 0x0D | Add ESSI link #4 STS-12/STM-4 #2 (2488.32 Mb/s) # 0x0E | Add ESSI link #4 STS-12/STM-4 #3 (2488.32 Mb/s) # 0x0F | Add ESSI link #4 STS-12/STM-4 #4 (2488.32 Mb/s) # 0x10 | Add ESSI link #1 (622.08 Mb/s)# 0x11 | Add ESSI link #2 (622.08 Mb/s)# 0x12 | Add ESSI link #3 (622.08 Mb/s)# 0x13 | Add ESSI link #4 (622.08 Mb/s)# 0x14 | Line Receive #1 (RX1)# 0x15 | Line Receive #2 (RX2)# 0x16 | Add Ethernet (AEOS)# 0x17 | Add PDH (APDH)# 0x18 | Add Parallel Telecom Bus (APTCB)# 0x19~0x1F | Invalid## NOTES: ##------------------------------------------------------------------------------proc CORE_XC_Input_MUX_Config {devID masuL1S1 masuL1S2 masuL1S3 masuL1S4 masuL2S1 masuL2S2 masuL2S3 masuL2S4 auxrx1 auxrx2} { source /usr/lib/cgi-bin/apps/tclscripts/PM5337_util.tcl #################################### ##### Configure Inport Port MUX #### #################################### ### MASU link 1 ### # Register 0x0A90+(m-1)*0x1 (m=1..4): CORE_XC MASU Link1 # STS-12/STM-4 #m Source Selection if {$masuL1S1 != -1} { admwr $devID 0x0A90 $masuL1S1 } if {$masuL1S2 != -1} { admwr $devID 0x0A91 $masuL1S2 } if {$masuL1S3 != -1} { admwr $devID 0x0A92 $masuL1S3 } if {$masuL1S4 != -1} { admwr $devID 0x0A93 $masuL1S4 } ### MASU link 2 ### # Register 0x0A94+(m-1)*0x1 (m=1..4): CORE_XC MASU Link2 # STS-12/STM #m Source Selection if {$masuL2S1 != -1} { admwr $devID 0x0A94 $masuL2S1 } if {$masuL2S2 != -1} { admwr $devID 0x0A95 $masuL2S2 } if {$masuL2S3 != -1} { admwr $devID 0x0A96 $masuL2S3 } if {$masuL2S4 != -1} { admwr $devID 0x0A97 $masuL2S4 } ### AURX 1 ### # CORE_XC Auxiliary Line Receive #1 Source Selection if {$auxrx1 != -1} { admwr $devID 0x0A98 $auxrx1 } ### AURX 2 ### # CORE_XC Auxiliary Line Receive #2 Source Selection if {$auxrx2 != -1} { admwr $devID 0x0A99 $auxrx2 } }#------------------------------------------------------------------------------# SCRIPT NAME: CORE_XC_Output_MUX_Config## DESCRIPTION: This procedure configures the output port mux to # specify the source for following data streams # # PARAMETERS: devID - This parameter is used to specify the device # under configuration # essi622L1 - This parameter configures the source for Drop ESSI # Link 1 (622.08 Mb/s)# essi622L2 - This parameter configures the source for Drop ESSI # Link 2 (622.08 Mb/s)# essi622L3 - This parameter configures the source for Drop ESSI # Link 3 (622.08 Mb/s)# essi622L4 - This parameter configures the source for Drop ESSI # Link 4 (622.08 Mb/s)## essi2488L1S1 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L1S2 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L1S3 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L1S4 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L2S1 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L2S2 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L2S3 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L2S4 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s) # essi2488L3S1 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s) # essi2488L3S2 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L3S3 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L3S4 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L4S1 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s) # essi2488L4S2 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s) # essi2488L4S3 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)# essi2488L4S4 - This parameter configures the source for Drop ESSI Link 1 # STS-12/STM-4 #1 (2488.32 Mb/s)## tx1 - This parameter configures the source for Line Transmit 1 # tx2 - This parameter configures the source for Line Transmit 2# dropEOS - This parameter configures the source for Drop Ethernet Interface# dropPDH - This parameter configures the source for Drop PDH Interface# dropPTCB - This parameter configures the source for Drop PTCB Interface## For each parameter, the valid SRC_SEL value and the corresponding# sources are:# # <interface>_ | Source# SRC_SEL[4:0] |# --------------------------------------------------------------------------# -1 | Unused (Don't care)# 0x00 | Add ESSI link #1 STS-12/STM-4 #1 (2488.32 Mb/s) # 0x01 | Add ESSI link #1 STS-12/STM-4 #2 (2488.32 Mb/s)# 0x02 | Add ESSI link #1 STS-12/STM-4 #3 (2488.32 Mb/s)# 0x03 | Add ESSI link #1 STS-12/STM-4 #4 (2488.32 Mb/s)# 0x04 | Add ESSI link #2 STS-12/STM-4 #1 (2488.32 Mb/s)# 0x05 | Add ESSI link #2 STS-12/STM-4 #2 (2488.32 Mb/s)# 0x06 | Add ESSI link #2 STS-12/STM-4 #3 (2488.32 Mb/s)# 0x07 | Add ESSI link #2 STS-12/STM-4 #4 (2488.32 Mb/s)# 0x08 | Add ESSI link #3 STS-12/STM-4 #1 (2488.32 Mb/s)# 0x09 | Add ESSI link #3 STS-12/STM-4 #2 (2488.32 Mb/s)# 0x0A | Add ESSI link #3 STS-12/STM-4 #3 (2488.32 Mb/s)# 0x0B | Add ESSI link #3 STS-12/STM-4 #4 (2488.32 Mb/s)# 0x0C | Add ESSI link #4 STS-12/STM-4 #1 (2488.32 Mb/s)# 0x0D | Add ESSI link #4 STS-12/STM-4 #2 (2488.32 Mb/s)# 0x0E | Add ESSI link #4 STS-12/STM-4 #3 (2488.32 Mb/s)# 0x0F | Add ESSI link #4 STS-12/STM-4 #4 (2488.32 Mb/s)# 0x10 | Add ESSI link #1 (622.08 Mb/s)# 0x11 | Add ESSI link #2 (622.08 Mb/s)# 0x12 | Add ESSI link #3 (622.08 Mb/s)# 0x13 | Add ESSI link #4 (622.08 Mb/s)# 0x14 | Line Receive #1 (RX1)# 0x15 | Line Receive #2 (RX2)# 0x16 | Add Ethernet (AEOS)# 0x17 | Add PDH (APDH)# 0x18 | Add Parallel Telecom Bus (APTCB)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -