?? pm5337_pdh.tcl
字號:
set val [format "0x%04X" $val] admindwr $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN $val 0xCDF5 $spe $index if {$t1_framing == 2} { #bypass TRAN set val [expr ([admindrd $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN 0xCdf6 $spe $index] & 0xdfff)]; set val [expr ($val | 0x2000)] set val [format "0x%04X" $val] admindwr $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN $val 0xCDF6 $spe $index } } } } # Set E1 TRAN to bypass mode (Clear channel) if {$mode == 1 || $mode == 5} { # spe = 1 specifies drop path # spe = 2 specifies add path # index = 1 to 21 specifies the E1 index for {set spe 1} {$spe <= 2} {incr spe} { #set spe 1 for {set index 1} {$index <= 21} {incr index} { set index [format "0x%04X" $index] set val [expr ([admindrd $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN 0xCDF5 $spe $index] & 0xFFB7)]; if {$e1_framing == 1} { #PCM31 set val [expr ($val | 0x0040)] } elseif {$e1_framing == 0} { #puts "PMC30" set val [expr ($val | 0x0000)] } set val [expr ($val | ($crc << 3))] set val [format "0x%04X" $val] admindwr $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN $val 0xCDF5 $spe $index if {$e1_framing == 2} { set val [expr ([admindrd $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN 0xCDF8 $spe $index] & 0xDFFF)]; set val [expr ($val | (1 << 13))] set val [format "0x%04X" $val] admindwr $devID PDH_SONET::DE1_SLICE::DS1E1_TRAN $val 0xCDF8 $spe $index } } } } ############################################################################### ##### The following code is only applicable when the DS1/E1 traffic is ##### ##### routed from/to DS1/E1 Demapper/Mapper (i.e. datapath = 0) ##### ############################################################################### if {$datapath == 0} { ###################################################################### ##### Configuring RTDM block to process the proper payload types ##### ###################################################################### if {$mode == 0 || $mode == 3} { ############################################################## ### Mode 0: Mapping/demapping DS1 to/from AU3/TU11 (VT1.5) ### ### Mode 3: Mapping/demapping DS1 to/from AU4/TU11 ### ############################################################## # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [dec2hex [expr 0xCE00 + $tug2_ind]] # Set TU11 = 1, T1 = 1, PROV = 1 admwr $devID $addr 0x0000000E0 } # Configuring TU 2 to 4 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [dec2hex [expr 0xCE08 + $tug2_ind + (8*$tu_ind)]] # Set T1 = 1, PROV = 1 admwr $devID $addr 0x000000060 } } } elseif {$mode == 1 || $mode == 5} { ### Mode 1: Mapping/demapping E1 to/from AU3/TU12 ### ### Mode 5: Mapping/demapping E1 to/from AU4/TU12 (VT2) ### # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [dec2hex [expr 0xCE00 + $tug2_ind]] # Set TU11 = 0, T1 = 0, PROV = 1 admwr $devID $addr 0x000000020 } # Configuring TU 2 to 4 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [dec2hex [expr 0xCE08 + $tug2_ind + (8*$tu_ind)]] # Set T1 = 0, PROV = 1 admwr $devID $addr 0x000000020 } } ############################################# ### Setup Leakrate Table for E1 Operation ### ############################################# admwr $devID 0xCE75 0x11 admwr $devID 0xCE76 0x3B admwr $devID 0xCE75 0x12 admwr $devID 0xCE76 0x3B admwr $devID 0xCE75 0x13 admwr $devID 0xCE76 0x1D admwr $devID 0xCE75 0x14 admwr $devID 0xCE76 0x1D admwr $devID 0xCE75 0x15 admwr $devID 0xCE76 0xE admwr $devID 0xCE75 0x16 admwr $devID 0xCE76 0xE admwr $devID 0xCE75 0x17 admwr $devID 0xCE76 0x9 admwr $devID 0xCE75 0x18 admwr $devID 0xCE76 0x4 admwr $devID 0xCE75 0x19 admwr $devID 0xCE76 0x1 admwr $devID 0xCE75 0x1a admwr $devID 0xCE76 0x0 admwr $devID 0xCE61 0xC3 } elseif {$mode == 2 || $mode == 4} { ############################################################ ### Mode 2: Mapping/demapping DS1 to/from AU3/TU12 (VT2) ### ### Mode 4: Mapping/demapping DS1 to/from AU4/TU12 (VT2) ### ############################################################ # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [dec2hex [expr 0xCE00 + $tug2_ind]] # Set TU11 = 0, T1 = 1, PROV = 1 admwr $devID $addr 0x000000060 } # Configuring TU 2 to 4 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [dec2hex [expr 0xCE08 + $tug2_ind + (8*$tu_ind)]] # Set T1 = 1, PROV = 1 admwr $devID $addr 0x000000060 } } } ###################################################################### ##### Configuring TTMP block to process the proper payload types ##### ###################################################################### if {$mode == 0 || $mode == 3} { ############################################################## ### Mode 0: Mapping/demapping DS1 to/from AU3/TU11 (VT1.5) ### ### Mode 3: Mapping/demapping DS1 to/from AU4/TU11 ### ############################################################## # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCF80 + $tug2_ind] set addr [dec2hex $addr] # Set TU11 = 1, T1 = 1, PROV = 1 admwr $devID $addr 0x0000000E0 } # Configuring TU 2 to 4 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCF88 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set T1 = 1, PROV = 1 admwr $devID $addr 0x000000060 } } } elseif {$mode == 1 || $mode == 5} { ### Mode 1: Mapping/demapping E1 to/from AU3/TU12 ### ### Mode 5: Mapping/demapping E1 to/from AU4/TU12 (VT2) ### # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCF80 + $tug2_ind] set addr [dec2hex $addr] # Set TU11 = 0, T1 = 0, PROV = 1 admwr $devID $addr 0x000000020 } # Configuring TU 2 to 4 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCF88 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set T1 = 0, PROV = 1 admwr $devID $addr 0x000000020 } } } elseif {$mode == 2 || $mode == 4} { ############################################################ ### Mode 2: Mapping/demapping DS1 to/from AU3/TU12 (VT2) ### ### Mode 4: Mapping/demapping DS1 to/from AU4/TU12 (VT2) ### ############################################################ # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCF80 + $tug2_ind] set addr [dec2hex $addr] # Set TU11 = 0, T1 = 1, PROV = 1 admwr $devID $addr 0x000000060 } # Configuring TU 2 to 4 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCF88 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set T1 = 1, PROV = 1 admwr $devID $addr 0x000000060 } } } ###################################################################### ##### Configuring TTOP block to process the proper payload types ##### ###################################################################### if {$mode == 0 || $mode == 3} { ############################################################## ### Mode 0: Mapping/demapping DS1 to/from AU3/TU11 (VT1.5) ### ### Mode 3: Mapping/demapping DS1 to/from AU4/TU11 ### ############################################################## # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCE80 + $tug2_ind] set addr [dec2hex $addr] # Set CONFIG [1:0] to 11b on TU1 Control Register admwr $devID $addr 0x0000000D4 } # Configuring TU2 to TU3 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCE88 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set CONFIG [1:0] to 11b on TU2 to TU4 Control Register admwr $devID $addr 0x0000000D4 } } } if {$mode == 1 || $mode == 2 || $mode == 4 || $mode == 5 } { ############################################################ ### Mode 1: Mapping/demapping E1 to/from AU3/TU12 ### ### Mode 2: Mapping/demapping DS1 to/from AU3/TU12 (VT2) ### ### Mode 4: Mapping/demapping DS1 to/from AU4/TU12 (VT2) ### ### Mode 5: Mapping/demapping E1 to/from AU4/TU12 (VT2) ### ############################################################ # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCE80 + $tug2_ind] set addr [dec2hex $addr] # Set CONFIG [1:0] to 10b admwr $devID $addr 0x000000094 } # Configuring TU2 to TU3 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCE88 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set CONFIG [1:0] to 11b on TU2 to TU4 Control Register admwr $devID $addr 0x000000094 } } } ###################################################################### ##### Configuring TRAP block to process the proper payload types ##### ###################################################################### if {$mode == 0 || $mode == 3} { ############################################################## ### Mode 0: Mapping/demapping DS1 to/from AU3/TU11 (VT1.5) ### ### Mode 3: Mapping/demapping DS1 to/from AU4/TU11 ### ############################################################## # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCF00 + $tug2_ind] set addr [dec2hex $addr] # Set CONFIG [1:0] to 11b on TU1 Control Register admwr $devID $addr 0x0000000C0 } # Configuring TU2 to TU3 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCF08 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set CONFIG [1:0] to 11b on TU2 to TU4 Control Register admwr $devID $addr 0x0000000C0 } } } if {$mode == 1 || $mode == 2 || $mode == 4 || $mode == 5 } { ############################################################ ### Mode 1: Mapping/demapping E1 to/from AU3/TU12 ### ### Mode 2: Mapping/demapping DS1 to/from AU3/TU12 (VT2) ### ### Mode 4: Mapping/demapping DS1 to/from AU4/TU12 (VT2) ### ### Mode 5: Mapping/demapping E1 to/from AU4/TU12 (VT2) ### ############################################################ # Configuring TU 1 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { set addr [expr 0xCF00 + $tug2_ind] set addr [dec2hex $addr] # Set CONFIG [1:0] to 10b admwr $devID $addr 0x000000080 } # Configuring TU2 to TU3 Tributary Control Register for {set tug2_ind 0} {$tug2_ind <= 6} {incr tug2_ind} { for {set tu_ind 0} {$tu_ind <= 2} {incr tu_ind} { set addr [expr 0xCF08 + $tug2_ind + (8*$tu_ind)] set addr [dec2hex $addr] # Set CONFIG [1:0] to 11b on TU2 to TU4 Control Register admwr $devID $addr 0x000000080 } } } ##################################################################### ##### Configuring VTPI TimeSlot #4 for the proper payload types ##### ##################################################################### if {$mode == 0 || $mode == 3} {
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -