Specifications
9-3
Program Examples
Testing and Gaining Pattern Synchronization
Testing and Gaining Pattern Synchronization
3250 ! determine whether the BERT's error detector has sync'd to the
3260 ! received pattern at the DATA IN port.
3270 !
3280 DEF FNSyncLs(@Bert)
3290 INTEGER QuesCond
3300 OUTPUT @Bert;“STAT:QUES:COND?”
3310 ENTER @Bert;QuesCond
3320 RETURN BIT(QuesCond,10)
3330 FNEND
3340 !
3350 ! determine whether the BERT's error detector has attempted to sync
3360 ! to the received pattern with all possible pattern bit alignment
3370 ! positions.
3380 !
3390 DEF FNFrstSyncCyc(@Bert)
3400 INTEGER QuesCond
3410 OUTPUT @Bert;“STAT:QUES:COND?”
3420 ENTER @Bert;QuesCond
3430 RETURN BIT(QuesCond,12)
3440 FNEND
3450 !
3460 ! determine whether the BERT's error detector is in sync with the
3470 ! received pattern at the DATA IN port.
3480 ! If SyncLs is asserted then re-start a sync search and await SyncLs
3490 ! being deasserted or the completion of sync attempt with all
3500 ! possible pattern bit alignment positions.
3505 ! returns 1 when in-sync
3510 ! returns 0 if SyncLs still true after 1 complete sync search
3515 !
3520 DEF FNGainSync(@Bert)
3540 IF FNSyncLs(@Bert) THEN
3550 OUTPUT @Bert;“SENSE1:SYNC ONCE” ! start sync search
3560 REPEAT
3570 WAIT .3 ! seconds
3580 UNTIL NOT FMSyncLs(@Bert) OR NOT FNFrstSyncCyc(@Bert)
3590 END IF
3600 RETURN NOT FNSyncLs(@Bert)
3610 FNEND