PMC Sierra Power Screwdriver PM5358 S UNI 4x622 User Manual

PM5358 S/UNI-4x622 Driver Manual  
PM5358  
S/UNI-4X622  
DRIVER MANUAL  
PROPRIETARY AND CONFIDENTIAL  
PRELIMINARY  
ISSUE 1: APRIL, 2001  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Legal Issues  
None of the information contained in this document constitutes an express or implied warranty by  
PMC-Sierra, Inc. as to the sufficiency, fitness or suitability for a particular purpose of any such  
information or the fitness, or suitability for a particular purpose, merchantability, performance,  
compatibility with other parts or systems, of any of the products of PMC-Sierra, Inc., or any  
portion thereof, referred to in this document. PMC-Sierra, Inc. expressly disclaims all  
representations and warranties of any kind regarding the contents or use of the information,  
including, but not limited to, express and implied warranties of accuracy, completeness,  
merchantability, fitness for a particular use, or non-infringement.  
In no event will PMC-Sierra, Inc. be liable for any direct, indirect, special, incidental or  
consequential damages, including, but not limited to, lost profits, lost business or lost data  
resulting from any use of or reliance upon the information, whether or not PMC-Sierra, Inc. has  
been advised of the possibility of such damage.  
The information is proprietary and confidential to PMC-Sierra, Inc., and for its customers’  
internal use. In any event, no part of this document may be reproduced in any form without the  
express written consent of PMC-Sierra, Inc.  
© 2001 PMC-Sierra, Inc.  
PMC-2010419 (P1), ref PMC-2000459 (P2)  
Contacting PMC-Sierra  
PMC-Sierra  
8555 Baxter Place Burnaby, BC  
Canada V5A 4V7  
Tel: (604) 415-6000  
Fax: (604) 415-6200  
Document Information: [email protected]  
Corporate Information: [email protected]  
Technical Support: [email protected]  
Web Site: http://www.pmc-sierra.com  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
3
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
TABLE OF CONTENTS  
About this Manual and S/UNI-4x622...................................................................................2  
Audience....................................................................................................................2  
References ................................................................................................................2  
Revision History.........................................................................................................2  
Legal Issues...............................................................................................................3  
Contacting PMC-Sierra..............................................................................................3  
Table of Contents.................................................................................................................4  
List of Figures....................................................................................................................10  
List of Tables......................................................................................................................11  
1
2
Introduction .................................................................................................................13  
Software Architecture..................................................................................................14  
2.1 Driver External Interfaces ...........................................................................................14  
Application Programming Interface .........................................................................14  
Real-Time OS Interface...........................................................................................15  
Hardware Interface ..................................................................................................15  
2.2 Main Components.......................................................................................................15  
Module Data-Block and Device(s) Data-Blocks ......................................................16  
Interrupt-Service Routine.........................................................................................17  
Deferred-Processing Routine ..................................................................................17  
Alarms, Status and Counts ......................................................................................17  
Section Overhead....................................................................................................18  
Line Overhead .........................................................................................................18  
Path Overhead.........................................................................................................18  
Payload Processor...................................................................................................18  
Interface Configuration ............................................................................................18  
APS Configuration ...................................................................................................18  
2.3 Software States...........................................................................................................19  
Module States..........................................................................................................20  
Device States...........................................................................................................20  
2.4 Processing Flows........................................................................................................21  
Module Management...............................................................................................21  
Device Management................................................................................................21  
2.5 Interrupt Servicing.......................................................................................................22  
Calling suni4x622ISR ..............................................................................................23  
Calling suni4x622DPR.............................................................................................24  
Calling suni4x622Poll ..............................................................................................24  
3
Data Structures ...........................................................................................................26  
3.1 Constants....................................................................................................................26  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
4
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
3.2 Structures Passed by the Application .........................................................................26  
Module Initialization Vector: MIV .............................................................................26  
Device Initialization Vector: DIV...............................................................................27  
ISR Enable/Disable Mask........................................................................................28  
3.3 Structures in the Driver’s Allocated Memory...............................................................33  
Module Data Block: MDB.........................................................................................33  
Device Data Block: DDB..........................................................................................34  
3.4 Structures Passed through RTOS Buffers ..................................................................50  
Interrupt-Service Vector: ISV...................................................................................50  
Deferred-Processing Vector: DPV...........................................................................50  
3.5 Global Variable............................................................................................................51  
4
Application Programming Interface.............................................................................52  
4.1 Module Management ..................................................................................................52  
Opening the Driver Module: suni4x622ModuleOpen ..............................................52  
Closing the Driver Module: suni4x622ModuleClose................................................52  
Starting the Driver Module: suni4x622ModuleStart .................................................53  
Stopping the Driver Module: suni4x622ModuleStop................................................53  
4.2 Profile Management....................................................................................................54  
Adding an Initialization Profile: suni4x622AddInitProfile .........................................54  
Getting an Initialization Profile: suni4x622GetInitProfile..........................................54  
Deleting an Initialization Profile: suni4x622DeleteInitProfile ...................................55  
4.3 Device Management...................................................................................................55  
Adding a Device: suni4x622Add..............................................................................55  
Deleting a Device: suni4x622Delete........................................................................56  
Initializing a Device: suni4x622Init...........................................................................56  
Updating the Configuration of a Device: suni4x622Update.....................................57  
Resetting a Device: suni4x622Reset.......................................................................57  
Activating a Device: suni4x622Activate...................................................................58  
De-Activating a Device: suni4x622DeActivate ........................................................58  
4.4 Device Read and Write...............................................................................................59  
Reading from Device Registers: suni4x622Read....................................................59  
Writing to Device Registers: suni4x622Write ..........................................................59  
Reading from a block of Device Registers: suni4x622ReadBlock ..........................60  
Writing to a Block of Device Registers: suni4x622WriteBlock.................................60  
4.5 Section Overhead (SOH)............................................................................................61  
Writing the J0 Byte: suni4x622SOHWriteJ0............................................................61  
Reading and Setting the Section Trace Message :  
suni4x622SOHTraceMsg..................................................................................62  
Forcing A1 Error : suni4x622SOHForceA1..............................................................62  
Forcing B1 Error: suni4x622SOHForceB1 ..............................................................63  
Forcing OOF: suni4x622SOHForceOOF.................................................................63  
Forcing LOS: suni4x622SOHForceLOS..................................................................64  
4.6 Line Overhead (LOH)..................................................................................................64  
Configuring SF Error Monitor: suni4x622LOHSFCfg ..............................................64  
Configuring SD Error Monitor: suni4x622LOHSDCfg..............................................65  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
5
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Writing the K1K2 Byte: suni4x622LOHWriteK1K2 ..................................................65  
Reading the K1K2 Byte: suni4x622LOHReadK1K2................................................66  
Writing the S1 Byte: suni4x622LOHWriteS1 ...........................................................66  
Reading the S1 Byte: suni4x622LOHReadS1.........................................................67  
Forcing Line AIS: suni4x622LOHForceAIS .............................................................67  
Forcing B2 Error: suni4x622LOHForceB2...............................................................67  
Forcing Line RDI: suni4x622LOHForceRDI ............................................................68  
4.7 Path Overhead (RPOH, TPOH)..................................................................................68  
Retrieving and Setting the Path Trace Messages: suni4x622POHTraceMsg.........69  
Writing the J1 Byte: suni4x622TPOHWriteJ1..........................................................69  
Writing the C2 Byte: suni4x622TPOHWriteC2 ........................................................70  
Writing the New Data Flag Bits: suni4x622TPOHWriteNDF ...................................70  
Writing SS Bits: suni4x622TPOHWriteSS...............................................................71  
Inserting a Pointer Value: suni4x622TPOHInsertTxPtr ...........................................71  
Force Path BIP-8 Errors: suni4x622TPOHForceB3................................................71  
Forcing Pointer Justification: suni4x622TPOHForcePJ ..........................................72  
Forcing Path RDI: suni4x622TPOHForceRDI .........................................................72  
Forcing Path ERDI: suni4x622TPOHForceERDI ....................................................73  
Forcing Path ARDI: suni4x622TPOHForceARDI ....................................................73  
Forcing Path AIS: suni4x622TPOHForceAIS..........................................................74  
4.8 Payload Processor......................................................................................................74  
Setting Payload configuration parameters: suni4x622PyldCfg ...............................74  
4.9 Interface Configuration................................................................................................75  
Resetting the Receive/Transmit FIFO: suni4x622FIFOReset.................................75  
Configuring the Receive and Transmit FIFO: suni4x622FIFOCfg...........................75  
Configuring the System interface: suni4x622SysIntfCfg .........................................76  
Configuring the Device-Wide Line interface: suni4x622IntfLineCfg........................76  
Resetting the TFCLK DLL: suni4x622IntfSysResetTDLL........................................77  
Resetting the RFCLK DLL: suni4x622IntfSysResetRDLL.......................................77  
4.10 Automatic Protection Configuration.........................................................................78  
Configuring APS Working/Protect Mate: suni4x622APSCfg ...................................78  
Configuring the Source Channel for the Given Channel Receive Path:  
suni4x622RPCfg ...............................................................................................78  
Configuring the Source Channel for the Given Channel Transmit Path:  
suni4x622TPCfg................................................................................................79  
Enable or disable the channel APS cross connect: suni4x622APSXcnntCfg .........79  
Resetting APS Receive Link: suni4x622APSResetRxLink......................................79  
Resetting APS Transmit Link: suni4x622APSResetTxLink .....................................80  
4.11 Interrupt Service Functions......................................................................................80  
Configuring ISR Processing: suni4x622ISRConfig .................................................81  
Getting Device Interrupt Enable Mask: suni4x622GetMask....................................81  
Setting Device Interrupt Enable Mask: suni4x622SetMask ....................................81  
Clearing Device Interrupt Enable Mask: suni4x622ClrMask ...................................82  
Getting SOH Interrupt Enable Mask: suni4x622GetMaskSOH...............................82  
Setting SOH Interrupt Enable Mask: suni4x622SetMaskSOH................................83  
Clearing SOH Interrupt Enable Mask: suni4x622ClrMaskSOH ..............................83  
Getting LOH Interrupt Enable Mask: suni4x622GetMaskLOH................................84  
Setting LOH Interrupt Enable Mask: suni4x622SetMaskLOH.................................84  
Clearing LOH Interrupt Enable Mask: suni4x622ClrMaskLOH ...............................85  
Getting RPOH Interrupt Enable Mask: suni4x622GetMaskRPOH..........................85  
Setting RPOH Interrupt Enable Mask: suni4x622SetMaskRPOH...........................86  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
6
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Clearing RPOH Interrupt Enable Mask: suni4x622ClrMaskRPOH .........................86  
Getting PYLD Interrupt Enable Mask: suni4x622GetMaskPYLD............................87  
Setting PYLD Interrupt Enable Mask: suni4x622SetMaskPYLD.............................87  
Clearing PYLD Interrupt Enable Mask: suni4x622ClrMaskPYLD ...........................88  
Getting FIFO Interrupt Enable Mask: suni4x622GetMaskFIFO ..............................88  
Setting FIFO Interrupt Enable Mask: suni4x622SetMaskFIFO...............................89  
Clearing FIFO Interrupt Enable Mask: suni4x622ClrMaskFIFO..............................89  
Getting Line Interface Interrupt Enable Mask: suni4x622GetMaskIntfLine.............90  
Setting Line Interface Interrupt Enable Mask: suni4x622SetMaskIntfLine..............90  
Clearing Line Interface Interrupt Enable Mask: suni4x622ClrMaskIntfLine ............91  
Getting System Interface Interrupt Enable Mask: suni4x622GetMaskSysIntf.........91  
Setting System Interface Interrupt Enable Mask: suni4x622SetMaskSysIntf .........92  
Clearing System Interface Interrupt Enable Mask:  
suni4x622ClrMaskSysIntf..................................................................................92  
Getting APS Interrupt Enable Mask: suni4x622GetMaskAPS.................................93  
Setting APS Interrupt Enable Mask: suni4x622SetMaskAPS .................................93  
Clearing APS Interrupt Enable Mask: suni4x622ClrMaskAPS................................94  
Polling the Interrupt Status Registers: suni4x622Poll..............................................94  
Interrupt-Service Routine: suni4x622ISR ................................................................95  
Deferred-Processing Routine: suni4x622DPR........................................................95  
4.12 Alarm, Status and Counts Functions .......................................................................96  
Getting the Device Status: suni4x622GetStatusChan.............................................96  
Getting the Device Status: suni4x622GetStatusSOH..............................................96  
Getting the Device Status: suni4x622GetStatusLOH ..............................................97  
Getting the Device Status: suni4x622GetStatusRPOH ...........................................97  
Getting the Device Status: suni4x622GetStatusIntfLine..........................................98  
Getting the Device Status: suni4x622GetStatusPYLD ............................................98  
Getting the Device Counts: suni4x622GetCountsChan ..........................................99  
Getting the Device Counts: suni4x622GetCountsSOH...........................................99  
Getting the Device Counts: suni4x622GetCountsLOH .........................................100  
Getting the Device Counts: suni4x622GetCountsRPOH ......................................100  
Getting the Device Counts: suni4x622GetCountsPYLD .......................................101  
4.13 Device Diagnostics................................................................................................101  
Testing Register Accesses: suni4x622DiagTestReg .............................................101  
Enabling Line Loopbacks: suni4x622DiagLineLoop..............................................102  
Enabling Path Diagnostic Loopbacks: suni4x622DiagPathLoop ..........................102  
Enabling Data Diagnostic Loopbacks: suni4x622DiagDataLoop ..........................102  
Enabling Parallel Diagnostics Loopbacks: suni4x622DiagParaLoop....................103  
Enabling Serial Diagnostics Loopbacks: suni4x622DiagSerialLoop.....................103  
4.14 Callback Functions ................................................................................................104  
Notifying the Application of SOH Events: cbackSuni4x622SOH...........................104  
Notifying the Application of LOH Events: cbackSuni4x622LOH............................105  
Notifying the Application of RPOH Events: cbackSuni4x622RPOH......................105  
Notifying the Application of PYLD Events: cbackSuni4x622PYLD........................106  
Notifying the Application of SYSINTF Events: cbackSuni4x622SysIntf ................106  
Notifying the Application of FIFO Events: cbackSuni4x622FIFO ..........................107  
5
Hardware Interface ...................................................................................................108  
5.1 Device I/O .................................................................................................................108  
Reading from a Device Register: sysSuni4x622Read ..........................................108  
Writing to a Device Register: sysSuni4x622Write .................................................108  
Polling a Bit: sysSuni4x622PollBit.........................................................................109  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
7
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
5.2 System-Specific Interrupt Servicing..........................................................................109  
Installing the ISR Handler: sysSuni4x622ISRHandlerInstall .................................109  
ISR Handler: sysSuni4x622ISRHandler................................................................110  
DPR Task: sysSuni4x622DPRTask .......................................................................110  
Removing the ISR Handler: sysSuni4x622ISRHandlerRemove........................... 111  
6
RTOS Interface .........................................................................................................112  
6.1 Memory Allocation / De-Allocation............................................................................112  
Allocating Memory: sysSuni4x622MemAlloc.........................................................112  
Initialize Memory: sysSuni4x622MemSet..............................................................112  
Copy Memory: sysSuni4x622MemCpy .................................................................112  
Freeing Memory: sysSuni4x622MemFree ............................................................113  
6.2 Buffer Management ..................................................................................................113  
Starting Buffer Management: sysSuni4x622BufferStart ........................................113  
Getting an ISV Buffer: sysSuni4x622ISVBufferGet...............................................114  
Returning an ISV Buffer: sysSuni4x622ISVBufferRtn ...........................................114  
Getting a DPV Buffer: sysSuni4x622DPVBufferGet..............................................114  
Returning a DPV Buffer: sysSuni4x622DPVBufferRtn..........................................115  
Stopping Buffer Management: sysSuni4x622BufferStop.......................................115  
6.3 Timers .......................................................................................................................115  
Sleeping a Task: sysSuni4x622TimerSleep...........................................................115  
6.4 Preemption................................................................................................................116  
Disabling Preemption: sysSuni4x622PreemptDisable ..........................................116  
Re-Enabling Preemption: sysSuni4x622PreemptEnable......................................116  
7
Porting the S/UNI-4x622 Driver ................................................................................117  
7.1 Driver Source Files ...................................................................................................117  
7.2 Driver Porting Procedures.........................................................................................117  
Procedure 1: Porting Driver OS Extensions ..........................................................118  
Procedure 2: Porting Drivers to Hardware Platforms ............................................119  
Procedure 3: Porting Driver Application-Specific Elements...................................119  
Procedure 4: Building the Driver............................................................................120  
Appendix A: Coding Conventions....................................................................................121  
Variable Type Definitions .......................................................................................121  
Naming Conventions .............................................................................................121  
Macros...................................................................................................................122  
Constants...............................................................................................................122  
Structures...............................................................................................................122  
Functions ...............................................................................................................123  
Variables ................................................................................................................123  
File Organization....................................................................................................123  
Appendix B: Error Codes.................................................................................................125  
Appendix C: S/UNI-4x622 Events ...................................................................................126  
Section Overhead Events (SOH)...........................................................................126  
Line Overhead Events (LOH) ................................................................................126  
Path Overhead Events (RPOH).............................................................................127  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
8
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Payload Events (PYLD).........................................................................................128  
Line Interface Events (INTF_LINE) .......................................................................128  
System Interface Events (SYS_INTF)...................................................................128  
Automatic Protection Switching Events (APS) ......................................................129  
List of Terms ....................................................................................................................130  
Acronyms.........................................................................................................................131  
Index................................................................................................................................132  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
9
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
LIST OF FIGURES  
Figure 1: Driver External Interfaces...................................................................................14  
Figure 2: Driver Architecture .............................................................................................16  
Figure 3: Driver Software States .......................................................................................19  
Figure 4: Module Management Flow Diagram..................................................................21  
Figure 5: Device Management Flow Diagram...................................................................22  
Figure 6: Interrupt Service Mode.......................................................................................23  
Figure 7: Polling Service Model.........................................................................................25  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
LIST OF TABLES  
Table 1: S/UNI-4x622 Module Initialization Vector: sSUNI4x622_MIV.............................27  
Table 2: S/UNI-4x622 Device Initialization Vector: sSUNI4x622_DIV..............................27  
Table 3: S/UNI-4x622 Section Overhead (SOH) ISR Mask:  
sSUNI4x622_MASK_ISR_SOH ................................................................................29  
Table 4: S/UNI-4x622 Line Overhead (LOH) ISR Mask:  
sSUNI4x622_MASK_ISR_LOH.................................................................................29  
Table 5: S/UNI-4x622 Receive Path Overhead (RPOH) ISR Mask:  
sSUNI4x622_MASK__ISR_RPOH............................................................................30  
Table 6: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_PYLD.................................31  
Table 7: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_FIFO ..................................31  
Table 8: S/UNI-4x622 Module Data Block: sSUNI4x622_MDB........................................33  
Table 9: S/UNI-4x622 Device Data Block: sSUNI4x622_DDB .........................................34  
Table 10: S/UNI-4x622 Input/Output Configuration: sSUNI4x622_CFG_GLOBAL..........36  
Table 11: S/UNI-4x622 Channel Configuration: sSUNI4x622_CFG_CHAN.....................36  
Table 12: S/UNI-4x622 Section Overhead Configuration:  
sSUNI4x622_CFG_SOH...........................................................................................37  
Table 13: S/UNI-4x622 Line Overhead Configuration: sSUNI4x622_CFG_LOH.............37  
Table 14: S/UNI-4x622 Receive Path Overhead Configuration:  
sSUNI4x622_CFG_RPOH ........................................................................................38  
Table 15: S/UNI-4x622 Transmit Path Overhead Configuration:  
sSUNI4x622_CFG_TPOH.........................................................................................38  
Table 16: S/UNI-4x622 Payload Processor: sSUNI4x622_CFG_PYLD...........................40  
Table 17: S/UNI-4x622 FIFO Configuration: sSUNI4x622_CFG_FIFO............................41  
Table 18: S/UNI-4x622 Clock Interface Configuration: sSUNI4x622_CFG_CLK.............41  
Table 19: S/UNI-4x622 Clock Interface Configuration:  
sSUNI4x622_CFG_RALRM......................................................................................42  
Table 20: S/UNI-4x622 Line Interface Configuration:  
sSUNI4x622_CFG_INTF_LINE.................................................................................42  
Table 21: S/UNI-4x622 Global System Interface Configuration:  
sSUNI4x622_CFG_INTF_SYS_GLOBAL.................................................................43  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Table 22: S/UNI-4x622 Global Line Interface Configuration:  
sSUNI4x622_CFG_INTF_LINE_GLOBAL................................................................44  
Table 23: S/UNI-4x622 Signal Failure Configuration: sSUNI4x622_CFG_SF..................44  
Table 24: S/UNI-4x622 Signal Defect Configuration: sSUNI4x622_CFG_SD..................44  
Table 25: S/UNI-4x622 Channel Status Block: sSUNI4x622_STATUS_CHAN ...............45  
Table 26: S/UNI-4x622 Section Overhead Status: sSUNI4x622_STATUS_SOH............45  
Table 27: S/UNI-4x622 Line Overhead Status: sSUNI4x622_STATUS_LOH..................46  
Table 28: S/UNI-4x622 Receive Path Overhead Processor Status:  
sSUNI4x622_STATUS_RPOH..................................................................................46  
Table 29: S/UNI-4x622 Clock Status: sSUNI4x622_STATUS_CLK.................................47  
Table 30: S/UNI-4x622 Line Interface Status: sSUNI4x622_STATUS_INTF_LINE.........48  
Table 31: S/UNI-4x622 Counters: sSUNI4x622_CNTR_CHAN .......................................48  
Table 32: S/UNI-4x622 Section Overhead (SOH) Counters:  
sSUNI4x622_CNTR_SOH ........................................................................................48  
Table 33: S/UNI-4x622 Line Overhead (LOH) Counters:  
sSUNI4x622_CNTR_LOH.........................................................................................49  
Table 34: S/UNI-4x622 Receive Path Overhead (RPOH) Counters:  
sSUNI4x622_CNTR_RPOH......................................................................................49  
Table 35: S/UNI-4x622 Payload Processor Counters: sSUNI4x622_CNTR_PYLD.........49  
Table 36: S/UNI-4x622 Interrupt-Service Vector: sSUNI4x622_ISV ................................50  
Table 37: S/UNI-4x622 Deferred-Processing Vector: sSUNI4x622_DPV ........................51  
Table 38: Variable Type Definitions ................................................................................121  
Table 39: Naming Conventions.......................................................................................121  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Introduction  
1 INTRODUCTION  
The following sections of the S/UNI-4x622 Device Driver Design Specification describe the  
S/UNI-4x622 device driver. The code provided throughout this document is written in ANSI-C.  
This has been done to promote greater driver portability to other embedded hardware (Section 5)  
and Real-Time Operating System (RTOS) environments (Section 6).  
Section 2 of this document, Software Architecture, defines the software architecture of the  
S/UNI-4x622 device driver by including a discussion of the driver’s external interfaces and its  
main components. The Data Structure information in Section 3 describes the elements of the  
driver that either configure or control its behavior. Included here are the constants, variables, and  
structures that the S/UNI-4x622 device driver uses to store initialization, configuration, and status  
information. Section 4 provides a detailed description of each function that is a member of the  
S/UNI-4x622 driver Application Programming Interface (API). This section outlines function  
calls that hide device-specific details and application callbacks that notify the user of significant  
device events.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
2 SOFTWARE ARCHITECTURE  
This section describes the software architecture of the S/UNI-4x622 device driver. This includes a  
discussion of the driver’s external interfaces and its main components.  
2.1 Driver External Interfaces  
Figure 1 illustrates the external interfaces defined for the S/UNI-4x622 device driver.  
Figure 1: Driver External Interfaces  
Application  
Function Calls  
Application Callbacks  
Service Callbacks  
S/UNI-4x622 Device Driver  
RTOS  
Service Calls  
Register  
Accesses  
Hardware  
Interrupts  
S/UNI-4x622 Devices  
Application Programming Interface  
The driver Application Programming Interface (API) is a list of high-level functions that can be  
invoked by application programmers to configure, control and monitor S/UNI-4x622 devices.  
The API functions perform operations that are more meaningful from a system’s perspective. The  
API includes functions such as:  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
14  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Initialize the device(s)  
Perform diagnostic tests  
Validate configuration information  
Retrieve status and counts information  
The driver API functions use the services of the other driver components to provide this system-  
level functionality to the application programmer.  
The driver API also consists of callback routines that are used to notify the application of  
significant events that take place within the device(s) and module.  
Real-Time OS Interface  
The driver’s RTOS interface provides functions that let the driver use RTOS services. The driver  
requires the memory, interrupt, and preemption services from the RTOS. The RTOS interface  
functions perform the following tasks for the driver:  
Allocate and de-allocate memory  
Manage buffers for the ISR and the DPR  
Enable and disable preemption  
The RTOS interface also includes service callbacks. These are functions installed by the driver  
using RTOS service calls such as installing interrupts. These service callbacks are invoked when  
an interrupt occurs.  
Note: You must modify RTOS interface code to suit your RTOS.  
Hardware Interface  
The hardware interface provides functions that read from and write to the device registers. The  
hardware interface also provides a template for an ISR that the driver calls when the device raises  
a hardware interrupt. You must modify this function based on the interrupt configuration of your  
system.  
2.2 Main Components  
Figure 2 illustrates the top level architectural components of the S/UNI-4x622 device driver. This  
applies in both polled and interrupt driven operation. In polled operation the ISR is called  
periodically. In interrupt operation the interrupt directly triggers the ISR.  
The driver includes eight main components:  
Module and device(s) data-blocks  
Interrupt-service routine  
Deferred-processing routine  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
15  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Alarm, status and counts  
Section Overhead  
Line Overhead  
Path Overhead  
Payload Processor  
Interface Configuration  
APS Configuration  
Figure 2: Driver Architecture  
Application  
Function  
Calls  
Application  
Callbacks  
Driver API  
APS Configuration  
Alarm, Status &  
Statistics  
Deferred  
Processing  
Routine  
Section Overhead  
Line Overhead  
Diagnostics  
Module  
Data Block  
Interrupt  
Context  
Path Overhead  
Device Data Blocks  
Interrupt  
Service  
Routine  
Payload Processor  
Interface Configuration  
.......  
Hardware Interface  
Hardware  
Interrupts  
Register  
Accesses  
S/UNI-4x622 Devices  
Module Data-Block and Device(s) Data-Blocks  
The Module Data-Block (MDB) is the top layer data structure, created by the S/UNI-4x622 driver  
to store context information about the driver module, such as:  
Module state  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
16  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Maximum number of devices  
The DDB(s)  
The Device Data-Block (DDB) is contained in the MDB, and initialized by the driver module for  
each S/UNI-4x622 device that is registered. There is one DDB per device and there is a limit on  
the number of DDBs, and that limit is set by the USER when the module is initialized. The DDB  
is used to store context information about one device, such as:  
Device state  
Control information  
Initialization parameters  
Callback function pointers  
Interrupt-Service Routine  
The S/UNI-4x622 driver provides an ISR called suni4x622ISR that checks if there is any valid  
interrupt condition present for the device. This function can be used by a system-specific  
interrupt-handler function to service interrupts raised by the device.  
The low-level interrupt-handler function that traps the hardware interrupt and calls  
suni4x622ISR is system and RTOS dependent. Therefore, it is outside the scope of the driver.  
Example implementations of an interrupt handler and functions that install and remove it are  
provided as a reference in section 5.2. You can customize these example implementations to suit  
your specific needs.  
See section 2.5 for a detailed explanation of the ISR and interrupt-servicing model.  
Deferred-Processing Routine  
The S/UNI-4x622 driver provides a DPR called suni4x622DPR that processes any interrupt  
condition gathered by the ISR for that device. Typically, a system specific function, which runs as  
a separate task within the RTOS, will call suni4x622DPR.  
Example implementations of a DPR task and functions that install and remove it are provided as a  
reference in section 5.2. You can customize these example implementations to suit your specific  
needs.  
See section 2.5 for a detailed explanation of the DPR and interrupt-servicing model.  
Alarms, Status and Counts  
The alarm, status and counts section is responsible for monitoring alarms, tracking devices status  
information and retrieving counts for each device registered with (added to) the driver.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
17  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Section Overhead  
The Section Overhead section provides functions to control and monitor the section overhead  
processing. Read / Write access is given to the section trace message (J0). This message is  
compared with a configurable reference and mismatches are reported. Section BIP-8 (B1) errors  
are accumulated in a counter that can be read. Section overhead alarms are detected and reported.  
For diagnostic purposes, errors can be introduced in the section overhead bytes.  
Line Overhead  
The Line Overhead section provides functions to configure and monitor the line overhead on both  
the receive and transmit sides. Read / Write access is given to the APS bytes (K1 and K2) and  
most other overhead bytes. Line BIP-8 (B2) errors are accumulated in a counter that can be read.  
Line overhead alarms are detected and reported. For diagnostic purposes, errors can be introduced  
in the line overhead bytes. Additional functions are provided to automatically insert line RDI and  
line AIS.  
Path Overhead  
The Path Overhead section provides functions to configure and monitor the path overhead on  
both the receive and transmit sides. Read / Write access is given to the path trace message (J1)  
and the path signal label (C2). Both are compared with a configurable reference and mismatches  
are reported. Path BIP-8 (B3) errors and REI are accumulated in a counter that can be read. Path  
overhead alarms are detected and reported. For diagnostic purposes, errors can be introduced in  
the path overhead bytes. Additional functions are provided to automatically insert path AIS, and  
force generation of individual outgoing justification events.  
Payload Processor  
The Payload Processor section provides functions to configuring the payload for ATM or POS  
processing. Function is provided to configure ATM/POS processing.  
Interface Configuration  
The Interface Configuration section provides functions to configure the FIFO, line and system  
side interface for ATM or POS mode. Functions are provided for FIFO management to separate  
the line side timing from the higher layer ATM/POS link layer timing. The Line interface is  
responsible for receive/transmit line clock configuration. The System interface is responsible for  
configuring the system to UTOPIA Level 3 or POS-PHY Level 3 interface for either ATM or POS  
application.  
APS Configuration  
The APS Configuration section provides function to configure the operating mode for the device  
to either a protect or working mate in a APS failover condition.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
18  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
2.3 Software States  
Figure 3 shows the software state diagram for the S/UNI-4x622 driver. State transitions occur on  
the successful execution of the corresponding transition functions shown. State information helps  
maintain the integrity of the MDB and DDB(s) by controlling the set of operations allowed in  
each state.  
Figure 3: Driver Software States  
suni4x622ModuleOpen  
Idle  
Start  
suni4x622ModuleClose  
suni4x622ModuleStop  
suni4x622ModuleClose  
suni4x622ModuleStart  
Ready  
MODULE STATES  
Start  
suni4x622Add  
suni4x622Delete  
Present  
suni4x622Reset  
suni4x622Reset  
suni4x622Init  
suni4x622Activate  
Inactive  
Active  
suni4x622DeActivate  
PER-DEVICE STATES  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
19  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Module States  
The following is a description of the S/UNI-4x622 module states. See section 4.1 for a detailed  
description of the API functions that are used to change the module state.  
Start  
The driver module has not been initialized. In this state the driver does not hold any RTOS  
resources (memory, timers, etc); has no running tasks, and performs no actions.  
Idle  
The driver module has been initialized successfully. The Module Initialization Vector (MIV) has  
been validated, the Module Data Block (MDB) has been allocated and loaded with current data,  
the per-device data structures have been allocated, and the RTOS has responded without error to  
all the requests sent to it by the driver.  
Ready  
This is the normal operating state for the driver module. This means that all RTOS resources have  
been allocated and the driver is ready for devices to be added. The driver module remains in this  
state while devices are in operation.  
Device States  
The following is a description of the S/UNI-4x622 per-device states. The state that is mentioned  
here is the software state as maintained by the driver, and not as maintained inside the device  
itself. See section 4.3 for a detailed description of the API functions that are used to change the  
per-device state.  
Start  
The device has not been initialized. In this state the device is unknown by the driver and performs  
no actions. There is a separate flow for each device that can be added, and they all start here.  
Present  
The device has been successfully added. A Device Data Block (DDB) has been associated to the  
device and updated with the user context, and a device handle has been given to the USER. In this  
state the device performs no actions.  
Inactive  
In this state the device is configured but all data functions are de-activated including interrupts  
and alarms, as well as status and counts functions.  
Active  
This is the normal operating state for the device. In this state, interrupt servicing or polling is  
enabled.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
20  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
2.4 Processing Flows  
This section describes the main processing flows of the S/UNI-4x622 driver components.  
The flow diagrams presented here illustrate the sequence of operations that take place for  
different driver functions. The diagrams also serve as a guide to the application programmer by  
illustrating the sequence in which the application must invoke the driver API.  
Module Management  
The following diagram illustrates the typical function call sequences that occur when initializing  
or shutting down the S/UNI-4x622 driver module.  
Figure 4: Module Management Flow Diagram  
START  
Performs module level initialization of the driver. Validates the Module  
Initialization Vector (MIV). Allocates memory for the MDB and all its  
components (i.e. all the memory needed by the driver) and then initializes  
suni4x622ModuleOpen  
the contents of the MDB with the validated MIV.  
Performs module level startup of the driver. This involves allocating RTOS  
suni4x622ModuleStart  
suni4x622AddInitProfile  
resources such as semaphores and timers and installing the ISR handler  
and DPR task.  
Register an initialization profile. This allows the user to store pre-defined  
parameter vectors that are validated ahead of time. When the device-  
initialization function is invoked only a profile number need to be passed.  
This method simplifies and expedites the above operations.  
Perform all device level functions here (add, init, activate, de-activate,  
reset, delete,...)  
De-register an initialization profile previously registered with the driver.  
suni4x622DeleteInitProfile  
Performs Module level shutdown of the driver. This involves deleting all  
devices currently installed and de-allocating all timers and semaphores as  
well as removing the ISR handler and DPR task.  
suni4x622ModuleStop  
suni4x622ModuleClose  
Performs module level shutdown of the driver. De-allocates all the driver's  
memory.  
END  
Device Management  
The following figure shows the typical function call sequences that the driver uses to add,  
initialize, re-initialize, and delete the S/UNI-4x622 device.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
21  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Figure 5: Device Management Flow Diagram  
START  
Detects the new device in hardware, assigns a DDB to the new device  
andstores the user's context for the device. Returns a device handle to  
the user  
suni4x622Add  
suni4x622Init  
Applies a reset to the device and initializes the device registers  
and associated RAMs based on the DIV passed by the user. The  
user may only pass a profile number, which corresponds to a  
previously saved & validated set of configurations (by using  
suni4x622AddInitProfile  
)
Prepares the device for normal operation by enabling interrupts and  
other global enables. ISR routines are installed when the module is  
started using sysSuni4x622ISRHandlerInstall. The device is now  
operational and all other API can be invoked.  
suni4x622Activate  
In order to re-initialize the device, reset the device using  
suni4x622Reset and go through the initialization sequence  
again.  
suni4x622Reset  
De-activates the device and removes it from normal operation.  
This involves disabling the device interrupts. ISR routines for this  
device are removed usingsysSuni4x622ISRHandlerRemove  
when the module is closed.  
suni4x622DeActivate  
suni4x622Reset  
Applies a software reset to the device to put it in its default startup  
state.  
Removes the device from the list of devices being controlled by the  
S/UNI-4x622 driver. This function de-allocates the device context  
information for the device being deleted.  
suni4x622Delete  
END  
2.5 Interrupt Servicing  
The S/UNI-4x622 driver services device interrupts using an Interrupt-Service Routine (ISR) that  
traps interrupts, and a Deferred-Processing Routine (DPR) that actually processes the interrupt  
conditions and clears them. This lets the ISR execute quickly and exit. Most of the  
time-consuming processing of the interrupt conditions is deferred to the DPR by queuing the  
necessary interrupt-context information to the DPR task. The DPR function runs in the context of  
a separate task within the RTOS.  
Note: Since the DPR task processes potentially serious interrupt conditions, you should set the  
DPR task’s priority higher than the application task interacting with the S/UNI-4x622 driver.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
22  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
The driver provides system-independent functions, suni4x622ISR and suni4x622DPR. You  
must fill in the corresponding system-specific functions, sysSuni4x622ISRHandler and  
sysSuni4x622DPRTask. The system-specific functions isolate the system-specific  
communication mechanism (between the ISR and DPR) from the system-independent functions,  
suni4x622ISR and suni4x622DPR.  
Figure 6 illustrates the interrupt service model used in the S/UNI-4x622 driver design.  
Figure 6: Interrupt Service Mode  
Interrupt  
Indication  
Callbacks  
sysSuni4x622ISRHandler  
Context  
Information  
sysSuni4x622DPRTask  
Application  
suni4x622ISR  
suni4x622DPR  
Note: Instead of using an interrupt service model, you can use a polling service model in the  
S/UNI-4x622 driver to process the device’s event-indication registers (see page 26).  
Calling suni4x622ISR  
An interrupt handler function, which is system dependent, must call suni4x622ISR. But first,  
the low-level interrupt-handler function must trap the device interrupts. You must implement this  
function to fit your own system. As a reference, an example implementation of the interrupt  
handler (sysSuni4x622ISRHandler) appears on page 110. You can customize this example  
implementation to suit your needs.  
The interrupt handler that you implement (sysSuni4x622ISRHandler) is installed in the  
interrupt vector table of the system processor. It is called when one or more S/UNI-4x622 devices  
interrupt the processor. The interrupt handler then calls suni4x622ISR for each device in the  
active state that has interrupt processing enabled.  
The suni4x622ISR function reads from the master interrupt-status registers and the  
miscellaneous interrupt-status registers of the S/UNI-4x622. If at least one valid interrupt  
condition is found then suni4x622ISR fills an Interrupt-Service Vector (ISV) with this status  
information as well as the current device handle. The suni4x622ISR function also clears and  
disables all the device’s interrupts detected. The sysSuni4x622ISRHandler function is then  
responsible to send this ISV buffer to the DPR task.  
Note: Normally you should save the status information for deferred processing by implementing a  
message queue. The interrupt handler sends the status information to the queue by the  
sysSuni4x622ISRHandler.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
23  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Calling suni4x622DPR  
The sysSuni4x622DPRTask function is a system specific function that runs as a separate task  
within the RTOS. You should set the DPR task’s priority higher than the application task(s)  
interacting with the S/UNI-4x622 driver. In the message-queue implementation model, this task  
has an associated message queue. The task waits for messages from the ISR on this message  
queue. When a message arrives, sysSuni4x622DPRTask calls the DPR (suni4x622DPR) with  
the received ISV.  
Then suni4x622DPR processes the status information and takes appropriate action based on the  
specific interrupt condition detected. The nature of this processing can differ from system to  
system. Therefore, suni4x622DPR calls different indication callbacks for different interrupt  
conditions.  
Typically, you should implement these callback functions as simple message posting functions  
that post messages to an application task. However, you can implement the indication callback to  
perform processing within the DPR task context and return without sending any messages. In this  
case, ensure that this callback function does not call any API functions that would change the  
driver’s state, such as suni4x622Delete. Also, ensure that the callback function is  
non-blocking because the DPR task executes while S/UNI-4x622 interrupts are disabled. You can  
customize these callbacks to suit your system. See page 103 for example implementations of the  
callback functions.  
Note: Since the suni4x622ISR and suni4x622DPR routines themselves do not specify a  
communication mechanism, you have full flexibility in choosing a communication mechanism  
between the two. A convenient way to implement this communication mechanism is to use a  
message queue, which is a service that most RTOSs provide.  
You must implement the two system specific functions, sysSuni4x622ISRHandler and  
sysSuni4x622DPRTask. When the driver calls sysSuni4x622ISRHandlerInstall, the  
application installs sysSuni4x622ISRHandler in the interrupt vector table of the processor,  
and the sysSuni4x622DPRTask function is spawned as a task by the application. The  
sysSuni4x622ISRHandlerInstall function also creates the communication channel between  
sysSuni4x622ISRHandler and sysSuni4x622DPRTask. This communication channel is  
most commonly a message queue associated with the sysSuni4x622DPRTask.  
Similarly, during removal of interrupts, the driver removes sysSuni4x622ISRHandler from  
the microprocessor’s interrupt vector table and deletes the task associated with  
sysSuni4x622DPRTask.  
As a reference, this manual provides example implementations of the interrupt installation and  
removal functions on pages 109 and 111. You can customize these prototypes to suit your specific  
needs.  
Calling suni4x622Poll  
Instead of using an interrupt service model, you can use a polling service model in the S/UNI-  
4x622 driver to process the device’s event-indication registers.  
Figure 7 illustrates the polling service model used in the S/UNI-4x622 driver design.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
24  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Software Architecture  
Figure 7: Polling Service Model  
Indication  
Callbacks  
suni4x622Poll  
Interrupt Context  
Information  
Application  
suni4x622ISR  
suni4x622DPR  
In polling mode, the application is responsible for calling suni4x622Poll often enough to  
service any pending error or alarm conditions. When suni4x622Poll is called, the  
suni4x622ISR function is called internally.  
The suni4x622ISR function reads from the master interrupt-status registers and the  
miscellaneous interrupt-status registers of the S/UNI-4x622. If at least one valid interrupt  
condition is found then suni4x622ISR fills an Interrupt-Service Vector (ISV) with this status  
information as well as the current device handle. In polling mode, this ISV buffer is passed to the  
DPR task by calling suni4x622DPR internally.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
25  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
3 DATA STRUCTURES  
This section describes the elements of the driver that configure or control its behavior, and should  
therefore be of interest to the application programmer. Included here are the constants, variables  
and structures that the S/UNI-4x622 device driver uses to store initialization, configuration and  
counts information. The channel number starts from 0. The structure contains arrays of four  
elements, where index 0 corresponds to the first channel and index 3 corresponds to the fourth  
channel. For more information on our naming convention, the reader is referred to Appendix A  
(page 121).  
3.1 Constants  
The following Constants are used throughout the driver code:  
<S/UNI-4x622 ERROR CODES>: error codes used throughout the driver code, returned by  
the API functions and used in the global error number field of the MDB and DDB. For a  
complete list of error codes, see Appendix B (page 125).  
SUNI4x622_MAX_DEVS: defines the maximum number of devices that can be supported by  
this driver. This constant must not be changed without a thorough analysis of the  
consequences to the driver code  
SUNI4x622_MOD_START, SUNI4x622_MOD_IDLE, SUNI4x622_MOD_READY: the three  
possible module states (stored in stateModule)  
SUNI4x622_START, SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE: the four possible device states (stored in stateDevice)  
3.2 Structures Passed by the Application  
These structures are defined for use by the application and are passed as argument to functions  
within the driver. These structures are the Module Initialization Vector (MIV), the Device  
Initialization Vector (DIV) and the ISR mask.  
Module Initialization Vector: MIV  
Passed via the suni4x622ModuleOpen call, this structure contains all the information needed  
by the driver to initialize and connect to the RTOS.  
maxDevs is used to inform the driver how many devices will be operating concurrently  
during this session. The number is used to calculate the amount of memory that will be  
allocated to the driver. The maximum value that can be passed is SUNI4x622_MAX_DEVS  
(see section 3.1).  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
26  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Table 1: S/UNI-4x622 Module Initialization Vector: sSUNI4x622_MIV  
Field Name  
Field Type Field Description  
perrModule  
INT4 *  
UINT2  
(pointer to) errModule (see description in the MDB)  
Maximum number of devices supported during this session  
Maximum number of initialization profiles  
maxDevs  
maxInitProfs UINT2  
Device Initialization Vector: DIV  
Passed via the suni4x622Init call, this structure contains all the information needed by the  
driver to initialize a S/UNI-4x622 device. This structure is also passed via the  
suni4x622SetInitProfile call when used as an initialization profile.  
valid indicates that this initialization profile has been properly initialized and may be used  
by the USER. This field should be ignored when the DIV is passed directly.  
pollISR is a flag that indicates the type of interrupt servicing the driver is to use. The  
choices are ‘polling’ (SUNI4x622_POLL_MODE), and ‘interrupt driven’  
(SUNI4x622_ISR_MODE). When configured in polling the interrupt capability of the device  
is NOT used, and the USER is responsible for calling suni4x622Poll periodically. The  
actual processing of the event information is the same for both modes.  
cbackSOH, cbackLOH, cbackRPOH, cbackPYLD, cbackFIFO, cbackIntfSys,  
cbackIntfLine and cbackAPS are used to pass the address of application functions that  
will be used by the DPR to inform the application code of pending events. If these fields are  
set as NULL, then any events that might cause the DPR to ‘call back’ the application will be  
processed during ISR processing but ignored by the DPR.  
Table 2: S/UNI-4x622 Device Initialization Vector: sSUNI4x622_DIV  
Field Name  
Field Type  
Field Description  
valid  
UINT2  
Indicates that this structure is valid  
Indicates the type of ISR / polling to do  
pollISR  
eSUNI4x622_ISR_MODE  
sSUNI4x622_CBACK  
cbackSOH  
Address for the callback function for SOH  
events  
cbackLOH  
sSUNI4x622_CBACK  
sSUNI4x622_CBACK  
Address for the callback function for LOH  
events  
cbackRPOH  
Address for the callback function for  
RPOH events  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
27  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
Field Type  
Field Description  
cbackPYLD  
sSUNI4x622_CBACK  
Address for the callback function for  
PYLD events  
cbackFIFO  
sSUNI4x622_CBACK  
Address for the callback function for FIFO  
events  
cbackIntfLine sSUNI4x622_CBACK  
Address for the callback function for Line  
Interface events  
cbackIntfSys  
cbackAPS  
sSUNI4x622_CBACK  
sSUNI4x622_CBACK  
Address for the callback function for  
System Interface events  
Address for the callback function for APS  
events  
cfgGlobal  
sSUNI4x622_CFG_GLOBAL  
sSUNI4x622_CFG_CHAN  
Global configuration block  
cfgChan[4]  
Channel configuration block (4 channels  
per device)  
ISR Enable/Disable Mask  
Passed via the suni4x622SetMask, suni4x622GetMask and suni4x622ClrMask calls, this  
structure contains all the information needed by the driver to enable and disable any of the  
interrupts in the S/UNI-4x622.  
Table 3: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR  
Field Name  
Field Type  
Field Description  
maskIntfSys  
sSUNI4x622_MASK_ISR  
_INTF_SYS  
Interrupt mask for System Interface  
maskChan[4]  
maskAPS[4]  
sSUNI4x622_MASK_ISR  
_CHAN  
Interrupt mask for each channel (4 channels  
per device)  
sSUNI4x622_MASK_ISR  
_APS  
Interrupt mask for each channel in the APS  
link (4 APS channels per device)  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
28  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Table 4: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_CHAN  
Field Name  
Field Type  
Field Description  
maskSOH  
sSUNI4x622_MASK_ISR_  
SOH  
Interrupt mask for Section Overhead section  
Interrupt mask for Line Overhead section  
maskLOH  
sSUNI4x622_MASK_ISR_  
LOH  
maskRPOH  
sSUNI4x622_MASK_ISR_  
RPOH  
Interrupt mask for Receive Path Overhead  
section  
maskPYLD  
maskFIFO  
sSUNI4x622_MASK_ISR_  
PYLD  
Interrupt mask for Payload Processor section  
sSUNI4x622_MASK_ISR_  
FIFO  
Interrupt mask for FIFO Configuration  
section  
maskIntfLine sSUNI4x622_MASK_ISR_  
INTF_LINE  
Interrupt mask for Line Interface section  
Table 3: S/UNI-4x622 Section Overhead (SOH) ISR Mask: sSUNI4x622_MASK_ISR_SOH  
Field Name  
oof  
Field Type  
UINT2  
Field Description  
Out of frame  
lof  
UINT2  
Loss of frame  
los  
UINT2  
Loss of signal  
sbipe  
tiu  
UINT2  
Section BIP error  
Section trace unstable  
Section trace mismatch  
UINT2  
tim  
UINT2  
Table 4: S/UNI-4x622 Line Overhead (LOH) ISR Mask: sSUNI4x622_MASK_ISR_LOH  
Field Name  
lais  
Field Type  
UINT2  
Field Description  
Line alarm signal  
Line remote defect  
lrdi  
UINT2  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
29  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
psbf  
Field Type  
UINT2  
Field Description  
APS byte failure  
coaps  
UINT2  
Change of APS bytes  
Change of synchronization status message  
Line BIP error  
coz1s1  
lbipe  
UINT2  
UINT2  
lreie  
UINT2  
Line REI error  
sdber  
UINT2  
Signal Defect  
sfber  
UINT2  
Signal Failure  
Table 5: S/UNI-4x622 Receive Path Overhead (RPOH) ISR Mask:  
sSUNI4x622_MASK__ISR_RPOH  
Field Name  
tiu  
Field Type  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
Field Description  
Path trace unstable  
tim  
Path trace mismatch  
prpslmi  
prpslui  
prdi  
Path signal label mismatch  
Path signal label unstable  
Path remote defect indication  
Path enhanced remote defect indication  
Path BIP-8 error  
perdi  
pbipe  
pfebe  
pais  
Path REI error  
Path AIS state changes  
ppse  
Positive Pointer Justification  
Negative Pointer Justification  
Path Loss of pointer state changes  
AuxRDI state changes  
pnse  
ploptr  
ardi  
uneq  
Trace identifier equipped state changes  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
30  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
psl  
Field Type  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
Field Description  
Path signal label changed  
Pointer AIS event  
aisc  
lopc  
Lost of pointer concatenation change  
New pointer received  
Illegal Pointer Justification  
Discontinuous change of pointer  
Invalid NDF  
newptr  
illjreq  
discopa  
invndf  
illptr  
ndf  
Illegal pointer  
NDF event  
Table 6: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_PYLD  
Field Name  
Field Type  
Field Description  
lcd  
UINT2  
Change in loss of cell delineation  
hcs  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
Detection of corrected or uncorrected HCS error  
Detection of FCS error  
fcs  
rxcpxfer  
txcpxfer  
abrt  
Transfer of received CP accumulated interval complete  
Transfer of transmit CP accumulated counter data completed  
Reception of aborted packet  
maxl  
Reception of packet exceeding maximum packet length  
Reception of packet below minimum packet length  
Change in cell delineation state  
minl  
oocd  
Table 7: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_FIFO  
Field Name  
Field Type  
Field Description  
rxcpfovr  
UINT2  
Rx CP FIFO overrun  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
31  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
rxfpfovr  
txfpfudr  
Field Type  
UINT2  
Field Description  
Rx FP FIFO overrun  
Tx FP FIFO underrun  
UINT2  
Table 10: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_INTF_LINE  
Field Name  
wansinten  
lot  
Field Type  
UINT2  
Field Description  
WANS phase detector averaging period has begun  
Loss of transition  
UINT2  
rool  
UINT2  
Recovered reference out of lock  
Recovered data out of lock  
dool  
UINT2  
Table11: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_INTF_SYS  
Field Name Field Type Field Description  
txop  
UINT2  
TSOP or TSEP is not asserted with the first or last word of a  
POS-PHY packet  
unprov  
UINT2  
Detection of non-existent channel buffer during in-band  
addressing  
cam  
UINT2  
UINT2  
UINT2  
UINT2  
UINT2  
Data field mismatch  
Tx Parity error  
tprty  
tsoc  
fovr  
funr  
Start of cell re-alignment  
TUL3 FIFO overrun  
RUL3 FIFO underrun  
Table12: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_APS  
Field Name  
bip  
Field Type  
UINT2  
Field Description  
BIP-8 error  
los  
UINT2  
Loss of signal  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
32  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
lof  
Field Type  
UINT2  
Field Description  
Los of frame  
oof  
UINT2  
Out of frame  
lot  
UINT2  
Loss of transition  
dool  
rool  
ese  
UINT2  
Recovered data out of lock  
Recovered reference out of lock  
Elastic store FIFO error  
Pointer Justification  
UINT2  
UINT2  
pj  
UINT2  
3.3 Structures in the Driver’s Allocated Memory  
These structures are defined and used by the driver and are part of the context memory allocated  
when the driver is opened. These structures are the Module Data Block (MDB), the Device Data  
Block (DDB).  
Module Data Block: MDB  
The MDB is the top-level structure for the module. It contains configuration data about the  
module level code and pointers to configuration data about the device level codes.  
errModule most of the module API functions return a specific error code directly. When the  
returned code is SUNI4x622_FAILURE, this indicates that the top-level function was not able  
to carry the specified error code back to the application. Under those circumstances, the  
proper error code is recorded in this element. The element is the first in the structure so that  
the USER can cast the MDB pointer into a INT4 pointer and retrieve the local error (this  
eliminates the need to include the MDB template into the application code).  
valid indicates that this structure has been properly initialized and may be read by the  
USER.  
stateModule contains the current state of the module and could be set to:  
SUNI4x622_MOD_START, SUNI4x622_MOD_IDLE or SUNI4x622_MOD_READY.  
Table 8: S/UNI-4x622 Module Data Block: sSUNI4x622_MDB  
Field Name  
errModule  
valid  
Field Type  
INT4  
Field Description  
Global error Indicator for module calls  
Indicates that this structure has been  
UINT2  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
33  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
Field Type  
Field Description  
initialized  
stateModule  
eSUNI4x622_MOD_STATE  
Module state; can be one of the following  
IDLE or READY  
maxDevs  
numDevs  
UINT2  
UINT2  
Maximum number of devices supported  
Number of devices currently registered  
Maximum number of initialization profiles  
maxInitProfs UINT2  
pddb  
sSUNI4x622_DDB *  
(array of) Device Data Blocks (DDB) in  
context memory  
pinitProfs  
sSUNI4x622_DIV *  
(array of) Initialization profiles in context  
memory  
Device Data Block: DDB  
The DDB is the top-level structure for each device. It contains configuration data about the device  
level code and pointers to configuration data about device level sub-blocks.  
errDevice most of the device API functions return a specific error code directly. When the  
returned code is SUNI4x622_FAILURE, this indicates that the top-level function was not able  
to carry the specific error code back top the application. In addition, some device functions do  
not return an error code. Under those circumstances, the proper error code is recorded in this  
element. The element is the first in the structure so that the USER can cast the DDB pointer  
to a INT4 pointer and retrieve the local error (this eliminates the need to include the DDB  
template in the application code).  
valid indicates that this structure has been properly initialized and may be read by the  
USER.  
stateDevice contains the current state of the device and could be set to:  
SUNI4x622_START, SUNI4x622_PRESENT, SUNI4x622_ACTIVE or  
SUNI4x622_INACTIVE.  
usrCtxt is a value that can be used by the USER to identify the device during the execution  
of the callback functions. It is passed to the driver when suni4x622Add is called and  
returned to the USER in the DPV when a callback function is invoked. The element is unused  
by the driver itself and may contain any value.  
Table 9: S/UNI-4x622 Device Data Block: sSUNI4x622_DDB  
Field Name  
errDevice  
valid  
Field Type  
INT4  
Field Description  
Global error indicator for device calls  
Indicates that this structure has been  
UINT2  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
34  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
Field Type  
Field Description  
initialized  
stateDevice  
eSUNI4x622_DEV_STATE  
Device State; can be one of the following  
PRESENT, ACTIVE or INACTIVE  
baseAddr  
usrCtxt  
void *  
Base address of the device  
sSUNI4x622_USR_CTXT  
Stores the user’s context for the device. It  
is passed as an input parameter when the  
driver invokes an application callback  
profileNum  
pollISR  
UINT2  
Profile number used at initialization  
eSUNI4x622_ISR_MODE  
sSUNI4x622_CBACK  
Indicates the current type of ISR / polling  
cbackSOH  
Address for the callback function for SOH  
events  
cbackLOH  
cbackRPOH  
cbackPYLD  
cbackFIFO  
sSUNI4x622_CBACK  
sSUNI4x622_CBACK  
sSUNI4x622_CBACK  
sSUNI4x622_CBACK  
Address for the callback function for LOH  
events  
Address for the callback function for  
RPOH events  
Address for the callback function for  
PYLD events  
Address for the callback function for FIFO  
events  
cbackIntfLine sSUNI4x622_CBACK  
Address for the callback function for Line  
Interface events  
cbackIntfSys  
cbackAPS  
sSUNI4x622_CBACK  
sSUNI4x622_CBACK  
Address for the callback function for  
System Interface events  
Address for the callback function for APS  
events  
cfgGlobal  
sSUNI4x622_CFG_GLOBAL  
sSUNI4x622_CFG_CHAN  
Global configuration block  
cfgChan[4]  
Channel configuration block ( 4 channels  
per device)  
mask  
sSUNI4x622_MASK_ISR  
Interrupt Enable Mask  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
35  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Device-wide Global Configuration  
Table 10: S/UNI-4x622 Input/Output Configuration: sSUNI4x622_CFG_GLOBAL  
Field Name  
sonetsel  
Field Type  
Field Description  
UINT1  
Select SONET/SDH mode  
cfgIntfSys  
sSUNI4x622_CFG_INTF_SYS_GLOBAL  
System Interface configuration  
block  
cfgIntfLine  
sSUNI4x622_CFG_INTF_LINE_GLOBAL  
Line Interface configuration  
block  
Per-Channel Configuration  
Table 11: S/UNI-4x622 Channel Configuration: sSUNI4x622_CFG_CHAN  
Field Name Field Type  
Field Description  
cfgSOH  
cfgLOH  
cfgRPOH  
cfgTPOH  
sSUNI4x622_CFG_SOH  
Section Overhead Processor (SOH) configuration  
block  
sSUNI4x622_CFG_LOH  
sSUNI4x622_CFG_RPOH  
sSUNI4x622_CFG_TPOH  
Line Overhead Processor (LOH) configuration  
block  
Receive Path Overhead Processor (RPOH)  
configuration block  
Transmit Path Overhead Processor (TPOH)  
configuration block  
cfgPYLD  
cfgFIFO  
cfgLine  
sSUNI4x622_CFG_PYLD  
sSUNI4x622_CFG_FIFO  
Payload Processor (PYLD) configuration block  
FIFO configuration  
sSUNI4x622_CFG_INTF  
_LINE  
Line Interface configuration block  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
36  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Per-Channel Section Overhead (SOH) Configuration  
Table 12: S/UNI-4x622 Section Overhead Configuration: sSUNI4x622_CFG_SOH  
Field Name  
Field Type  
Field Description  
algo2  
UINT1  
Selects framing pattern used to determine and maintain the  
frame alignment  
sblkbip  
dds  
UINT1  
UINT1  
UINT1  
UINT1  
Controls accumulation of section BIP errors  
Rx descrambling  
ds  
Tx scrambling  
zeroen  
Selects whether all zero trace identifier messages accepted  
or ignored  
Per-Channel Line Overhead (LOH) Configuration  
Table 13: S/UNI-4x622 Line Overhead Configuration: sSUNI4x622_CFG_LOH  
Field Name Field Type Field Description  
laisdet  
lrdidet  
lbipword  
sdlrdi  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Selects Line AIS detection algorithm  
Selects Line RDI detection algorithm  
Selects accumulation of line BIP errors  
Controls whether signal degrade can cause LRDI insertion  
Controls whether signal failure can cause LRDI insertion  
Controls whether loss of frame can cause LRDI insertion  
Controls whether loss of signal can cause LRDI insertion  
sflrdi  
loflrdi  
loslrdi  
rtimlrdi  
Controls whether section trace message mismatch can cause  
LRDI insertion  
rtiulrdi  
UINT1  
Controls whether section trace message unstable can cause  
LRDI insertion  
laislrdi  
UINT1  
UINT1  
Controls whether line AIS can cause LRDI insertion  
autolfebe  
Controls whether line BIP errors can cause FEBE insertion  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
37  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name Field Type Field Description  
allones  
UINT1  
Controls whether incoming AIS will force the downstream  
Sonet/SDH frame to all ones  
sdins  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Controls whether SD can cause Line AIS insertion  
Controls whether SF can cause Line AIS insertion  
Controls whether LOF can cause Line AIS insertion  
Controls whether LOS can cause Line AIS insertion  
Controls whether section TIM can cause Line AIS insertion  
Controls whether section TIU can cause Line AIS insertion  
sfins  
lofins  
losins  
rtimins  
rtiuins  
dccais  
Controls whether LOS or LOF can force all ones in the DCC  
outputs  
Per-Channel Receive Path Overhead (RPOH) Configuration  
Table 14: S/UNI-4x622 Receive Path Overhead Configuration: sSUNI4x622_CFG_RPOH  
Field Name Field Type Field Description  
enss  
UINT1  
Selects SS bits are taking into account in the pointer interpreter  
state machine  
sos  
UINT1  
UINT1  
UINT1  
Enables justification more than 3 frames ago  
iinvcnt  
zeroen  
Selects behavior of the consecutive INV_POINT event counter  
Selects whether all zero trace identifier messages accepted or  
ignored  
Per-Channel Transmit Path Overhead (TPOH) Configuration  
Table 15: S/UNI-4x622 Transmit Path Overhead Configuration: sSUNI4x622_CFG_TPOH  
Field Name  
Field Type Field Description  
persist  
UINT1  
Control of the persistence of the RDI asserted into the  
transmitted stream  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
38  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
Field Type Field Description  
lcdprdi  
UINT1  
Controls whether loss of cell delineation can cause PRDI  
insertion  
alrmprdi  
UINT1  
Controls whether LOS,LOF or LAIS can cause PRDI  
insertion  
paisprdi  
pslmprdi  
UINT1  
UINT1  
Controls whether PAIS can cause PRDI insertion  
Controls whether Path signal label mismatch can cause  
PRDI insertion  
lopprdi  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Controls whether loss of pointer indications can cause  
PRDI insertion  
lopconprdi  
ptiuprdi  
ptimprdi  
paisconprdi  
uneqprdi  
lcdeprdi  
noalmeprdi  
Controls whether loss of pointer concatenation indications  
can cause PRDI insertion  
Controls whether path trace identifier unstable can cause  
PRDI insertion  
Controls whether path trace identifier mismatch can cause  
PRDI insertion  
Controls whether path AIS concatenation events can cause  
PRDI insertion  
Controls whether unequipped path signal label can cause  
PRDI insertion  
Controls whether loss of cell delineation can cause EPRDI  
insertion  
Controls whether LOS,LOF or LAIS will disable EPRDI  
insertion  
nopaiseprdi  
pslmeprdi  
UINT1  
UINT1  
Controls whether PAIS will disable EPRDI insertion  
Controls whether Path signal label mismatch can cause  
EPRDI insertion  
nolopeprdi  
UINT1  
Controls whether loss of pointer indications can disable  
EPRDI insertion  
nolopconeprdi UINT1  
Controls whether loss of pointer concatenation indications  
will disable EPRDI insertion  
ptiueprdi  
UINT1  
Controls whether path trace identifier unstable can cause  
EPRDI insertion  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
39  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
Field Type Field Description  
ptimeprdi  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Controls whether path trace identifier mismatch can cause  
EPRDI insertion  
paisconpais  
lopconpais  
pslmpais  
Controls whether AIS concatenation events can cause PAIS  
insertion  
Controls whether loss of pointer concatenation events can  
cause PAIS insertion  
Controls whether path signal label mismatch can cause  
PAIS insertion  
pslupais  
Controls whether path signal label unstable can cause PAIS  
insertion  
loppais  
tiupais  
timpais  
autopfebe  
UINT1  
UINT1  
UINT1  
UINT1  
Controls whether loss of signal can cause PAIS insertion  
Controls whether path TIU can cause PAIS insertion  
Controls whether path TIM can cause PAIS insertion  
Controls whether path BIP errors can cause FEBE insertion  
Per-Channel Payload Processor Configuration  
Table 16: S/UNI-4x622 Payload Processor: sSUNI4x622_CFG_PYLD  
Field Name  
Field Type Field Description  
rxddscr  
UINT1  
UINT1  
UINT1  
UINT1  
UINT2  
UINT1  
UINT1  
UINT1  
UINT1  
RX descrambles payload  
rxcpdiscor  
rxcpidlepass  
rxcpccdis  
Disables ATM HCS error correction  
RX ignore idle cell header pattern and mask for ATM cells  
Disables cell delineation and filtering  
RX LCD Count Threshold  
RX idle cell header  
rxcplcdc  
rxcpidlehdr  
rxcpidlemask  
rxfpfcssel  
rxfpfcspass  
RX idle cell mask  
RX FCS select  
RX selects FCS stripping  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
40  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
rxfpminpl  
rxfpmaxpl  
txdscr  
Field Type Field Description  
UINT1  
UINT2  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
RX minimum packet length  
RX maximum packet length  
TX scrambles outgoing payload  
TX idle cell header  
txcpidlehdr  
txcpidlepyld  
txfpfcssel  
mode  
TX idle cell payload  
TX FCS select  
ATM or POS mode  
txfpipgap  
The number of Flag Sequence characters inserted between  
each POS Frame  
Per-Channel FIFO Configuration  
Table 17: S/UNI-4x622 FIFO Configuration: sSUNI4x622_CFG_FIFO  
Field Name  
rxfpril  
Field Type  
UINT1  
Field Description  
RX FIFO overrun before frame receive  
TX FIFO fill level before frame transmit  
txfptil  
UINT1  
Per-Channel Clock Interface Configuration  
Table 18: S/UNI-4x622 Clock Interface Configuration: sSUNI4x622_CFG_CLK  
Field Name Field Type Field Description  
loopt  
UINT1  
UINT1  
Selects REFCLK or recovered clock as tx source  
dccsel  
Configures whether the DCC is configured for section or line  
DCC operation  
tfpen  
UINT1  
Controls whether frame pulse input used for alignment  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
41  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Per-Channel RALRM Configuration  
Table 19: S/UNI-4x622 Clock Interface Configuration: sSUNI4x622_CFG_RALRM  
Field Name Field Type Field Description  
losen  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Controls whether LOS set RALRM output  
lofen  
Controls whether LOF set RALRM output  
oofen  
Controls whether OOF set RALRM output  
Controls whether line AIS set RALRM output  
Controls whether Line RDIset RALRM output  
Controls whether SD threshold event set RALRM output  
Controls whether SF threshold event set RALRM output  
Controls whether section TIM set RALRM output  
Controls whether LOP set RALRM output  
laisen  
lrdien  
sdberen  
sfberen  
stimen  
lopen  
lcden  
Controls whether LCD set RALRM output  
Controls whether path AIS set RALRM output  
Controls whether path RDI set RALRM output  
Controls whether path ERDI set RALRM output  
paisen  
prdien  
perdien  
pslmen  
Controls whether path signal label mismatch set RALRM  
output  
ptimen  
conen  
UINT1  
UINT1  
Controls whether path TIM set RALRM output  
Controls whether pointer concatenation violation set RALRM  
output  
Per-Channel Line Interface Configuration  
Table 20: S/UNI-4x622 Line Interface Configuration: sSUNI4x622_CFG_INTF_LINE  
Field Name  
Field Type  
Field Description  
cfgClk  
sSUNI4x622_CFG_CLK  
Clock configuration block  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
42  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
Field Type  
Field Description  
RALRM configuration block  
cfgRALRM  
sSUNI4x622_CFG_RALRM  
Device-wide System Interface Configuration  
Table 21: S/UNI-4x622 Global System Interface Configuration:  
sSUNI4x622_CFG_INTF_SYS_GLOBAL  
Field Name  
Field Type  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Field Description  
tul3prtyp  
TUL3 parity  
tul3l3mode  
TUL3 mode  
tul3atmsiglbl  
tul3possiglbl  
rul3prtyp  
TUL3 ATM signal label  
TUL3 POS signal label  
RUL3 parity  
rul3l3mode  
RUL3 mode  
rul3atmsiglbl  
rul3possiglbl  
tul3atmfifodp  
tul3posfifolwm  
tul3posfifohwm  
tul3cellform  
rul3cellform  
rul3pause  
RUL3 ATM signal label  
RUL3 POS signal label  
TUL3 ATM FIFO depth  
TUL3 POS FIFO low water mark  
TUL3 POS FIFO high water mark  
TUL3 cell size (52 or 56)  
RUL3 cell size (52 or 56)  
RUL3 minimum time between POS transfer burst  
RUL3 maximum single-channel transfer  
rul3tran  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
43  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Device-Wide Line Interface Configuration  
Table 22: S/UNI-4x622 Global Line Interface Configuration:  
sSUNI4x622_CFG_INTF_LINE_GLOBAL  
Field Name Field Type Field Description  
rsel  
UINT1  
Selects which channel is used as a clock source for the rx clock  
output pin  
tsel  
UINT1  
Selects which channel is used as a clock source for the tx clock  
output pin  
Table 23: S/UNI-4x622 Signal Failure Configuration: sSUNI4x622_CFG_SF  
Field Name Field Type Field Description  
sfcmode  
UINT1  
Clears alarm using a window size 8 times longer than the alarm  
declaration window size  
sfsmode  
UINT1  
UINT1  
Saturates the BIP count on a per window basis  
sfberten  
Automatic monitoring of line bit error rate threshold events by  
the SF BERM  
sfsap  
sfsth  
sfdth  
sfcth  
UINT4  
UINT4  
UINT4  
UINT4  
SF Accumulation period  
SF Saturation Threshold  
SF Declaring Threshold  
SF Clearing Threshold  
Table 24: S/UNI-4x622 Signal Defect Configuration: sSUNI4x622_CFG_SD  
Field Name Field Type Field Description  
sdcmode  
UINT1  
Clears alarm using a window size 8 times longer than the alarm  
declaration window size  
sdsmode  
UINT1  
UINT1  
Saturates the BIP count on a per window basis  
sdberten  
Automatic monitoring of line bit error rate threshold events by  
the SF BERM  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
44  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name Field Type Field Description  
sdsap  
sdsth  
sddth  
sdcth  
UINT4  
UINT4  
UINT4  
UINT4  
SD Accumulation period  
SD Saturation Threshold  
SD Declaring Threshold  
SD Clearing Threshold  
Table 25: S/UNI-4x622 Channel Status Block: sSUNI4x622_STATUS_CHAN  
Field Name  
Field Type  
Field Description  
statusSOH  
sSUNI4x622_STATUS  
_SOH  
Alarms, status and counts from the Section  
Overhead (SOH) section  
statusLOH  
sSUNI4x622_STATUS  
_LOH  
Alarms, status and counts from the Line Overhead  
(LOH) section  
statusRPOH  
sSUNI4x622_STATUS  
_RPOH  
Alarms, status and counts from the Receive Path  
Overhead (RPOH) Section  
statusPYLD  
statusLINE  
sSUNI4x622_STATUS  
_PYLD  
Alarms, status and counts from the Payload Section  
sSUNI4x622_STATUS  
_INTF_LINE  
Alarms, status and counts from Line Interface  
section  
Section Overhead (SOH) Status  
Table 26: S/UNI-4x622 Section Overhead Status: sSUNI4x622_STATUS_SOH  
Field Name  
Field Type  
Field Description  
oof  
UINT1  
Out of frame defect  
lof  
los  
tiu  
tim  
UINT1  
UINT1  
UINT1  
UINT1  
Loss of frame defect  
Loss of signal defect  
Section trace identifier unstable  
Section trace identifier mismatch  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
45  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Line Overhead (LOH) Status  
Table 27: S/UNI-4x622 Line Overhead Status: sSUNI4x622_STATUS_LOH  
Field Name  
k1  
Field Type  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Field Description  
Receive K1  
k2  
Receive K2  
s1  
Receive S1  
laisdet  
lrdidet  
sfber  
sdber  
psbf  
Line alarm signal defect  
Line remote defect indication  
Signal Failure  
Signal Degrade  
APS byte failure  
Receive Path Overhead (RPOH) Status  
Table 28: S/UNI-4x622 Receive Path Overhead Processor Status:  
sSUNI4x622_STATUS_RPOH  
Field Name Field Type Field Description  
perdi  
UINT1  
Path enhanced RDI status(filtered received EPRDI bits,G1 bit  
5,6 and 7)  
rxptr  
rxss  
txptr  
txss  
apsl  
epsl  
plop  
pais  
UINT2  
UINT1  
UINT2  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Last payload pointer read from the receive stream  
Rx SS (DD) bits  
Current payload pointer being inserted in the tx stream  
Tx SS bits  
Accepted path signal label  
Expected path signal label  
Path lost of pointer status  
Path AIS status  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
46  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name Field Type Field Description  
prdi  
tiu  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
UINT1  
Path RDI status  
Path trace identifier unstable  
Path trace identifier mismatch  
tim  
uneq  
pslu  
pslm  
ardi  
aisc  
lopc  
Equip status of the path signal label  
Path signal label unstable  
Path signal label mismatch  
Aux RDI status  
AIS concatenated  
Loss of pointer concatenated  
Payload Processor Status  
Table 30: S/UNI-4x622 Payload Status: sSUNI4x622_STATUS_PYLD  
Field Name  
Field Type  
Field Description  
rxcpovr  
UINT1  
RXCP accumulation transfer overrun  
TXCP accumulation transfer overrun  
Loss of cell delineation  
txcpovr  
lcd  
UINT1  
UINT1  
UINT1  
oocd  
out of cell delineation  
Clock Status  
Table 29: S/UNI-4x622 Clock Status: sSUNI4x622_STATUS_CLK  
Field Name  
Field Type  
Field Description  
TCLKA active  
RCLKA active  
RFCLK active  
tclka  
UINT1  
rclka  
UINT1  
UINT1  
rfclka  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
47  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
tfclka  
Field Type  
UINT1  
Field Description  
TFCLK active  
refclka  
UINT1  
REFCLKA active  
Line Interface Status  
Table 30: S/UNI-4x622 Line Interface Status: sSUNI4x622_STATUS_INTF_LINE  
Field Name  
Field Type  
Field Description  
statusClk  
sSUNI4x622_STATUS_CLK  
Clock interface status  
Counters (CNT)  
Table 31: S/UNI-4x622 Counters: sSUNI4x622_CNTR_CHAN  
Field Name Field Type  
Field Description  
cntrSOH  
cntrLOH  
cntrRPOH  
sSUNI4x622_CNTR_SOH  
Counters for Section Overhead (SOH) section  
Counters for Line Overhead (LOH) section  
sSUNI4x622_CNTR_LOH  
sSUNI4x622_CNTR_RPOH  
Counters for Receive Path Overhead (RPOH)  
section  
cntrPYLD  
sSUNI4x622_CNTR_PYLD  
Counters for Payload Processor (PYLD) section  
Section Overhead (SOH) Counter  
Table 32: S/UNI-4x622 Section Overhead (SOH) Counters: sSUNI4x622_CNTR_SOH  
Field Name  
Field Type  
Field Description  
sbe  
UINT2  
Section BIP error counter  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
48  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Line Overhead (LOH) Counter  
Table 33: S/UNI-4x622 Line Overhead (LOH) Counters: sSUNI4x622_CNTR_LOH  
Field Name  
lbe  
Field Type  
UINT4  
Field Description  
Line BIP error counter  
Line REI error counter  
lfe  
UINT4  
Receive Path Overhead (RPOH) Counter  
Table 34: S/UNI-4x622 Receive Path Overhead (RPOH) Counters:  
sSUNI4x622_CNTR_RPOH  
Field Name  
Field Type  
Field Description  
Path BIP error counter  
Path REI error counter  
pbe  
UINT2  
pfe  
UINT2  
Payload Processor (PYLD) Counter  
Table 35: S/UNI-4x622 Payload Processor Counters: sSUNI4x622_CNTR_PYLD  
Field Name  
Field Type  
Field Description  
Rx corrected HCS error count  
Rx uncorrected HCS error count  
Rx cell count  
rxcpchcs  
UINT1  
rxcpuhcs  
UINT1  
UINT4  
UINT4  
UINT4  
UINT4  
UINT4  
UINT2  
UINT2  
rxcprcell  
rxcpicell  
txcptcell  
rxfprbyte  
rxfprframe  
rxfprabrf  
rxfprfcsef  
Rx idle cell count  
Tx cell count  
Rx byte count  
Rx frame count  
Rx aborted frame count  
Rx FCS error frame count  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
49  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Field Name  
rxfprminlf  
rxfprmaxlf  
txfptbyte  
Field Type  
UINT2  
Field Description  
Rx minimum length error frame count  
Rx maximum length error frame count  
Tx byte count  
UINT2  
UINT4  
txfptframe  
txfptusrabf  
txfptferabf  
UINT4  
Tx frame count  
UINT4  
Tx user aborted frame count  
Tx underrun/error aborted frame count  
UINT4  
3.4 Structures Passed through RTOS Buffers  
Interrupt-Service Vector: ISV  
This buffer structure is used to capture the status of the device (during a poll or ISR processing)  
for use by the Deferred-Processing Routine (DPR). It is the template for all device registers that  
are involved in exception processing. It is the application’s responsibility to create a pool of ISV  
buffers (using this template to determine the buffer’s size) when the driver calls the USER-  
supplied sysSuni4x622BufferStart function. An individual ISV buffer is then obtained by  
the driver via sysSuni4x622ISVBufferGet and returned to the ‘pool’ via  
sysSuni4x622ISVBufferRtn.  
Table 36: S/UNI-4x622 Interrupt-Service Vector: sSUNI4x622_ISV  
Field Name  
Field Type  
Field Description  
deviceHandle  
sSUNI4x622_HNDL  
Handle to the device in cause  
ISR mask filled with interrupt status  
mask  
sSUNI4x622_MASK_ISR  
Deferred-Processing Vector: DPV  
This block is used in two ways. First it is used to determine the size of buffer required by the  
RTOS for use in the driver. Second it is the template for data that is assembled by the DPR and  
sent to the application code. Note: the application code is responsible for returning this buffer to  
the RTOS buffer pool.  
The DPR reports events to the application using user-defined callbacks. The DPR uses each  
callback to report a functionally-related group of events. Refer to page 104 for a description of  
the S/UNI-4x622 callback functions, and Appendix C (page 126) for a list of events.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
50  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Data Structures  
Table 37: S/UNI-4x622 Deferred-Processing Vector: sSUNI4x622_DPV  
Field Name  
Field Type  
Field Description  
event  
SUNI4x622_DPR_EVENT  
Event being reported  
Reason for the Event  
cause  
UINT2  
3.5 Global Variable  
Although most of the variables within the driver are not meant to be used by the application code,  
there is one global variable that can be of great use to the application code.  
suni4x622Mdb: A global pointer to the Module Data Block (MDB). The content of this global  
variable should be considered read-only by the application.  
errModule: This structure element is used to store an error code that specifies the reason for  
an API function’s failure. The field is only valid for functions that do not return an error code  
or when a value of SUNI4x622_FAILURE is returned.  
stateModule: This structure element is used to store the module state (as shown in Figure  
3).  
pddb[ ]: An array of pointers to the individual Device Data Blocks. The USER is cautioned  
that a DDB is only valid if the valid flag is set. Note that the array of DDBs is in no  
particular order.  
°
errDevice: This structure element is used to store an error code that specifies the reason  
for an API function’s failure. The field is only valid for functions that do not return an  
error code or when a value of SUNI4x622_FAILURE is returned.  
°
stateDevice: This structure element is used to store the device state (as shown in  
Figure 3).  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
51  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
4 APPLICATION PROGRAMMING INTERFACE  
This section provides a detailed description of each function that is a member of the S/UNI-4x622  
driver Application Programming Interface (API).  
The API functions typically execute in the context of an application task.  
Note: These functions are not re-entrant. This means that two application tasks can not invoke the  
same API at the same time. However the driver protects its data structures from concurrent  
accesses by the application and the DPR task.  
4.1 Module Management  
The module management is a set of API functions that are used by the application to open, start,  
stop and close the driver module. These functions will take care of initializing the driver,  
allocating memory and all RTOS resources needed by the driver. They are also used to change the  
module state. For more information on the module states see the state diagram on page 19. For a  
typical module management flow diagram see page 21.  
Opening the Driver Module: suni4x622ModuleOpen  
This function performs module level initialization of the device driver. This involves allocating  
all of the memory needed by the driver and initializing the internal structures.  
INT4 suni4x622ModuleOpen(sSUNI4x622_MIV *pmiv)  
pmiv  
Prototype  
Inputs  
: (pointer to) Module Initialization Vector  
Places the address of the MDB into the MIV passed by the application  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_INVALID_MIV  
SUNI4x622_ERR_MEM_ALLOC  
SUNI4x622_MOD_START  
Valid States  
Side Effects  
Changes the MODULE state to SUNI4x622_MOD_IDLE  
Closing the Driver Module: suni4x622ModuleClose  
This function performs module level shutdown of the driver. This involves deleting all devices  
being controlled by the driver (by calling suni4x622Delete for each device) and de-allocating  
all the memory allocated by the driver.  
INT4 suni4x622ModuleClose(void)  
Prototype  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
52  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Inputs  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_MOD_IDLE, SUNI4x622_MOD_READY  
Changes the MODULE state to SUNI4x622_MOD_START  
Valid States  
Side Effects  
Starting the Driver Module: suni4x622ModuleStart  
This function connects the RTOS resources to the driver. This involves allocating semaphores and  
timers, initializing buffers and installing the ISR handler and DPR task. Upon successful return  
from this function the driver is ready to add devices.  
INT4 suni4x622ModuleStart(void)  
Prototype  
Inputs  
None  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_MEM_ALLOC  
SUNI4x622_ERR_INT_INSTALL  
SUNI4x622_MOD_IDLE  
Valid States  
Side Effects  
Changes the MODULE state to SUNI4x622_MOD_READY  
Stopping the Driver Module: suni4x622ModuleStop  
This function disconnects the RTOS resources from the driver. This involves de-allocating  
semaphores and timers, freeing-up buffers and uninstalling the ISR handler and the DPR task. If  
there are any registered devices, suni4x622Delete is called for each.  
INT4 suni4x622ModuleStop(void)  
Prototype  
Inputs  
None  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_MOD_READY  
Valid States  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
53  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Side Effects  
Changes the MODULE state to SUNI4x622_MOD_IDLE  
4.2 Profile Management  
This section describes the functions that add, get and clear an initialization profile. Initialization  
profiles allow the user to store pre-defined Device Initialization Vectors (DIV) that are validated  
ahead of time. When the device initialization function is invoked only a profile number needs to  
be passed. This method simplifies and expedites the initialization process.  
Adding an Initialization Profile: suni4x622AddInitProfile  
This function creates an initialization profile that is stored by the driver. A device can now be  
initialized by simply passing the initialization profile number.  
INT4 suni4x622AddInitProfile(sSUNI4x622_DIV  
*pProfile, UINT2 *pProfileNum)  
Prototype  
Inputs  
pProfile  
: (pointer to) initialization profile being added  
pProfileNum : (pointer to) profile number to be assigned by the driver  
pProfileNum : (pointer to) profile number assigned by the driver  
Success = SUNI4x622_SUCCESS  
Outputs  
Returns  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_INVALID_PROFILE  
SUNI4x622_ERR_PROFILES_FULL  
SUNI4x622_MOD_IDLE, SUNI4x622_MOD_READY  
Valid States  
Side Effects  
None  
Getting an Initialization Profile: suni4x622GetInitProfile  
This function gets the content of an initialization profile given its profile number.  
INT4 suni4x622GetInitProfile(UINT2 profileNum,  
sSUNI4x622_DIV *pProfile)  
Prototype  
Inputs  
profileNum : initialization profile number  
pProfile  
: (pointer to) initialization profile  
Outputs  
Returns  
pProfile  
: (pointer to) contents of the corresponding profile  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_INVALID_PROFILE_NUM  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
54  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_MOD_IDLE, SUNI4x622_MOD_READY  
Valid States  
Side Effects  
None  
Deleting an Initialization Profile: suni4x622DeleteInitProfile  
This function deletes an initialization profile given its profile number.  
INT4 suni4x622DeleteInitProfile(UINT2 profileNum)  
Prototype  
Inputs  
profileNum : initialization profile number  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_INVALID_PROFILE_NUM  
SUNI4x622_MOD_IDLE, SUNI4x622_MOD_READY  
Valid States  
Side Effects  
None  
4.3 Device Management  
The device management is a set of API functions that are used by the application to control the  
device. These functions take care of initializing a device in a specific configuration, enabling the  
device general activity as well as enabling interrupt processing for that device. They are also used  
to change the software state for that device. For more information on the device states see the  
state diagram on page 19. For a typical device management flow diagram see page 22.  
Adding a Device: suni4x622Add  
This function verifies the presence of a new device in the hardware then returns a handle back to  
the user. The device handle is passed as a parameter of most of the device API Functions. It’s  
used by the driver to identify the device on which the operation is to be performed.  
sSUNI4x622_HNDL suni4x622Add(sSUNI4x622_USR_CTXT  
usrCtxt, void *pBaseAddr, INT4 **perrDevice)  
Prototype  
Inputs  
usrCtxt  
: user context for this device  
pBaseAddr  
: (pointer to) base address of the device  
perrDevice : (pointer to) an area of memory  
ERROR code written to the MDB on failure  
SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_INVALID_ARG  
Outputs  
SUNI4x622_ERR_DEVS_FULL  
SUNI4x622_ERR_DEV_ALREADY_ADDED  
SUNI4x622_ERR_INVALID_DEV  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
55  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
perrDevice : (pointer to) errDevice (inside the DDB)  
Success = Device Handle (to be used bas an argument to most of the  
S/UNI-4x622 APIs)  
Returns  
Failure = NULL (pointer)  
SUNI4x622_MOD_READY  
Valid States  
Side Effects  
Changes the DEVICE state to SUNI4x622_PRESENT  
Deleting a Device: suni4x622Delete  
This function removes the specified device from the list of devices being controlled by the  
S/UNI-4x622 driver. Deleting a device involves invalidating the DDB for that device and  
releasing its associated device handle.  
INT4 suni4x622Delete(sSUNI4x622_HNDL deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE  
Valid States  
Side Effects  
Changes the DEVICE state to SUNI4x622_PRESENT  
Initializing a Device: suni4x622Init  
This function initializes the Device Data Block (DDB) associated with that device during  
suni4x622Add, applies a soft reset to the device and configures it according to the DIV passed  
by the application. If the DIV is passed as a NULL the profile number is used. A profile number  
of zero indicates that all the register bits are to be left in their default state (after a soft reset).  
Note that the profile number is ignored UNLESS the passed DIV is NULL.  
INT4 suni4x622Init(sSUNI4x622_HNDL deviceHandle,  
sSUNI4x622_DIV *pdiv, UINT2 profileNum)  
Prototype  
Inputs  
deviceHandle  
pdiv  
: device handle (from suni4x622Add)  
: (pointer to) Device Initialization Vector  
: profile number (ignored if pdiv is NULL)  
profileNum  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_PROFILE_NUM  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
56  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ERR_INVALID_DIV  
SUNI4x622_PRESENT  
Changes the DEVICE state to SUNI4x622_INACTIVE  
Valid States  
Side Effects  
Updating the Configuration of a Device: suni4x622Update  
This function updates the configuration of the device as well as the Device Data Block (DDB)  
associated with that device according to the DIV passed by the application. The only difference  
between suni4x622Update and suni4x622Init is that no soft reset will be applied to the  
device.  
INT4 suni4x622Update(sSUNI4x622_HNDL deviceHandle,  
sSUNI4x622_DIV *pdiv, UINT2 profileNum)  
Prototype  
Inputs  
deviceHandle  
pdiv  
: device handle (from suni4x622Add)  
: (pointer to) Device Initialization Vector  
: profile number (ignored if pdiv is NULL)  
profileNum  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_PROFILE_NUM  
SUNI4x622_ERR_INVALID_DIV  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Resetting a Device: suni4x622Reset  
This function applies a software reset to the S/UNI-4x622 device. Also resets all the DDB  
contents (except for the user context). This function is typically called before re-initializing the  
device (via suni4x622Init).  
INT4 suni4x622Reset(sSUNI4x622_HNDL deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE  
Valid States  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
57  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Side Effects  
Changes the DEVICE state to SUNI4x622_PRESENT  
Activating a Device: suni4x622Activate  
This function restores the state of a device after a de-activate. Interrupts may be re-enabled.  
INT4 suni4x622Activate(sSUNI4x622_HNDL deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_INACTIVE  
Valid States  
Side Effects  
Changes the DEVICE state to SUNI4x622_ACTIVE  
De-Activating a Device: suni4x622DeActivate  
This function de-activates the device from operation. Interrupts are masked and the device is put  
into a quiet state via enable bits.  
INT4 suni4x622DeActivate(sSUNI4x622_HNDL  
deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Changes the DEVICE state to SUNI4x622_INACTIVE  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
58  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
4.4 Device Read and Write  
Reading from Device Registers: suni4x622Read  
This function reads a register of a specific S/UNI-4x622 device by providing the register number.  
This function derives the actual address location based on the device handle and register number  
inputs. It then reads the contents of this address location using the system specific macro,  
sysSuni4x622Read. Note that a failure to read returns a zero and any error indication is written  
to the associated DDB.  
UINT1 suni4x622Read(sSUNI4x622_HNDL deviceHandle,  
UINT2 regNum)  
Prototype  
Inputs  
deviceHandle  
regNum  
: device handle (from suni4x622Add)  
: register number  
ERROR code written to the MDB  
Outputs  
Returns  
SUNI4x622_ERR_INVALID_DEV  
ERROR code written to the DDB  
SUNI4x622_ERR_INVALID_REG  
Success = value read  
Failure = 0  
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May affect registers that change after a read operation  
Writing to Device Registers: suni4x622Write  
This function writes to a register of a specific S/UNI-4x622 device by providing the register  
number. This function derives the actual address location based on the device handle and register  
number inputs. It then writes the contents of this address location using the system specific  
macro, sysSuni4x622Write. Note that a failure to write returns a zero and any error indication  
is written to the DDB.  
UINT1 suni4x622Write(sSUNI4x622_HNDL deviceHandle,  
UINT2 regNum, UINT1 value)  
Prototype  
Inputs  
deviceHandle  
regNum  
: device handle (from suni4x622Add)  
: register number  
value  
: value to be written  
ERROR code written to the MDB  
Outputs  
Returns  
SUNI4x622_ERR_INVALID_DEV  
ERROR code written to the DDB  
SUNI4x622_ERR_INVALID_REG  
Success = value written  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
59  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Failure = 0  
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the configuration of the device  
Reading from a block of Device Registers: suni4x622ReadBlock  
This function reads a register block of a specific S/UNI-4x622 device by providing the starting  
register number, and the size to read. This function derives the actual start address location based  
on the device handle and starting register number inputs. It then reads the contents of this data  
block using multiple calls to the system specific macro, sysSuni4x622Read. Note that any error  
indication is written to the DDB. It is the USER’s responsibility to allocate enough memory for  
the block read.  
void suni4x622ReadBlock(sSUNI4x622_HNDL deviceHandle,  
UINT2 startRegNum, UINT2 size, UINT1 *pblock)  
Prototype  
Inputs  
deviceHandle  
startRegNum  
size  
: device handle (from suni4x622Add)  
: starting register number  
: size of the block to read  
pblock  
: (pointer to) the block to read  
ERROR code written to the DDB  
Outputs  
SUNI4x622_ERR_INVALID_DEV  
ERROR code written to the DDB  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_INVALID_REG  
pblock  
: (pointer to) the block read  
None  
Returns  
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE  
Valid States  
May affect registers that change after a read operation  
Side Effects  
Writing to a Block of Device Registers: suni4x622WriteBlock  
This function writes to a register block of a specific S/UNI-4x622 device by providing the  
starting register number and the block size. This function derives the actual starting address  
location based on the device handle and starting register number inputs. It then writes the contents  
of this data block using multiple calls to the system specific macro, sysSuni4x622Write. A bit  
from the passed block is only modified in the device’s registers if the corresponding bit is set in  
the passed mask. Note that any error indication is written to the DDB  
void suni4x622WriteBlock(sSUNI4x622_HNDL  
deviceHandle, UINT2 startRegNum, UINT2 size, UINT1  
*pblock, UINT1 *pmask)  
Prototype  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
60  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Inputs  
deviceHandle  
startRegNum  
size  
pblock  
pmask  
: device handle (from suni4x622Add)  
: starting register number  
: size of block to read  
: (pointer to) block to write  
: (pointer to) mask  
ERROR code written to the DDB  
Outputs  
SUNI4x622_ERR_INVALID_DEV  
ERROR code written to the DDB  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_INVALID_REG  
None  
Returns  
SUNI4x622_PRESENT, SUNI4x622_ACTIVE,  
SUNI4x622_INACTIVE  
Valid States  
May change the configuration of the device  
Side Effects  
4.5 Section Overhead (SOH)  
The Section Overhead section provides functions to control and monitor the section overhead  
processing. Read / Write access is given to the section trace message (J0). This message is  
compared with a configurable reference and mismatches are reported. For diagnostic purposes,  
errors can be introduced in the section overhead bytes.  
Writing the J0 Byte: suni4x622SOHWriteJ0  
This function writes the J0 byte into the transmit section overhead.  
INT4 suni4x622SOHWriteJ0(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 J0)  
Prototype  
Inputs  
deviceHandle  
channel  
J0  
: device handle (from suni4x622Add)  
: channel number  
: J0 byte to write  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
61  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Reading and Setting the Section Trace Message : suni4x622SOHTraceMsg  
This function retrieves and sets the section trace message (J0) in the Sonet/SDH Section Trace  
Buffer.  
Note: It is the USER’s responsibility to ensure that the message pointer points to an area of  
memory large enough to hold the returned data.  
INT4 suni4x622SOHTraceMsg(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 acctyp, UINT1*  
pJ0)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
acctyp  
: type of access  
0 = write tx section trace msg  
1 = read rx accepted section trace msg  
2 = read rx captured section trace msg  
3 = write rx expected section trace msg  
: (pointer to) the section trace message  
pJ0  
pJ0  
Outputs  
Returns  
: (pointer to) section trace message  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_POLL_TIMEOUT  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing A1 Error : suni4x622SOHForceA1  
When the enable flag is set, this function introduces framing errors in the A1 bytes. When the  
enable flag is not set, this function resumes normal processing.  
INT4 suni4x622SOHForceA1(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop A1 error insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
62  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing B1 Error: suni4x622SOHForceB1  
This function inserts the B1 BIP-8 errors byte to be inserted to the section overhead.  
INT4 suni4x622SOHForceB1(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop B1 error insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing OOF: suni4x622SOHForceOOF  
This function forces the Section Overhead Processor temporarily out of frame. The Section  
Overhead Processor will attempt to lock back onto the frame.  
INT4 suni4x622SOHForceOOF(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
63  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Forcing LOS: suni4x622SOHForceLOS  
When the enable flag is set, this function forces a loss of signal condition in the data stream.  
When the enable flag is not set, this function resumes normal processing.  
INT4 suni4x622SOHForceLOS(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop a loss of signal condition  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
4.6 Line Overhead (LOH)  
The Line Overhead section provides functions to configure and monitor the line overhead on both  
the receive and transmit sides. Read / Write access is given to the APS bytes (K1 and K2) and  
most other overhead bytes. Signal failure and signal degrade can be monitored. For diagnostic  
purposes, errors can be introduced in the line overhead bytes. Additional functions are provided to  
automatically insert line RDI and line AIS.  
Configuring SF Error Monitor: suni4x622LOHSFCfg  
This function configures the Signal Failure BERM automatic monitoring of line bit error rate  
threshold events.  
INT4 suni4x622LOHSFCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, sSUNI4x622_CFG_SF *psfcfg)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
psfcfg  
: (pointer to) SF configuration block  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
64  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Configuring SD Error Monitor: suni4x622LOHSDCfg  
This function configures the Signal Defect BERM automatic monitoring of line bit error rate  
threshold events.  
INT4 suni4x622LOHSDCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, sSUNI4x622_CFG_SD *psdcfg)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
psdcfg  
: (pointer to) SD configuration block  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Writing the K1K2 Byte: suni4x622LOHWriteK1K2  
This function writes the K1, K2 byte into the line overhead.  
INT4 suni4x622LOHWriteK1K2(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 K1, UINT1 K2)  
Prototype  
Inputs  
deviceHandle  
channel  
K1  
: device handle (from suni4x622Add)  
: channel number  
: K1 byte to write  
K2  
: K2 byte to write  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
65  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Side Effects  
Reading the K1K2 Byte: suni4x622LOHReadK1K2  
This function reads the K1K2 byte from the line overhead.  
INT4 suni4x622LOHReadK1K2(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 *pK1, UINT1 *pK2)  
Prototype  
Inputs  
deviceHandle  
channel  
pK1  
: device handle (from suni4x622Add)  
: channel number  
: (pointer to) store K1 byte read  
: (pointer to) store K2 byte read  
pK2  
Outputs  
Returns  
pK1  
pK2  
: (pointer to) K1 byte read  
: (pointer to) K2 byte read  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Writing the S1 Byte: suni4x622LOHWriteS1  
This function writes the S1 byte into the line overhead.  
INT4 suni4x622LOHWriteS1(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 S1)  
Prototype  
Inputs  
deviceHandle  
channel  
S1  
: device handle (from suni4x622Add)  
: channel number  
: S1 byte to write  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
66  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Reading the S1 Byte: suni4x622LOHReadS1  
This function reads the S1 byte from the line overhead.  
INT4 suni4x622LOHReadS1(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, UINT1 *pS1)  
Prototype  
Inputs  
deviceHandle  
channel  
pS1  
: device handle (from suni4x622Add)  
: channel number  
: (pointer to) store S1 byte read  
Outputs  
Returns  
pS1  
: (pointer to) S1 byte read  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Line AIS: suni4x622LOHForceAIS  
This function forces line AIS in the transmit direction.  
INT4 suni4x622LOHForceAIS(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop line AIS insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing B2 Error: suni4x622LOHForceB2  
This function forces B2 BIP-8 errors into the line overhead.  
INT4 suni4x622LOHForceB2(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
67  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop B2 error insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Line RDI: suni4x622LOHForceRDI  
This function forces the line RDI into the line overhead.  
INT4 suni4x622LOHForceRDI(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop line RDI insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
4.7 Path Overhead (RPOH, TPOH)  
The Path Overhead Processor is responsible for pointer interpretation, path overhead processing,  
synchronous payload envelope, path level alarm and performance monitoring on both receive and  
transmit sides. The Path Overhead section configures and monitors the path overhead on both  
receive and transmit sides. Write access is given to the path trace message (J1) and the path signal  
label (C2) and other overhead bytes. For diagnostic purposes, errors can be introduced in the path  
overhead bytes. Additional functions are provided to automatically insert path AIS, force  
generation of outgoing justification events.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
68  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Retrieving and Setting the Path Trace Messages: suni4x622POHTraceMsg  
This function retrieves and sets the current path trace message in the Sonet/SDH Path Trace  
Buffer. Note: It is the USER’s responsibility to make sure that the message pointer points to an  
area of memory large enough to hold the returned data.  
INT4 suni4x622POHTraceMsg(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 acctyp, UINT1*  
pJ1)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
acctyp  
: type of access  
0 = write tx path trace msg  
1 = read rx accepted path trace msg  
2 = read rx captured path trace msg  
3 = write rx expected path trace msg  
pJ1  
pJ1  
: (pointer to) the path trace message  
Outputs  
Returns  
: (pointer to) updated path trace message  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_POLL_TIMEOUT  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Writing the J1 Byte: suni4x622TPOHWriteJ1  
This function writes the J1 byte into the path overhead.  
INT4 suni4x622TPOHWriteJ1(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 J1)  
Prototype  
Inputs  
deviceHandle  
channel  
J1  
: device handle (from suni4x622Add)  
: channel number  
: J1 byte to write  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
69  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Writing the C2 Byte: suni4x622TPOHWriteC2  
This function writes the C2 byte into the path overhead.  
INT4 suni4x622TPOHWriteC2(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 C2)  
Prototype  
Inputs  
deviceHandle  
channel  
C2  
: device handle (from suni4x622Add)  
: channel number  
: C2 byte to write  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Writing the New Data Flag Bits: suni4x622TPOHWriteNDF  
This function writes the passed new data flag bits (NDF[3:0]) in the NDF bit positions.  
INT4 suni4x622TPOHWriteNDF(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable, UINT1 ndf)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
:flag to start/stop inserting the NDF value  
passed in this function  
ndf  
: NDF value (lower nibble)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
70  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Writing SS Bits: suni4x622TPOHWriteSS  
This function writes the passed SS bits (SS[1:0]) in the SS bit positions.  
INT4 suni4x622TPOHWriteSS(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 ss)  
Prototype  
Inputs  
deviceHandle  
channel  
ss  
: device handle (from suni4x622Add)  
: channel number  
: SS bits value(bit 0 and bit 1)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Inserting a Pointer Value: suni4x622TPOHInsertTxPtr  
This function enables the insertion of the pointer value passed in argument into the H1 and H2  
bytes of the transmit stream. As a result, the upstream payload mapping circuitry and a valid SPE  
can continue functioning and generating normally.  
INT4 suni4x622TPOHInsertTxPtr(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 aptr)  
Prototype  
Inputs  
deviceHandle  
channel  
aptr  
: device handle (from suni4x622Add)  
: channel number  
: pointer value to insert in (H1, H2)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Force Path BIP-8 Errors: suni4x622TPOHForceB3  
This function forces the B3 error in the transmit stream.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
71  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
INT4 suni4x622THPPForceB3(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop B3 masking  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Pointer Justification: suni4x622TPOHForcePJ  
The function forces single positive or negative pointer justification.  
INT4 suni4x622TPOHForcePJ(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, INT1 type)  
Prototype  
Inputs  
deviceHandle  
channel  
type  
: device handle (from suni4x622Add)  
: channel number  
: type of Pointer Justification event:  
–1 = negative Pointer Justification  
+1 = positive Pointer Justification  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Path RDI: suni4x622TPOHForceRDI  
This function enables the insertion of the Path Alarm Indication Signal (PRDI) in the transmit  
stream.  
INT4 suni4x622TPOHForceRDI(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
72  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop path RDI insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Path ERDI: suni4x622TPOHForceERDI  
This function enables the insertion of the Enhanced Path Alarm Indication Signal (EPRDI) in the  
transmit stream.  
INT4 suni4x622TPOHForceERDI(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop path ERDI insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Path ARDI: suni4x622TPOHForceARDI  
This function enables the insertion of the Auxiliary Path Alarm Indication Signal (APRDI) in the  
transmit stream.  
INT4 suni4x622TPOHForceARDI(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop path ARDI insertion  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
73  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Forcing Path AIS: suni4x622TPOHForceAIS  
This function enables the insertion of the Path Alarm Indication Signal (PAIS) in the transmit  
stream. The synchronous payload envelope and the pointer bytes (H1 – H3) are set to all ones.  
INT4 suni4x622TPOHForceAIS(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: flag to start/stop path AIS insertion  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
4.8 Payload Processor  
The Payload Processor performs both ATM and PPP processing.  
Setting Payload configuration parameters: suni4x622PyldCfg  
This function sets up the minimum and maximum packet length, cell header and mask for  
packet/cell payload configuration.  
INT4 suni4x622PyldCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, sSUNI4x622_CFG_PYLD *ppyldcfg)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
74  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
ppyldcfg  
: (pointer to) payload configuration parameters  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
4.9 Interface Configuration  
The Interface Configuration provides FIFO management to separate the line side timing from the  
high layer ATM/POS link layer timing, the line and system interface configuration.  
Resetting the Receive/Transmit FIFO: suni4x622FIFOReset  
This function resets the receive and/or transmit FIFO.  
INT4 suni4x622FIFOReset(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, UINT1 fifotype)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
fifotype  
: =0 if RX; = 1 if TX; = 2 if both  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Configuring the Receive and Transmit FIFO: suni4x622FIFOCfg  
This function configures the FIFO based on the FIFO configuration supplied.  
INT4 suni4x622FIFOCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, sSUNI4x622_CFG_FIFO *pfifocfg)  
Prototype  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
75  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pfifocfg  
: (pointer to) FIFO configuration block  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Configuring the System interface: suni4x622SysIntfCfg  
This function configures the system interface based on the configuration parameters.  
INT4 suni4x622SysIntfCfg(sSUNI4x622_HNDL  
deviceHandle, sSUNI4x622_CFG_INTF_SYS_GLOBAL *psyscfg  
)
Prototype  
Inputs  
deviceHandle  
psyscfg  
: device handle (from suni4x622Add)  
: (pointer to) system interface configuration  
block  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Configuring the Device-Wide Line interface: suni4x622IntfLineCfg  
This function configures the device-wide line interface based on the configuration parameters.  
INT4 suni4x622IntfLineCfg(sSUNI4x622_HNDL  
deviceHandle, sSUNI4x622_CFG_INTF_LINE_GLOBAL  
*plinecfg )  
Prototype  
Inputs  
deviceHandle  
plinecfg  
: device handle (from suni4x622Add)  
: (pointer to) device-wide line interface  
configuration block  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
76  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Resetting the TFCLK DLL: suni4x622IntfSysResetTDLL  
This function resets the TFCLK DLL.  
INT4 suni4x622IntfSysResetTDLL(sSUNI4x622_HNDL  
deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Resetting the RFCLK DLL: suni4x622IntfSysResetRDLL  
This function resets the RFCLK DLL.  
INT4 suni4x622IntfSysResetRDLL(sSUNI4x622_HNDL  
deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
77  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
4.10 Automatic Protection Configuration  
The Automatic Protection Configuration section is responsible for configuring the S/UNI-4x622  
to use the APS ports.  
Configuring APS Working/Protect Mate: suni4x622APSCfg  
When enable is set, this function enables the S/UNI-4x622 to operate as an APS working/protect  
mate under a failed condition. When enable is not set, this function resumes normal operation.  
INT4 suni4x622APSCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 mode, UINT1 enable)  
Prototype  
Inputs  
deviceHandle  
mode  
: device handle (from suni4x622Add)  
: =0 if working mate; =1 if protect mate  
: start/stop APS operation  
enable  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Configuring the Source Channel for the Given Channel Receive Path:  
suni4x622RPCfg  
The function is used to control the source channel for the receive path.  
INT4 suni4x622RPCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, UINT1 srcChan)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: receive path channel number  
: source channel number  
srcChan  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
78  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Configuring the Source Channel for the Given Channel Transmit Path:  
suni4x622TPCfg  
The function is used to control the source channel for the transmit path.  
INT4 suni4x622TPCfg(sSUNI4x622_HNDL deviceHandle,  
UINT1 channel, UINT1 srcChan)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: transmit path channel number  
: source channel number  
srcChan  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Enable or disable the channel APS cross connect: suni4x622APSXcnntCfg  
The function is used to control the channel APS cross connect.  
INT4 suni4x622APSXcnntCfg(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT1 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: enable or disable  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Resetting APS Receive Link: suni4x622APSResetRxLink  
The function is used to reset the receive APS link.  
INT4 suni4x622APSResetRxLink(sSUNI4x622_HNDL  
Prototype  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
79  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
deviceHandle, UINT1 link)  
Inputs  
deviceHandle  
link  
: device handle (from suni4x622Add)  
: APS link number  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_APS_LINK  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Resetting APS Transmit Link: suni4x622APSResetTxLink  
The function is used to reset the transmit APS link.  
INT4 suni4x622APSResetTxLink(sSUNI4x622_HNDL  
deviceHandle, UINT1 link)  
Prototype  
Inputs  
deviceHandle  
link  
: device handle (from suni4x622Add)  
: APS link number  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_APS_LINK  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
4.11 Interrupt Service Functions  
This section describes interrupt-service functions that perform the following tasks:  
Set, get and clear the interrupt enable mask  
Read and process the interrupt-status registers  
Poll and process the interrupt-status registers  
See page 23 for an explanation of our interrupt servicing architecture.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
80  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Configuring ISR Processing: suni4x622ISRConfig  
Allows the USER to configure how ISR processing is to be handled: polling  
(SUNI4x622_POLL_MODE) or interrupt driven (SUNI4x622_ISR_MODE). If polling is selected,  
the USER is responsible for calling periodically suni4x622Poll to collect exception data from  
the device.  
INT4 suni4x622ISRConfig(sSUNI4x622_HNDL deviceHandle,  
eSUNI4x622_ISR_MODE mode)  
Prototype  
Inputs  
deviceHandle  
mode  
: device handle (from suni4x622Add)  
: mode of operation  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting Device Interrupt Enable Mask: suni4x622GetMask  
This function returns the contents of the interrupt mask registers of the S/UNI-4x622 device.  
INT4 suni4x622GetMask(sSUNI4x622_HNDL deviceHandle,  
sSUNI4x622_MASK_ISR *pmask)  
Prototype  
Inputs  
deviceHandle  
pmask  
: device handle (from suni4x622Add)  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting Device Interrupt Enable Mask: suni4x622SetMask  
This function sets the contents of the interrupt mask registers of the S/UNI-4x622 device. Any  
bits that are set in the passed structure are set in the associated S/UNI-4x622 registers.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
81  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
INT4 suni4x622SetMask(sSUNI4x622_HNDL deviceHandle,  
sSUNI4x622_MASK_ISR *pmask)  
Prototype  
Inputs  
deviceHandle  
pmask  
: device handle (from suni4x622Add)  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing Device Interrupt Enable Mask: suni4x622ClrMask  
This function clears individual interrupt bits and registers in the S/UNI-4x622 device. Any bits  
that are set in the passed structure are cleared in the associated S/UNI-4x622 registers.  
INT4 suni4x622ClrMask(sSUNI4x622_HNDL deviceHandle,  
sSUNI4x622_MASK_ISR *pmask)  
Prototype  
Inputs  
deviceHandle  
pmask  
: device handle (from suni4x622Add)  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Getting SOH Interrupt Enable Mask: suni4x622GetMaskSOH  
This function returns the contents of the SOH interrupt mask registers of the S/UNI-4x622  
device.  
INT4 suni4x622GetMaskSOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
82  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
pmask  
pmask  
: (pointer to) mask structure  
: (pointer to) updated mask structure  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting SOH Interrupt Enable Mask: suni4x622SetMaskSOH  
This function sets the contents of the SOH interrupt mask registers of the S/UNI-4x622 device.  
Any bits that are set in the passed structure are set in the associated S/UNI-4x622 registers.  
INT4 suni4x622SetMaskSOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing SOH Interrupt Enable Mask: suni4x622ClrMaskSOH  
This function clears SOH individual interrupt bits and registers in the S/UNI-4x622 device. Any  
bits that are set in the passed structure are cleared in the associated S/UNI-4x622 registers.  
INT4 suni4x622ClrMaskSOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
83  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Getting LOH Interrupt Enable Mask: suni4x622GetMaskLOH  
This function returns the contents of the LOH interrupt mask registers of the S/UNI-4x622  
device.  
INT4 suni4x622GetMaskLOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting LOH Interrupt Enable Mask: suni4x622SetMaskLOH  
This function sets the contents of the LOH interrupt mask registers of the S/UNI-4x622 device.  
Any bits that are set in the passed structure are set in the associated S/UNI-4x622 registers.  
INT4 suni4x622SetMaskLOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
84  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing LOH Interrupt Enable Mask: suni4x622ClrMaskLOH  
This function clears LOH individual interrupt bits and registers in the S/UNI-4x622 device. Any  
bits that are set in the passed structure are cleared in the associated S/UNI-4x622 registers.  
INT4 suni4x622ClrMaskLOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Getting RPOH Interrupt Enable Mask: suni4x622GetMaskRPOH  
This function returns the contents of the RPOH interrupt mask registers of the S/UNI-4x622  
device.  
INT4 suni4x622GetMaskRPOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
85  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting RPOH Interrupt Enable Mask: suni4x622SetMaskRPOH  
This function sets the contents of the RPOH interrupt mask registers of the S/UNI-4x622 device.  
Any bits that are set in the passed structure are set in the associated S/UNI-4x622 registers.  
INT4 suni4x622SetMaskRPOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing RPOH Interrupt Enable Mask: suni4x622ClrMaskRPOH  
This function clears RPOH individual interrupt bits and registers in the S/UNI-4x622 device. Any  
bits that are set in the passed structure are cleared in the associated S/UNI-4x622 registers.  
INT4 suni4x622ClrMaskRPOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
86  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Getting PYLD Interrupt Enable Mask: suni4x622GetMaskPYLD  
This function returns the contents of the PYLD interrupt mask registers of the S/UNI-4x622  
device.  
INT4 suni4x622GetMaskPYLD(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting PYLD Interrupt Enable Mask: suni4x622SetMaskPYLD  
This function sets the contents of the PYLD interrupt mask registers of the S/UNI-4x622 device.  
Any bits that are set in the passed structure are set in the associated S/UNI-4x622 registers.  
INT4 suni4x622SetMaskPYLD(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
87  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing PYLD Interrupt Enable Mask: suni4x622ClrMaskPYLD  
This function clears PYLD individual interrupt bits and registers in the S/UNI-4x622 device. Any  
bits that are set in the passed structure are cleared in the associated S/UNI-4x622 registers.  
INT4 suni4x622ClrMaskPYLD(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Getting FIFO Interrupt Enable Mask: suni4x622GetMaskFIFO  
This function returns the contents of the FIFO interrupt mask registers of the S/UNI-4x622  
device.  
INT4 suni4x622GetMaskFIFO(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
88  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting FIFO Interrupt Enable Mask: suni4x622SetMaskFIFO  
This function sets the contents of the FIFO interrupt mask registers of the S/UNI-4x622 device.  
Any bits that are set in the passed structure are set in the associated S/UNI-4x622 registers.  
INT4 suni4x622SetMaskFIFO(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing FIFO Interrupt Enable Mask: suni4x622ClrMaskFIFO  
This function clears FIFO individual interrupt bits and registers in the S/UNI-4x622 device. Any  
bits that are set in the passed structure are cleared in the associated S/UNI-4x622 registers.  
INT4 suni4x622ClrMaskFIFO(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
89  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Getting Line Interface Interrupt Enable Mask: suni4x622GetMaskIntfLine  
This function returns the contents of the per-channel line interface interrupt mask registers of the  
S/UNI-4x622 device.  
INT4 suni4x622GetMaskIntfLine(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting Line Interface Interrupt Enable Mask: suni4x622SetMaskIntfLine  
This function sets the contents of the per-channel line interface interrupt mask registers of the  
S/UNI-4x622 device.  
INT4 suni4x622SetMaskIntfLine(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
90  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Clearing Line Interface Interrupt Enable Mask: suni4x622ClrMaskIntfLine  
This function clears the contents of the per-channel line interface interrupt mask registers of the  
S/UNI-4x622 device.  
INT4 suni4x622ClrMaskIntfLine(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting System Interface Interrupt Enable Mask: suni4x622GetMaskSysIntf  
This function returns the contents of the system interface interrupt mask registers of the S/UNI-  
4x622 device.  
INT4 suni4x622GetMaskSysIntf(sSUNI4x622_HNDL  
deviceHandle, sSUNI4x622_MASK_ISR *pmask)  
Prototype  
Inputs  
deviceHandle  
pmask  
: device handle (from suni4x622Add)  
: (pointer to) mask structure  
Outputs  
pmask  
: (pointer to) updated mask structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
91  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting System Interface Interrupt Enable Mask: suni4x622SetMaskSysIntf  
This function sets the contents of the system interface interrupt mask registers of the S/UNI-  
4x622 device.  
INT4 suni4x622SetMaskSysIntf(sSUNI4x622_HNDL  
deviceHandle, sSUNI4x622_MASK_ISR *pmask)  
Prototype  
Inputs  
deviceHandle  
pmask  
: device handle (from suni4x622Add)  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
May change the operation of the ISR / DPR  
Clearing System Interface Interrupt Enable Mask: suni4x622ClrMaskSysIntf  
This function clears systerm interface interrupt bits and registers in the S/UNI-4x622 device.  
INT4 suni4x622ClrMaskSysIntf(sSUNI4x622_HNDL  
deviceHandle, sSUNI4x622_MASK_ISR *pmask)  
Prototype  
Inputs  
deviceHandle  
pmask  
: device handle (from suni4x622Add)  
: (pointer to) mask structure  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
92  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
May change the operation of the ISR / DPR  
Side Effects  
Getting APS Interrupt Enable Mask: suni4x622GetMaskAPS  
This function returns the contents of the APS interrupt mask registers of the S/UNI-4x622 device.  
INT4 suni4x622GetMaskAPS(sSUNI4x622_HNDL  
deviceHandle, UINT1 apslink, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
apslink  
: device handle (from suni4x622Add)  
: APS link number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_APSLINK  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Setting APS Interrupt Enable Mask: suni4x622SetMaskAPS  
This function sets the contents of the APS interrupt mask registers of the S/UNI-4x622 device.  
INT4 suni4x622SetMaskAPS(sSUNI4x622_HNDL  
deviceHandle, UINT1 apslink, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
apslink  
: device handle (from suni4x622Add)  
: APS link number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_APSLINK  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
93  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Clearing APS Interrupt Enable Mask: suni4x622ClrMaskAPS  
This function clears the contents of the APS interrupt mask registers of the S/UNI-4x622 device.  
INT4 suni4x622ClrMaskAPS(sSUNI4x622_HNDL  
deviceHandle, UINT1 apslink, sSUNI4x622_MASK_ISR  
*pmask)  
Prototype  
Inputs  
deviceHandle  
apslink  
: device handle (from suni4x622Add)  
: APS link number  
pmask  
: (pointer to) mask structure  
Outputs  
Returns  
pmask  
: (pointer to) updated mask structure  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_APSLINK  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Polling the Interrupt Status Registers: suni4x622Poll  
This function commands the driver to poll the interrupt registers in the device. The call will fail  
unless the device was initialized (via suni4x622Init) or configured (via  
suni4x622ISRConfig) into polling mode.  
INT4 suni4x622Poll(sSUNI4x622_HNDL deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_MODE  
SUNI4x622_FAILURE  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Pseudocode  
None  
Begin  
if device is configured in polling mode  
call suni4x622ISR  
End  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
94  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Interrupt-Service Routine: suni4x622ISR  
This function reads the state of the interrupt registers in the S/UNI-4x622 and stores them in an  
ISV. Performs whatever functions are needed to clear the interrupt, from simply clearing bits to  
complex functions. This routine is called by the application code, from within  
sysSuni4x622ISRHandler. If ISR mode is configured all interrupts that were detected are  
disabled and the ISV is returned to the application. Note that the application is then responsible  
for sending this buffer to the DPR task. If polling mode is selected, no ISV is returned to the  
application and the DPR is called directly with the ISV.  
void * suni4x622ISR(sSUNI4x622_HNDL deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
(pointer to) ISV buffer (to send to the DPR) or NULL (pointer)  
Returns  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Pseudocode  
None  
Begin  
get an ISV buffer  
update ISV with current interrupt status  
if no valid interrupt condition  
return NULL  
if in ISR mode  
disable all detected interrupts  
return ISV  
else (Polling mode)  
call suni4x622DPR  
output NULL  
End  
Deferred-Processing Routine: suni4x622DPR  
This function acts on data contained in the passed ISV, allocates one or more DPV buffers (via  
sysSuni4x622DPVBufferGet) and invokes one or more callbacks (if defined and enabled).  
This routine is called by the application code, within sysSuni4x622DPRTask. Note that the  
callbacks are responsible for releasing the passed DPV. It is recommended that it be done as soon  
as possible to avoid running out of DPV buffers.  
void suni4x622DPR(void *ptmpisv)  
Prototype  
Inputs  
ptmpisv  
None  
: (pointer to) ISV buffer  
Outputs  
Returns  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
95  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Pseudocode  
None  
Begin  
for each ISV element (section)  
get and fill out a DPV buffer  
if callback (from suni4x622Init) is not NULL  
invoke (section) callback  
release ISV by calling sysSuni4x622ISVBufferRtn  
End  
4.12 Alarm, Status and Counts Functions  
Getting the Device Status: suni4x622GetStatusChan  
This function reports the current SOH, LOH, RPOH, payload and line interface status for a  
specific channel.  
INT4 suni4x622GetStatusChan(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_STATUS_CHAN  
*pstatusChan)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pstatusChan  
: (pointer to) channel status block  
Outputs  
Returns  
pstatusChan  
: (pointer to) updated channel status block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Status: suni4x622GetStatusSOH  
This function retrieves the SOH status.  
INT4 suni4x622GetStatusSOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_STATUS_SOH  
*pstatusSOH)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
96  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
pstatusSOH  
pstatusSOH  
: (pointer to) SOH status block  
: (pointer to) updated SOH status block  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Status: suni4x622GetStatusLOH  
This function retrieves the LOH status.  
INT4 suni4x622GetStatusLOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_STATUS_LOH  
*pstatusLOH)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pstatusLOH  
: (pointer to) LOH status block  
Outputs  
Returns  
pstatusLOH  
: (pointer to) updated LOH status block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Status: suni4x622GetStatusRPOH  
This function retrieves the RPOH status.  
INT4 suni4x622GetStatusRPOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_STATUS_RPOH  
*pstatusRPOH)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pstatusRPOH  
: (pointer to) RPOH status block  
Outputs  
pstatusRPOH  
: (pointer to) updated RPOH status block  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
97  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Status: suni4x622GetStatusIntfLine  
This function retrieves the Line Interface status.  
INT4 suni4x622GetStatusIntfLine(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel,  
Prototype  
sSUNI4x622_STATUS_INTF_LINE *pstatusLine)  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pstatusLine  
: (pointer to) LINE status block  
Outputs  
Returns  
pstatusLine  
: (pointer to) updated LINE status block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Status: suni4x622GetStatusPYLD  
This function retrieves the payload status.  
INT4 suni4x622GetStatusPYLD(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_STATUS_PYLD  
*pstatusPYLD)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pstatusPYLD  
: (pointer to) PYLD status block  
Outputs  
Returns  
pstatusPYLD  
: (pointer to) updated PYLD status block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
98  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Counts: suni4x622GetCountsChan  
This function retrieves all the counts for a specific channel.  
INT4 suni4x622GetCountsChan(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_CNTR_CHAN  
*pcountsChan)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pcountsChan  
: (pointer to) counter block  
Outputs  
Returns  
pcountsChan  
: (pointer to) updated counter block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Counts: suni4x622GetCountsSOH  
This function retrieves all the SOH counts.  
INT4 suni4x622GetCountsSOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_CNTR_SOH  
*pcountsSOH)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pcountsSOH  
: (pointer to) SOH counter block  
Outputs  
Returns  
pcountsSOH  
: (pointer to) updated SOH counter block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
99  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Counts: suni4x622GetCountsLOH  
This function retrieves all the LOH counts.  
INT4 suni4x622GetCountsLOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_CNTR_LOH  
*pcountsLOH)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pcountsLOH  
: (pointer to) LOH counter block  
Outputs  
Returns  
pcountsLOH  
: (pointer to) updated LOH counter block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Getting the Device Counts: suni4x622GetCountsRPOH  
This function retrieves all the RPOH counts.  
INT4 suni4x622GetCountsRPOH(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_CNTR_RPOH  
*pcountsRPOH)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pcountsRPOH  
: (pointer to) RPOH counter block  
Outputs  
Returns  
pcountsRPOH  
: (pointer to) updated RPOH counter block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
100  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Side Effects  
Getting the Device Counts: suni4x622GetCountsPYLD  
This function retrieves all the PYLD counts.  
INT4 suni4x622GetCountsPYLD(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, sSUNI4x622_CNTR_PYLD  
*pcountsPYLD)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
pcountsPYLD  
: (pointer to) PYLD counter block  
Outputs  
Returns  
pcountsPYLD  
: (pointer to) updated PYLD counter block  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ACTIVE, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
4.13 Device Diagnostics  
Testing Register Accesses: suni4x622DiagTestReg  
This function verifies the hardware access to the device registers by writing and reading back  
values.  
INT4 suni4x622DiagTestReg(sSUNI4x622_HNDL  
deviceHandle)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_PRESENT, SUNI4x622_INACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
101  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Enabling Line Loopbacks: suni4x622DiagLineLoop  
This function clears / sets a Line Loopback. It is up to the USER to perform any tests on the  
looped data.  
INT4 suni4x622DiagLineLoop(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: sets loop if non-zero, else clears loop  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Will inhibit the flow of active data  
Enabling Path Diagnostic Loopbacks: suni4x622DiagPathLoop  
This function clears / sets a Path Diagnostic Loopback. It is up to the USER to perform any tests  
on the looped data.  
INT4 suni4x622DiagPathLoop(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: sets loop if non-zero, else clears loop  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Will inhibit the flow of active data  
Enabling Data Diagnostic Loopbacks: suni4x622DiagDataLoop  
This function clears / sets a Data Diagnostic Loopback. It is up to the USER to perform any tests  
on the looped data.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
102  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
INT4 suni4x622DiagDataLoop(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: sets loop if non-zero, else clears loop  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Will inhibit the flow of active data  
Enabling Parallel Diagnostics Loopbacks: suni4x622DiagParaLoop  
This function clears / sets a Parallel Diagnostics Loopback. It is up to the USER to perform any  
tests on the looped data.  
INT4 suni4x622DiagParaLoop(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
channel  
: device handle (from suni4x622Add)  
: channel number  
enable  
: sets loop if non-zero, else clears loop  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Will inhibit the flow of active data  
Enabling Serial Diagnostics Loopbacks: suni4x622DiagSerialLoop  
This function clears / sets a Serial Diagnostics Loopback. It is up to the USER to perform any  
tests on the looped data.  
INT4 suni4x622DiagSerialLoop(sSUNI4x622_HNDL  
deviceHandle, UINT1 channel, UINT2 enable)  
Prototype  
Inputs  
deviceHandle  
: device handle (from suni4x622Add)  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
103  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
channel  
enable  
: channel number  
: sets loop if non-zero, else clears loop  
None  
Outputs  
Returns  
Success = SUNI4x622_SUCCESS  
Failure = SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
Will inhibit the flow of active data  
4.14 Callback Functions  
The S/UNI-4x622 driver has the capability to callback to functions within the USER code when  
certain events occur. These events and their associated callback routine declarations are detailed  
below. There is no USER code action that is required by the driver for these callbacks – the  
USER is free to implement these callbacks in any manner or else they can be deleted from the  
driver.  
The names given to the callback functions are given as examples only. The addresses of the  
callback functions invoked by the suni4x622DPR function are passed during the  
suni4x622Init call (inside a DIV). However the USER shall use the exact same prototype. The  
application is left responsible for releasing the passed DPV as soon as possible (to avoid running  
out of DPV buffers) by calling sysSuni4x622DPVBufferRtn either within the callback  
function or later inside the application code.  
Notifying the Application of SOH Events: cbackSuni4x622SOH  
This callback function is provided by the USER and is used by the DPR to report significant SOH  
section events back to the application. This function should be non-blocking. Typically, the  
callback routine sends a message to another task with the event identifier and other context  
information. The task that receives this message can then process this information according to  
the system requirements. Note: the callback function’s addresses are passed to the driver doing  
the suni4x622Init call. If the address of the callback function was passed as a NULL at  
initialization no callback will be made.  
void cbackSuni4x622SOH(sSUNI4x622_USR_CTXT usrCtxt,  
sSUNI4x622_DPV *pdpv)  
Prototype  
Inputs  
usrCtxt  
pdpv  
: user context (from suni4x622Add)  
: (pointer to) DPV that describes this event  
None  
None  
Outputs  
Returns  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
104  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
None  
Notifying the Application of LOH Events: cbackSuni4x622LOH  
This callback function is provided by the USER and is used by the DPR to report significant LOH  
section events back to the application. This function should be non-blocking. Typically, the  
callback routine sends a message to another task with the event identifier and other context  
information. The task that receives this message can then process this information according to  
the system requirements. Note: the callback function’s addresses are passed to the driver doing  
the suni4x622Init call. If the address of the callback function was passed as a NULL at  
initialization no callback will be made.  
void cbackSuni4x622LOH(sSUNI4x622_USR_CTXT usrCtxt,  
sSUNI4x622_DPV *pdpv)  
Prototype  
Inputs  
usrCtxt  
pdpv  
: user context (from suni4x622Add)  
: (pointer to) DPV that describes this event  
None  
Outputs  
None  
Returns  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
None  
Notifying the Application of RPOH Events: cbackSuni4x622RPOH  
This callback function is provided by the USER and is used by the DPR to report significant  
RPOH section events back to the application. This function should be non-blocking. Typically,  
the callback routine sends a message to another task with the event identifier and other context  
information. The task that receives this message can then process this information according to  
the system requirements. Note: the callback function’s addresses are passed to the driver doing  
the suni4x622Init call. If the address of the callback function was passed as a NULL at  
initialization no callback will be made.  
void cbackSuni4x622RPOH(sSUNI4x622_USR_CTXT usrCtxt,  
sSUNI4x622_DPV *pdpv)  
Prototype  
Inputs  
usrCtxt  
pdpv  
: user context (from suni4x622Add)  
: (pointer to) DPV that describes this event  
None  
Outputs  
None  
Returns  
SUNI4x622_ACTIVE  
Valid States  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
105  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
None  
Side Effects  
Notifying the Application of PYLD Events: cbackSuni4x622PYLD  
This callback function is provided by the USER and is used by the DPR to report significant  
PYLD section events back to the application. This function should be non-blocking. Typically, the  
callback routine sends a message to another task with the event identifier and other context  
information. The task that receives this message can then process this information according to  
the system requirements. Note: the callback function’s addresses are passed to the driver doing  
the suni4x622Init call. If the address of the callback function was passed as a NULL at  
initialization no callback will be made.  
void cbackSuni4x622PYLD(sSUNI4x622_USR_CTXT usrCtxt,  
sSUNI4x622_DPV *pdpv)  
Prototype  
Inputs  
usrCtxt  
pdpv  
: user context (from suni4x622Add)  
: (pointer to) DPV that describes this event  
None  
Outputs  
None  
Returns  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
None  
Notifying the Application of SYSINTF Events: cbackSuni4x622SysIntf  
This callback function is provided by the USER and is used by the DPR to report significant  
System Interface section events back to the application. This function should be non-blocking.  
Typically, the callback routine sends a message to another task with the event identifier and other  
context information. The task that receives this message can then process this information  
according to the system requirements. Note: the callback function’s addresses are passed to the  
driver doing the suni4x622Init call. If the address of the callback function was passed as a  
NULL at initialization no callback will be made.  
void cbackSuni4x622SysIntf(sSUNI4x622_USR_CTXT  
usrCtxt, sSUNI4x622_DPV *pdpv)  
Prototype  
Inputs  
usrCtxt  
pdpv  
: user context (from suni4x622Add)  
: (pointer to) DPV that describes this event  
None  
Outputs  
None  
Returns  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
106  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Application Programming Interface  
Notifying the Application of FIFO Events: cbackSuni4x622FIFO  
This callback function is provided by the USER and is used by the DPR to report significant  
FIFO section events back to the application. This function should be non-blocking. Typically, the  
callback routine sends a message to another task with the event identifier and other context  
information. The task that receives this message can then process this information according to  
the system requirements. Note: the callback function’s addresses are passed to the driver doing  
the suni4x622Init call. If the address of the callback function was passed as a NULL at  
initialization no callback will be made.  
void cbackSuni4x622FIFO(sSUNI4x622_USR_CTXT usrCtxt,  
sSUNI4x622_DPV *pdpv)  
Prototype  
Inputs  
usrCtxt  
pdpv  
: user context (from suni4x622Add)  
: (pointer to) DPV that describes this event  
None  
Outputs  
None  
Returns  
SUNI4x622_ACTIVE  
Valid States  
Side Effects  
None  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
107  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Hardware Interface  
5 HARDWARE INTERFACE  
The S/UNI-4x622 driver interfaces directly with the USER’s hardware. In this section, a listing of  
each point of interface is shown, along with a declaration and any specific porting instructions. It  
is the responsibility of the USER to connect these requirements into the hardware, either by  
defining a macro or by writing a function for each item listed. Care should be taken when  
matching parameters and return values.  
5.1 Device I/O  
Reading from a Device Register: sysSuni4x622Read  
This function is the most basic hardware connection. It reads the contents of a specific register  
location. This macro should be UINT1 oriented and should be defined by the user to reflect the  
target system’s addressing logic. There is no need for error recovery in this function.  
#define sysSuni4x622Read(ba, offset)  
Format  
Prototype  
Inputs  
UINT1 sysSuni4x622Read(void * ba, UINT2 offset)  
ba  
: base address  
offset  
: offset from the base address  
None  
Outputs  
Returns  
value read from the addressed register location  
Writing to a Device Register: sysSuni4x622Write  
This function is the most basic hardware connection. It writes the supplied value to the specific  
register location. This macro should be UINT1 oriented and should be defined by the user to  
reflect the target system’s addressing logic. There is no need for error recovery in this function.  
#define sysSuni4x622Write(ba, offset, data)  
Format  
UINT1 sysSuni4x622Write(void * ba, UINT2 offset,  
UINT1 data)  
Prototype  
Inputs  
ba  
: base address  
offset  
data  
: offset from the base address  
: data to be written  
None  
Outputs  
Returns  
Value written to the addressed register location  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
108  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Hardware Interface  
Polling a Bit: sysSuni4x622PollBit  
This function simply polls a register masked data until it is zero or times out.  
#define sysSuni4x622PollBit (base, offset, mask)  
Format  
INT4 sysSuni4x622PollBit (void *base, UINT2  
offset, UINT1 mask)  
Prototype  
Inputs  
base  
offset  
: base address of device being accessed  
: offset to the memory location as it  
appears in the hardware data-sheet.  
: mask to apply to byte read  
mask  
None  
Outputs  
Returns  
Success = 0  
Failure = <any other value>  
5.2 System-Specific Interrupt Servicing  
The porting of interrupt servicing routines and tasks across platforms is a complex task. There are  
many different implementations of these hardware specific functions. In this driver, the user is  
responsible for:  
Writing an interrupt handler (sysSuni4x622ISRHandler) that will be installed in the  
interrupt vector table of the system processor. This handler shall call suni4x622ISR for  
each device that has interrupt servicing enabled to perform the Interrupt-Service Routine  
(ISR) related activity required by each device  
Writing the routine that installs the ISR handler in the vector table of the system processor  
and spawns the DPR task (sysSuni4x622ISRHandlerInstall)  
Writing the routine that removes the ISR Handler from the vector table of the system  
processor and deletes/suspends the DPR task (sysSuni4x622ISRHandlerRemove)  
Installing the ISR Handler: sysSuni4x622ISRHandlerInstall  
This function installs the USER-supplied Interrupt-Service Routine (ISR),  
sysSuni4x622ISRHandler, into the processor’s interrupt vector table.  
#define sysSuni4x622ISRHandlerInstall()  
Format  
Prototype  
Inputs  
INT4 sysSuni4x622ISRHandlerInstall(void)  
None  
None  
Outputs  
Returns  
Success = 0  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
109  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Hardware Interface  
Failure = <any other value>  
Begin  
Pseudocode  
install sysSuni4x622ISRHandler in processor’s interrupt vector table  
End  
ISR Handler: sysSuni4x622ISRHandler  
This routine is invoked when one or more S/UNI-4x622 devices raise the interrupt line to the  
microprocessor. This routine invokes the driver-provided routine, suni4x622ISR, for each  
device registered with the driver.  
#define sysSuni4x622ISRHandler(intId)  
Void sysSuni4x622ISRHandler(UINT4 intId)  
Format  
Prototype  
Inputs  
intId  
None  
None  
Begin  
: interrupt identifier  
Outputs  
Returns  
Pseudocode  
for each device registered with the driver  
if ISR mode == ISR_MODE call suni4x622ISR  
if returned ISV buffer is not NULL  
send ISV buffer to the DPR  
End  
DPR Task: sysSuni4x622DPRTask  
This routine is installed as a separate task within the RTOS. It runs periodically and retrieves the  
interrupt status information sent to it by suni4x622ISR and then invokes suni4x622DPR for  
the appropriate device.  
#define sysSuni4x622DPRTask()  
Void sysSuni4x622DPRTask(void)  
Format  
Prototype  
Inputs  
None  
None  
None  
Outputs  
Returns  
Pseudocode  
Begin  
do  
wait for an ISV buffer (sent by suni4x622ISR)  
call suni4x622DPR with that ISV  
loop forever  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
110  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Hardware Interface  
End  
Removing the ISR Handler: sysSuni4x622ISRHandlerRemove  
This function disables Interrupt processing for this device. Removes the USER-supplied  
Interrupt-Service Routine (ISR), sysSuni4x622ISRHandler, from the processor’s interrupt  
vector table.  
#define sysSuni4x622ISRHandlerRemove()  
Format  
Void sysSuni4x622ISRHandlerRemove(void)  
Prototype  
Inputs  
None  
None  
None  
Outputs  
Returns  
Pseudocode  
Begin  
remove sysSuni4x622ISRHandler from the processor’s interrupt  
vector table  
End  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
111  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
RTOS Interface  
6 RTOS INTERFACE  
The S/UNI-4x622 driver requires the use of some RTOS resources. In this section, a listing of  
each required resource is shown, along with a declaration and any specific porting instructions. It  
is the responsibility of the USER to connect these requirements into the RTOS, either by defining  
a macro or writing a function for each item listed. Care should be taken when matching  
parameters and return values.  
6.1 Memory Allocation / De-Allocation  
Allocating Memory: sysSuni4x622MemAlloc  
This function allocates specified number of bytes of memory.  
#define sysSuni4x622MemAlloc(numBytes)  
Format  
Prototype  
Inputs  
UINT1 *sysSuni4x622MemAlloc(UINT4 numBytes)  
numBytes  
: number of bytes to be allocated  
None  
Outputs  
Returns  
Success = Pointer to first byte of allocated memory  
Failure = NULL pointer (memory allocation failed)  
Initialize Memory: sysSuni4x622MemSet  
This function initialize a block of memory with a given value.  
#define sysSuni4x622MemSet(pmem, val, sz)  
Format  
void sysSuni4x622MemSet(UINT1 *pmem, UINT1 val, UINT2  
sz)  
Prototype  
Inputs  
pmem  
val  
sz  
: (pointer to) the first byte of the memory  
: value to set  
: size  
None  
None  
Outputs  
Returns  
Copy Memory: sysSuni4x622MemCpy  
This function copies a block of memory.  
#define sysSuni4x622MemSet(pdst, psrc, sz)  
Format  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
112  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
RTOS Interface  
void sysSuni4x622MemSet(UINT1 *pdst, UINT1 *psrc,  
UINT2 sz)  
Prototype  
Inputs  
pdst  
psrc  
sz  
: (pointer to) the destination memory  
: (pointer to) the source memory  
: size  
None  
None  
Outputs  
Returns  
Freeing Memory: sysSuni4x622MemFree  
This function frees memory allocated using sysSuni4x622MemAlloc.  
#define sysSuni4x622MemFree(pfirstByte)  
Format  
Prototype  
Inputs  
void sysSuni4x622MemFree(UINT1 *pfirstByte)  
pfirstByte : (pointer to) first byte of the memory region being de-  
allocated  
None  
None  
Outputs  
Returns  
6.2 Buffer Management  
All operating systems provide some sort of buffer system, particularly for use in sending and  
receiving messages. The following calls, provided by the USER, allow the driver to Get and  
Return buffers from the RTOS. It is the USER’s responsibility to create any special resources or  
pools to handle buffers of these sizes during the sysSuni4x622BufferStart call.  
Starting Buffer Management: sysSuni4x622BufferStart  
This function alerts the RTOS that the time has come to make sure ISV buffers and DPV buffers  
are available and sized correctly. This may involve the creation of new buffer pools and it may  
involve nothing, depending on the RTOS.  
#define sysSuni4x622BufferStart()  
Format  
Prototype  
Inputs  
INT4 sysSuni4x622BufferStart(void)  
None  
None  
Outputs  
Returns  
Success = 0  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
113  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
RTOS Interface  
Failure = <any other value>  
Getting an ISV Buffer: sysSuni4x622ISVBufferGet  
This function gets a buffer from the RTOS that will be used by the ISR code to create an  
Interrupt-Service Vector (ISV). The ISV consists of data transferred from the devices interrupt  
status registers.  
#define sysSuni4x622ISVBufferGet()  
Format  
Prototype  
Inputs  
sSUNI4x622_ISV *sysSuni4x622ISVBufferGet(void)  
None  
None  
Outputs  
Returns  
Success = (pointer to) a ISV buffer  
Failure = NULL (pointer)  
Returning an ISV Buffer: sysSuni4x622ISVBufferRtn  
This function returns an ISV buffer to the RTOS when the information in the block is no longer  
needed by the DPR.  
#define sysSuni4x622ISVBufferRtn(pISV)  
Format  
Prototype  
Inputs  
void sysSuni4x622ISVBufferRtn(sSUNI4x622_ISV *pISV)  
pISV  
None  
None  
: (pointer to) a ISV buffer  
Outputs  
Returns  
Getting a DPV Buffer: sysSuni4x622DPVBufferGet  
This function gets a buffer from the RTOS that will be used by the DPR code to create a  
Deferred-Processing Vector (DPV). The DPV consists of information about the state of the device  
that is to be passed to the USER via a callback function.  
#define sysSuni4x622DPVBufferGet()  
Format  
Prototype  
Inputs  
sSUNI4x622_DPV *sysSuni4x622DPVBufferGet(void)  
None  
None  
Outputs  
Returns  
Success = (pointer to) a DPV buffer  
Failure = NULL (pointer)  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
114  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
RTOS Interface  
Returning a DPV Buffer: sysSuni4x622DPVBufferRtn  
This function returns a DPV buffer to the RTOS when the information in the block is no longer  
needed by the DPR.  
#define sysSuni4x622DPVBufferRtn(pDPV)  
Format  
Prototype  
Inputs  
Void sysSuni4x622DPVBufferRtn(sSUNI4x622_DPV *pDPV)  
pDPV  
None  
None  
: (pointer to) a DPV buffer  
Outputs  
Returns  
Stopping Buffer Management: sysSuni4x622BufferStop  
This function alerts the RTOS that the driver no longer needs any of the ISV buffers or DPV  
buffers and that if any special resources were created to handle these buffers, they can be deleted  
now.  
#define sysSuni4x622BufferStop()  
Format  
Prototype  
Inputs  
Void sysSuni4x622BufferStop(void)  
None  
None  
None  
Outputs  
Returns  
6.3 Timers  
Sleeping a Task: sysSuni4x622TimerSleep  
This function suspends execution of a driver task for a specified number of milliseconds.  
#define sysSuni4x622TimerSleep(time)  
Void sysSuni4x622TimerSleep(UINT4 time)  
Format  
Prototype  
Inputs  
time  
: sleep time in milliseconds  
None  
Outputs  
Returns  
Success = 0  
Failure = <any other value>  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
115  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
RTOS Interface  
6.4 Preemption  
Disabling Preemption: sysSuni4x622PreemptDisable  
This routine prevents the calling task from being preempted. If the driver is in interrupt mode, this  
routine locks out all interrupts as well as other tasks in the system. If the driver is in polling  
mode, this routine locks out other tasks only.  
#define sysSuni4x622PreemptDisable()  
INT4 sysSuni4x622PreemptDisable(void)  
Format  
Prototype  
Inputs  
None  
None  
Outputs  
Returns  
Preemption key (passed back as an argument in  
sysSuni4x622PreemptEn)  
Re-Enabling Preemption: sysSuni4x622PreemptEnable  
This routine allows the calling task to be preempted. If the driver is in interrupt mode, this routine  
unlocks all interrupts and other tasks in the system. If the driver is in polling mode, this routine  
unlocks other tasks only.  
#define sysSuni4x622PreemptEnable(key)  
Void sysSuni4x622PreemptEnable(INT4 key)  
Format  
Prototype  
Inputs  
key  
: preemption key (returned by sysSuni4x622PreemptDis)  
None  
None  
Outputs  
Returns  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
116  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Porting the S/UNI-4x622 Driver  
7 PORTING THE S/UNI-4X622 DRIVER  
This section outlines how to port the S/UNI-4x622 device driver to your hardware and OS  
platform. However, this manual can offer only guidelines for porting the S/UNI-4x622 driver  
because each platform and application is unique.  
7.1 Driver Source Files  
The C source files listed in the next table contain the code for the S/UNI-4x622 driver. You may  
need to modify the code or develop additional code. The code is in the form of constants, macros,  
and functions. For the ease of porting, the code is grouped into source files (src) and include  
files (inc). The src files contain the functions and the inc files contain the constants and  
macros.  
7.2 Driver Porting Procedures  
The following procedures summarize how to port the S/UNI-4x622 driver to your platform. The  
subsequent sections describe these procedures in more detail.  
To port the S/UNI-4x622 driver to your platform:  
Procedure 1: Port the driver’s OS extensions  
Procedure 2: Port the driver to your hardware platform  
Procedure 3: Port the driver’s application-specific elements  
Procedure 4: Build the driver  
Porting Assumptions  
The following porting assumptions have been made:  
It is assumed that RAM assigned to the driver’s static variables is initialized to ZERO before  
any driver function is called.  
It is assumed that a RAM stack of 4K is available to all of the driver’s non-ISR functions and  
that a RAM stack of 1K is available to the driver’s ISR functions.  
It is assumed that there is no memory management or MMU in the system or that all accesses  
by the driver, to memory or hardware can be direct.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
117  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Porting the S/UNI-4x622 Driver  
Procedure 1: Porting Driver OS Extensions  
The OS extensions encapsulate all OS specific services and data types used by the driver. The  
suni4x622_rtos.h file contains data types and compiler-specific data-type definitions. It also  
contains macros for OS specific services used by the OS extensions. These OS extensions  
include:  
Task management  
Message queues  
Events  
Memory Management  
In addition, you may need to modify functions that use OS specific services, such as utility and  
interrupt-event handling functions. The suni4x622_rtos.c file contains the utility and  
interrupt-event handler functions that use OS specific services.  
To port the driver’s OS extensions:  
1. Modify the data types in suni4x622_rtos.h. The number after the type identifies the  
data-type size. For example, UINT4 defines a 4-byte (32-bit) unsigned integer. Substitute the  
compiler types that yield the desired types as defined in this file.  
2. Modify the OS specific services in suni4x622_rtos.h. Redefine the following macros to  
the corresponding system calls that your target system supports:  
Service  
Type  
Macro Name  
Description  
sysSuni4x622MemAlloc  
sysSuni4x622MemFree  
sysSuni4x622MemSet  
sysSuni4x622MemCpy  
Memory  
Allocates the memory block  
Frees the memory block  
Set the memory value  
Copies the memory block from src to dest  
3. Modify the utilities and interrupt services that use OS specific services in the  
suni4x622_rtos.c and the suni4x622_hw.c. These file contains the utility and  
interrupt-event handler functions that use OS specific services. Refer to the function headers  
in this file for a detailed description of each of the functions listed below:  
Service Type Function Name  
Description  
sysSuni4x622TimerSleep  
Timer  
Sets the task execution delay  
in milliseconds  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
118  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Porting the S/UNI-4x622 Driver  
sysSuni4x622ISRHandlerIntInstall  
sysSuni4x622ISRHandlerRemove  
sysSuni4x622ISRHandler  
Interrupt  
Installs the interrupt handler  
for the OS  
Removes the interrupt  
handler from the OS  
Interrupt handler for the  
S/UNI-4x622 device  
sysSuni4x622DPRTask  
Deferred interrupt-processing  
routine (DPR)  
Procedure 2: Porting Drivers to Hardware Platforms  
This section describes how to modify the driver for your hardware platform.  
To port the driver to your hardware platform:  
1. Modify the low-level device read/write macros in the suni4x622_hw.h file. You may need  
to modify the raw read/write access macros (sysSuni4x622ReadReg and  
sysSuni4x622WriteReg) to reflect your system’s addressing logic.  
2. Define the hardware system-configuration constants in the suni4x622_hw.h file. Modify  
the following constants to reflect your system’s hardware configuration:  
Device Constant  
Description  
Default  
SUNI4x622_MAX_DEVS  
The maximum number of S/UNI-4x622 devices on each  
card  
5
Procedure 3: Porting Driver Application-Specific Elements  
Application specific elements are configuration constants used by the API for developing an  
application. This section describes how to modify the application specific elements in the driver.  
To port the driver’s application-specific elements:  
1. Define the following driver task-related constants for your OS-specific services in file  
suni4x622_hw.h and suni4x622_rtos.h:  
Task Constant  
Description  
Default  
SUNI4x622_DPR_TASK_PRIORITY  
Deferred Task (DPR) task priority  
85  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
119  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Porting the S/UNI-4x622 Driver  
SUNI4x622_DPR_TASK_STACK_SZ  
SUNI4x622_POLL_DELAY  
DPR task stack size, in bytes  
8192  
100  
The constant used in polling task mode  
defines the interval time in millisecond  
between each polling action  
SUNI4x622_TASK_SHUTDOWN_DELAY  
SUNI4x622_MAX_MSGS  
Delay time in millisecond. When  
clearing the DPR loop active flag in the  
DPR task, this delay is used to  
gracefully shutdown the DPR task  
before deleting it  
100  
The queue message depth of the queue  
used for pass interrupt context between  
the ISR task and DPR task  
1000  
2. Code the callback functions according to your application. The driver will call these callback  
functions when an event occurs on the device. The application is responsible for releasing the  
DPV buffer using sysSuni4x622DPVBufferRtn after necessary processing is completed.  
These functions must conform to the following prototypes:  
void cbackSuni4x622XX(sSUNI4x622_USR_CTXT usrCtxt, sSUNI4x622_DPV  
*pdpv)  
Procedure 4: Building the Driver  
This section describes how to build the driver.  
To build the driver:  
1. Ensure that the directory variable names in the makefile reflect your actual driver and  
directory names.  
2. Compile the source files and build the driver using your make utility.  
3. Link the driver to your application code.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
120  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix A: Coding Conventions  
APPENDIX A: CODING CONVENTIONS  
This section describes the coding conventions used in the implementation of all PMC-Sierra  
driver software.  
Variable Type Definitions  
Table 38: Variable Type Definitions  
Type  
UINT1  
UINT2  
UINT4  
INT1  
Description  
unsigned integer – 1 byte  
unsigned integer – 2 bytes  
unsigned integer – 4 bytes  
signed integer – 1 byte  
signed integer – 2 bytes  
signed integer – 4 bytes  
INT2  
INT4  
Naming Conventions  
Table 39 presents a summary of the naming conventions followed by all PMC-Sierra driver  
software. A detailed description is then given in the following sub-sections.  
The names used in the drivers are verbose enough to make their purpose fairly clear. This makes  
the code more readable. Generally, the device’s name or abbreviation appears in prefix.  
Table 39: Naming Conventions  
Type  
Case  
Naming convention  
Examples  
mSUNI4x622_GET_BIT  
Macros  
Uppercase  
prefix with “m” and device abbreviation  
SUNI4x622_MAX_POLL  
sSUNI4x622_DDB  
Constants Uppercase prefix with device abbreviation  
Structures Hungarian  
Notation  
prefix with “s” and device abbreviation  
suni4x622Add()  
API  
Hungarian prefix with device name  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
121  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix A: Coding Conventions  
Type  
Case  
Naming convention  
Examples  
Functions Notation  
sysSuni4x622Read()  
Porting  
Hungarian  
prefix with “sys” and device name  
Functions Notation  
utilSuni4x622Valid  
ateChan()  
Other  
Functions Notation  
Hungarian  
maxDevs  
Variables  
Hungarian  
Notation  
pmaxDevs  
Pointers to Hungarian  
prefix variable name with “p”  
variables  
Notation  
suni4x622Mdb  
Global  
variables  
Hungarian prefix with device name  
Notation  
Macros  
Macro names must be all uppercase  
Words shall be separated by an underscore  
The letter ‘m’ in lowercase is used as a prefix to specify that it is a macro, then the device  
abbreviation must appear  
Example: mSUNI4x622_GET_BIT is a valid name for a macro  
Constants  
Constant names must be all uppercase  
Words shall be separated by an underscore  
The device abbreviation must appear as a prefix  
Example: SUNI4x622_MAX_POLL is a valid name for a constant  
Structures  
Structure names must be all uppercase  
Words shall be separated by an underscore  
The letter ‘s’ in lowercase must be used as a prefix to specify that it is a structure, then the  
device abbreviation must appear  
Example: sSUNI4x622_DDB is a valid name for a structure  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
122  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix A: Coding Conventions  
Functions  
API Functions  
Naming of the API functions must follow the hungarian notation  
The device’s full name in all lowercase shall be used as a prefix  
Example: suni4x622Add() is a valid name for an API function  
Porting Functions  
Porting functions correspond to all function that are HW and/or RTOS dependent  
Naming of the porting functions must follow the hungarian notation  
The ‘sys’ prefix shall be used to indicate a porting function  
The device’s name starting with an uppercase must follow the prefix  
Example: sysSuni4x622Read() is a hardware / RTOS specific  
Other Functions  
Other functions are all the remaining functions that are part of the driver and have no special  
naming convention. However, they must follow the hungarian notation  
Example: utilSuni4x622ValidateChan() is a valid name for such a function  
Variables  
Naming of variables must follow the hungarian notation  
A pointer to a variable shall use ‘p’ as a prefix followed by the variable name unchanged. If  
the variable name already starts with a ‘p’, the first letter of the variable name may be  
capitalized, but this is not a requirement. Double pointers might be prefixed with ‘pp’, but  
this is not required  
Global variables must be identified with the device’s name in all lowercase as a prefix  
Examples: maxDevs is a valid name for a variable, pmaxDevs is a valid name for a pointer to  
maxDevs, and suni4x622Mdb is a valid name for a global variable. Note that both  
pprevBuf and pPrevBuf are accepted names for a pointer to the prevBuf variable, and that  
both pmatrix and ppmatrix are accepted names for a double pointer to the variable  
matrix  
File Organization  
The next table presents a summary of the file naming conventions. All file names must start with  
the device abbreviation, followed by an underscore and the actual file name. File names convey  
their purpose with a minimum number of characters.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
123  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix A: Coding Conventions  
Table 44: File Naming Conventions  
suni4x622_api.c  
API (Module and  
Device  
Management)  
Generic driver API block, contains Module &  
Device Management API such as installing/de-  
installing driver instances, read/writes, and  
initialization profiles.  
suni4x622_isr.c  
API (ISR)  
Interrupt processing is handled by this block.  
This includes both ISR and DPR management  
suni4x622_diag.c  
suni4x622_intf.c  
API (Diagnostics)  
Device diagnostic functions  
API (Interface  
Configuration)  
Interface configuration functions for connecting  
the device to external interfaces (i.e., PHY, PL3,  
UL2, SBI, Telecombus, clk/data, LVDS, etc.)  
suni4x622_stats.c  
API (Status and  
counts)  
Data collection block for all device  
results/counts not monitored through interrupt  
processing.  
suni4x622_aps.c,  
suni4x622_loh.c,  
suni4x622_poh.c,  
suni4x622_pyld.c,  
suni4x622_soh.c  
API (Device  
specific blocks)  
Device specific configuration functions defined  
in the driver architecture.  
suni4x622_hw.c,  
suni4x622_hw.h  
Hardware  
Dependent  
Hardware specific functions, constants and  
macros  
suni4x622_rtos.c,  
suni4x622_rtos.h  
RTOS Dependent  
RTOS specific functions, constants and macros  
suni4x622_util.c  
suni4x622_api.h  
suni4x622_err.h  
suni4x622_defs.h  
Other  
Utility functions  
Header file  
Header file  
Header file  
Prototypes for all the API functions of the driver  
Return codes  
Constants and macros, registers and bitmaps,  
enumerated types  
suni4x622_typs.h  
suni4x622_fns.h  
suni4x622_strs.h  
Header file  
Header file  
Header file  
Standard types definition (i.e., UINT1, UINT2,  
etc.)  
Prototypes for all the non-API functions used in  
the driver  
Structures definitions  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
124  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix B: Error Codes  
APPENDIX B: ERROR CODES  
The following describes the error codes used in the S/UNI 4x622 device driver  
SUNI4x622_SUCCESS  
Success  
SUNI4x622_FAILURE  
Failure  
SUNI4x622_ERR_MEM_ALLOC  
Memory allocation failure  
Invalid argument  
SUNI4x622_ERR_INVALID_ARG  
SUNI4x622_ERR_INVALID_CHAN  
SUNI4x622_ERR_INVALID_MODULE_STATE  
SUNI4x622_ERR_INVALID_MIV  
SUNI4x622_ERR_PROFILES_FULL  
SUNI4x622_ERR_INVALID_PROFILE  
SUNI4x622_ERR_INVALID_PROFILE_NUM  
SUNI4x622_ERR_INVALID_DEVICE_STATE  
SUNI4x622_ERR_DEVS_FULL  
Invalid channel number  
Invalid module state  
Invalid Module Initialization Vector  
Maximum number of profiles already added  
Invalid profile  
Invalid profile number  
Invalid device state  
Maximum number of devices already added  
Device already added  
SUNI4x622_ERR_DEV_ALREADY_ADDED  
SUNI4x622_ERR_INVALID_DEV  
SUNI4x622_ERR_INVALID_DIV  
SUNI4x622_ERR_INT_INSTALL  
SUNI4x622_ERR_INVALID_MODE  
SUNI4x622_ERR_INVALID_REG  
SUNI4x622_ERR_POLL_TIMEOUT  
Invalid device handle  
Invalid Device Initialization Vector  
Error while installing interrupts  
Invalid ISR/polling mode  
Invalid register number  
Time-out while polling  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
125  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix C: S/UNI-4x622 Events  
APPENDIX C: S/UNI-4X622 EVENTS  
Section Overhead Events (SOH)  
Error Code  
Description  
Out Of Frame event  
SUNI4x622_EVENT_SOH_OOF  
SUNI4x622_EVENT_SOH_LOF  
SUNI4x622_EVENT_SOH_LOS  
SUNI4x622_EVENT_SOH_SBIPE  
SUNI4x622_EVENT_SOH_TIU  
SUNI4x622_EVENT_SOH_TIM  
Loss Of Frame event  
Loss Of Signal event  
Section BIP error event  
Section Trace Unstable event  
Section Trace Mismatch event  
Line Overhead Events (LOH)  
Error Code  
Description  
SUNI4x622_EVENT_LOH_LAIS  
SUNI4x622_EVENT_LOH_LRDI  
SUNI4x622_EVENT_LOH_COAPS  
SUNI4x622_EVENT_LOH_COZ1S1  
SUNI4x622_EVENT_LOH_LBIPE  
SUNI4x622_EVENT_LOH_LREIE  
SUNI4x622_EVENT_LOH_PSBF  
SUNI4x622_EVENT_LOH_SDBER  
SUNI4x622_EVENT_LOH_SFBER  
Line Alarm Signal event  
Line Remote Defect event  
Change of APS bytes event  
Change of synchronization status event  
Line BIP error  
Line REI error  
APS Byte Failure  
Signal Defect event  
Signal Failure event  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
126  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix C: S/UNI-4x622 Events  
Path Overhead Events (RPOH)  
Error Code  
Description  
SUNI4x622_EVENT_RPOH_TIU  
SUNI4x622_EVENT_RPOH_TIM  
SUNI4x622_EVENT_RPOH_PSLMI  
SUNI4x622_EVENT_RPOH_PSLUI  
SUNI4x622_EVENT_RPOH_PRDI  
SUNI4x622_EVENT_RPOH_PERDI  
SUNI4x622_EVENT_RPOH_PBIPE  
SUNI4x622_EVENT_RPOH_PREI  
SUNI4x622_EVENT_RPOH_PAIS  
SUNI4x622_EVENT_RPOH_PPSE  
SUNI4x622_EVENT_RPOH_PNSE  
SUNI4x622_EVENT_RPOH_PLOPTR  
SUNI4x622_EVENT_RPOH_ARDI  
SUNI4x622_EVENT_RPOH_UNEQ  
SUNI4x622_EVENT_RPOH_PSL  
SUNI4x622_EVENT_RPOH_AISC  
SUNI4x622_EVENT_RPOH_LOPC  
SUNI4x622_EVENT_RPOH_NEWPTR  
SUNI4x622_EVENT_RPOH_ILLJREQ  
SUNI4x622_EVENT_RPOH_DISCOPA  
SUNI4x622_EVENT_RPOH_INVNDF  
SUNI4x622_EVENT_RPOH_ILLPTR  
SUNI4x622_EVENT_RPOH_NDF  
Path Trace Unstable event  
Path Trace Mismatch event  
Path Signal Label Mismatch event  
Path Signal Label Unstable event  
Path Remote Defect Indication event  
Path Enhanced Remote Defect Indication event  
Path BIP-8 error event  
Path REI error event  
Path AIS event  
Positive Pointer Justification event  
Negative Pointer Justification event  
Path Loss Of Pointer event  
Aux PRDI state event  
Trace Identifier Equipped state event  
Path Signal Label changed event  
Pointer AIS event  
Loss of Pointer Change event  
New pointer received event  
Illegal Pointer Justification event  
Discontinuous pointer change event  
Invalid NDF event  
Illegal pointer event  
NDF event  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
127  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix C: S/UNI-4x622 Events  
Payload Events (PYLD)  
Error Code  
Description  
SUNI4x622_EVENT_PYLD_LCD  
SUNI4x622_EVENT_PYLD_CHCS  
SUNI4x622_EVENT_PYLD_FCS  
SUNI4x622_EVENT_PYLD_RXCPXFER  
SUNI4x622_EVENT_PYLD_TXCPXFER  
SUNI4x622_EVENT_PYLD_ABRT  
SUNI4x622_EVENT_PYLD_MAXL  
SUNI4x622_EVENT_PYLD_MINL  
SUNI4x622_EVENT_FIFO_RXCPFOVR  
SUNI4x622_EVENT_FIFO_RXFPFOVR  
SUNI4x622_EVENT_FIFO_TXFPFUDR  
SUNI4x622_EVENT_PYLD_OOCD  
Loss of Cell Delineation event  
Corrected/Uncorrected HCS error event  
FCS error event  
Transfer of Rx CP accumulated counter data event  
Transfer of Tx CP accumulated counter event  
Aborted packet received event  
Maximum packet length violated event  
Minimum packet length violated event  
Rx Cell FIFO overrun event  
Rx Frame FIFO overrun event  
Tx Frame FIFO overrun event  
Change in Cell Delineation state event  
Line Interface Events (INTF_LINE)  
Error Code  
Description  
SUNI4x622_EVENT_INTF_LINE_WANS  
WANS phase detector averaging period has  
begun event  
SUNI4x622_EVENT_INTF_LINE_LOT  
SUNI4x622_EVENT_INTF_LINE_ROOL  
SUNI4x622_EVENT_INTF_LINE_DOOL  
Loss of Transition event  
Recovered Reference out of lock event  
Recovered data out of lock event  
System Interface Events (SYS_INTF)  
Error Code  
Description  
SUNI4x622_EVENT_SYS_INTF_TXOP  
event that occurs when TSOP or TSEP is not  
asserted with the first or last word of a POS-PHY  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
128  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
Appendix C: S/UNI-4x622 Events  
Error Code  
Description  
packet  
SUNI4x622_EVENT_SYS_INTF_UNPROV  
event that occurs when a non-existent channel  
buffer is detected during in-band addressing  
SUNI4x622_EVENT_SYS_INTF_CAM  
SUNI4x622_EVENT_SYS_INTF_TPRTY  
SUNI4x622_EVENT_SYS_INTF_TSOC  
SUNI4x622_EVENT_SYS_INTF_FOVR  
SUNI4x622_EVENT_SYS_INTF_FUNR  
data field mismatch event  
Tx Parity error event  
start of cell re-alignment interrupt  
FIFO overrun event  
FIFO underrun event  
Automatic Protection Switching Events (APS)  
Error Code  
Description  
SUNI4x622_EVENT_APS_BIP  
SUNI4x622_EVENT_APS_LOS  
SUNI4x622_EVENT_APS_LOF  
SUNI4x622_EVENT_APS_OOF  
SUNI4x622_EVENT_APS_LOT  
SUNI4x622_EVENT_APS_DOOL  
SUNI4x622_EVENT_APS_ROOL  
SUNI4x622_EVENT_APS_ESE  
SUNI4x622_EVENT_APS_PJ  
BIP-8 error event  
Loss of Signal event  
Loss of Frame  
Out of Frame  
Loss of Transition  
Recovered Data out of lock  
Recovered reference out of lock  
Elastic store FIFO error  
Pointer Justification  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
129  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
LIST OF TERMS  
APPLICATION: Refers to protocol software used in a real system as well as validation software  
written to validate the S/UNI-4x622 driver on a validation platform.  
API (Application Programming Interface): Describes the connection between this module and the  
user’s application code.  
ISR (Interrupt-Service Routine): A common function for intercepting and servicing device events.  
This function is kept as short as possible because an Interrupt preempts every other function  
starting the moment it occurs and gives the service function the highest priority while running.  
Data is collected, Interrupt indicators are cleared and the function ended.  
DPR (Deferred-Processing Routine): This function is installed as a task, at a user configurable  
priority, that serves as the next logical step in Interrupt processing. Data that was collected by the  
ISR is analyzed and then calls are made into the application that inform it of the events that  
caused the ISR in the first place. Because this function is operating at the task level, the user can  
decide on its importance in the system, relative to other functions.  
DEVICE: ONE S/UNI-4x622 Integrated Circuit. There can be many devices, all served by this  
one driver module.  
DIV (Device Initialization Vector): Structure passed from the API to the device during  
initialization; it contains parameters that identify the specific modes and arrangements of the  
physical device being initialized.  
DDB (Device Data Block): Structure that holds the Configuration Data for each device.  
DSB (Device Status Block): Structure that holds the Alarms, Status, and Counts for each  
device.  
MODULE: All of the code that is part of this driver, there is only one instance of this module  
connected to one or more S/UNI-4x622 chips.  
MIV (Module Initialization Vector): Structure passed from the API to the module during  
initialization, it contains parameters that identify the specific characteristics of the driver  
module being initialized.  
MDB (Module Data Block): Structure that holds the Configuration Data for this module.  
RTOS (Real Time Operating System): The host for this driver.  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
130  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
ACRONYMS  
API: Application Programming Interface  
APS: Automatic Protection Switch  
ATM: Asynchronous Transfer Mode  
DDB: Device Data Block  
DIV: Device Initialization Vector  
DPR: Deferred-Processing Routine  
DPV: Deferred-Processing (routine) Vector  
DSB: Device Status Block  
FIFO: First In, First Out  
ISR: Interrupt-Service Routine  
ISV: Interrupt-Service (routine) Vector  
LOH: Line Overhead  
MDB: Module Data Block  
MIV: Module Initialization Vector  
POH: Path Overhead  
PYLD: Payload  
RPOH: Receive Path Overhead  
RTOS: Real-Time Operating System  
SDH: Synchronous Digital Hierarchy  
SONET: Synchronous Optical Network  
TPOH: Transmit Path Overhead  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
131  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
INDEX  
suni4x622GetInitProfile-54  
A
suni4x622GetMask-28, 81  
suni4x622GetMaskAPS-93  
suni4x622GetMaskFIFO-88  
suni4x622GetMaskIntf-91  
api functions  
suni4x622Activate-58  
suni4x622Add-34, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,  
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,  
79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,  
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,  
105, 106, 107, 121, 123  
suni4x622GetMaskIntfLine-90  
suni4x622GetMaskLOH-84  
suni4x622GetMaskPYLD-87  
suni4x622GetMaskRPOH-85  
suni4x622GetMaskSOH-82  
suni4x622GetMaskSysIntf-91  
suni4x622GetStatusChan-96  
suni4x622GetStatusLineIntf-98  
suni4x622GetStatusLOH-97  
suni4x622GetStatusPYLD-98  
suni4x622GetStatusRPOH-97  
suni4x622GetStatusSOH-96  
suni4x622Init-27, 56, 57, 94, 96, 104, 105, 106, 107  
suni4x622IntfSysResetRDLL-77  
suni4x622IntfSysResetTDLL-77  
suni4x622ISR-17, 23, 24, 25, 94, 95, 110  
suni4x622ISRConfig-81, 94  
suni4x622LineIntfCfg-76  
suni4x622AddInitProfile-54  
suni4x622APSCfg-78  
suni4x622APSResetRxLink-79  
suni4x622APSResetTxLink-80  
suni4x622APSXcnntCfg-79  
suni4x622ClrMask-28, 82  
suni4x622ClrMaskAPS-94  
suni4x622ClrMaskFIFO-89  
suni4x622ClrMaskIntf-92  
suni4x622ClrMaskIntfLine-91  
suni4x622ClrMaskLOH-85  
suni4x622ClrMaskPYLD-88  
suni4x622ClrMaskRPOH-86  
suni4x622ClrMaskSOH-83  
suni4x622ClrMaskSysIntf-92  
suni4x622DeActivate-58  
suni4x622LOHForceAIS-67  
suni4x622LOHForceB2-67  
suni4x622LOHForceRDI-68  
suni4x622LOHReadK1K2-66  
suni4x622LOHReadS1-67  
suni4x622LOHWriteK1K2-65  
suni4x622LOHWriteS1-66  
suni4x622Mdb-51, 122  
suni4x622Delete-24, 52, 53, 56  
suni4x622DeleteInitProfile-55  
suni4x622DiagDataLoop-102, 103  
suni4x622DiagLineLoop-102  
suni4x622DiagParaLoop-103  
suni4x622DiagPathLoop-102  
suni4x622DiagSerialLoop-103  
suni4x622DiagTestReg-101  
suni4x622DPR-17, 23, 24, 25, 95, 104, 110  
suni4x622FIFOCfg-75  
suni4x622ModuleClose-52  
suni4x622ModuleOpen-26, 52  
suni4x622ModuleStart-53  
suni4x622FIFOReset-75  
suni4x622ModuleStop-53  
suni4x622GetCountsChan-99  
suni4x622GetCountsLOH-100  
suni4x622GetCountsPYLD-101  
suni4x622GetCountsRPOH-100  
suni4x622GetCountsSOH-99  
suni4x622Poll-24, 25, 27, 81, 94  
suni4x622PyldCfg-74  
suni4x622Read-59  
suni4x622ReadBlock-60  
suni4x622Reset-57  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
132  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
suni4x622RPCfg-78  
cbackSuni4x622PYLD-106  
suni4x622RPOHSDCfg-65  
suni4x622RPOHSFCfg-64  
suni4x622RPOHTraceMsg-69  
suni4x622SetInitProfile-27  
suni4x622SetMask-28, 81, 82  
suni4x622SetMaskAPS-93  
suni4x622SetMaskFIFO-89  
suni4x622SetMaskIntf-92  
suni4x622SetMaskIntfLine-90  
suni4x622SetMaskLOH-84  
suni4x622SetMaskPYLD-87  
suni4x622SetMaskRPOH-86  
suni4x622SetMaskSOH-83  
suni4x622SetMaskSysIntf-92  
suni4x622SOHForceA1-62  
suni4x622SOHForceB1-63  
suni4x622SOHForceLOS-64  
suni4x622SOHForceOOF-63  
suni4x622SOHTraceMsg-62  
suni4x622SOHWriteJ0-61  
suni4x622SysIntfCfg-76  
cbackSuni4x622RPOH-105  
cbackSuni4x622SOH-104  
cbackSuni4x622SysIntf-106  
constants  
SUNI4x622_ACTIVE-26, 34, 56, 57, 58, 59, 60, 61, 62,  
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,  
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,  
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,  
104, 105, 106, 107  
SUNI4x622_DPR_EVENT-51  
SUNI4x622_DPR_TASK_PRIORITY-119  
SUNI4x622_DPR_TASK_STACK_SZ-120  
SUNI4x622_ERR_DEV_ALREADY_ADDED-125  
SUNI4x622_ERR_DEVS_FULL-125  
SUNI4x622_ERR_INT_INSTALL-125  
SUNI4x622_ERR_INVALID_ARG-125  
SUNI4x622_ERR_INVALID_CHAN-125  
SUNI4x622_ERR_INVALID_DEV-125  
SUNI4x622_ERR_INVALID_DEVICE_STATE-125  
SUNI4x622_ERR_INVALID_DIV-125  
SUNI4x622_ERR_INVALID_MIV-125  
SUNI4x622_ERR_INVALID_MODE-125  
SUNI4x622_ERR_INVALID_MODULE_STATE-125  
SUNI4x622_ERR_INVALID_PROFILE-125  
SUNI4x622_ERR_INVALID_PROFILE_NUM-125  
SUNI4x622_ERR_INVALID_REG-125  
SUNI4x622_ERR_MEM_ALLOC-125  
SUNI4x622_ERR_POLL_TIMEOUT-125  
SUNI4x622_ERR_PROFILES_FULL-125  
SUNI4x622_EVENT_APS_BIP-129  
suni4x622THPPForceB3-72  
suni4x622TPCfg-79  
suni4x622TPOHForceAIS-74  
suni4x622TPOHForceARDI-73  
suni4x622TPOHForceB3-71  
suni4x622TPOHForceERDI-73  
suni4x622TPOHForcePJ-72  
suni4x622TPOHForceRDI-72  
suni4x622TPOHInsertTxPtr-71  
suni4x622TPOHWriteC2-70  
suni4x622TPOHWriteJ1-69  
suni4x622TPOHWriteNDF-70  
suni4x622TPOHWriteSS-71  
suni4x622Update-57  
SUNI4x622_EVENT_APS_DOOL-129  
SUNI4x622_EVENT_APS_ESE-129  
SUNI4x622_EVENT_APS_LOF-129  
SUNI4x622_EVENT_APS_LOS-129  
SUNI4x622_EVENT_APS_LOT-129  
SUNI4x622_EVENT_APS_OOF-129  
SUNI4x622_EVENT_APS_PJ-129  
suni4x622Write-59  
SUNI4x622_EVENT_INTF_LINE_DOOL-128  
SUNI4x622_EVENT_INTF_LINE_LOT-128  
SUNI4x622_EVENT_INTF_LINE_ROOL-128  
SUNI4x622_EVENT_INTF_LINE_WANSINTEN-128  
SUNI4x622_EVENT_INTF_SYS_CAM-129  
SUNI4x622_EVENT_INTF_SYS_FOVR-129  
suni4x622WriteBlock-60  
C
callbacks  
cbackSuni4x622FIFO-107  
cbackSuni4x622LOH-105  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
133  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
SUNI4x622_EVENT_INTF_SYS_FUNR-129  
SUNI4x622_EVENT_INTF_SYS_TPRTY-129  
SUNI4x622_EVENT_INTF_SYS_TSOC-129  
SUNI4x622_EVENT_INTF_SYS_TXOP-128  
SUNI4x622_EVENT_INTF_SYS_UNPROV-129  
SUNI4x622_EVENT_LOH_COAPS-126  
SUNI4x622_EVENT_LOH_COZ1S1-126  
SUNI4x622_EVENT_LOH_LAIS-126  
SUNI4x622_EVENT_LOH_LBIPE-126  
SUNI4x622_EVENT_LOH_LRDI-126  
SUNI4x622_EVENT_LOH_LREIE-126  
SUNI4x622_EVENT_LOH_PSBF-126  
SUNI4x622_EVENT_LOH_SDBER-126  
SUNI4x622_EVENT_POH_AISC-127  
SUNI4x622_EVENT_POH_ARDI-127  
SUNI4x622_EVENT_POH_DISCOPA-127  
SUNI4x622_EVENT_POH_ILLJREQ-127  
SUNI4x622_EVENT_POH_ILLPTR-127  
SUNI4x622_EVENT_POH_INVNDF-127  
SUNI4x622_EVENT_POH_LOPC-127  
SUNI4x622_EVENT_POH_NDF-127  
SUNI4x622_EVENT_POH_NEWPTR-127  
SUNI4x622_EVENT_POH_PAIS-127  
SUNI4x622_EVENT_POH_PBIPE-127  
SUNI4x622_EVENT_POH_PERDI-127  
SUNI4x622_EVENT_POH_PFEBE-127  
SUNI4x622_EVENT_POH_PLOPTR-127  
SUNI4x622_EVENT_POH_PNSE-127  
SUNI4x622_EVENT_POH_PPSE-127  
SUNI4x622_EVENT_POH_PRDI-127  
SUNI4x622_EVENT_POH_PRPSLMI-127  
SUNI4x622_EVENT_POH_PRPSLUI-127  
SUNI4x622_EVENT_POH_PSL-127  
SUNI4x622_EVENT_POH_TIM-127  
SUNI4x622_EVENT_POH_TIU-127  
SUNI4x622_EVENT_PYLD_RXCPFOVR-128  
SUNI4x622_EVENT_PYLD_RXCPXFER-128  
SUNI4x622_EVENT_PYLD_RXFPFOVR-128  
SUNI4x622_EVENT_PYLD_TXCPXFER-128  
SUNI4x622_EVENT_PYLD_TXFPFUDR-128  
SUNI4x622_EVENT_SOH_LOF-126  
SUNI4x622_EVENT_SOH_LOS-126  
SUNI4x622_EVENT_SOH_OOF-126  
SUNI4x622_EVENT_SOH_SBIPE-126  
SUNI4x622_EVENT_SOH_TIM-126  
SUNI4x622_EVENT_SOH_TIU-126  
SUNI4x622_FAILURE-33, 34, 51, 125  
SUNI4x622_INACTIVE-26, 34, 56, 57, 58, 59, 60, 61, 62,  
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,  
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,  
91, 92, 93, 94, 96, 97, 98, 99, 100, 101  
SUNI4x622_ISR_MODE-27, 81  
SUNI4x622_MAX_DEVS-26, 119  
SUNI4x622_MAX_MSGS-120  
SUNI4x622_MOD_IDLE-26, 33, 52, 53, 54, 55  
SUNI4x622_MOD_READY-26, 33, 53, 54, 55, 56  
SUNI4x622_MOD_START-26, 33, 52, 53  
SUNI4x622_POLL_DELAY-120  
SUNI4x622_POLL_MODE-27, 81  
SUNI4x622_PRESENT-26, 34, 56, 57, 58, 59, 60, 61,  
101  
SUNI4x622_START-26, 34  
SUNI4x622_SUCCESS-52, 53, 54, 55, 56, 57, 58, 61, 62,  
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,  
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,  
91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104,  
125  
SUNI4x622_TASK_SHUTDOWN_DELAY-120  
D
device  
stateDevice-26, 34, 35, 51  
driver  
SUNI4x622_EVENT_POH_UNEQ-127  
SUNI4x622_EVENT_PYLD_ABRT-128  
SUNI4x622_EVENT_PYLD_CHCS-128  
SUNI4x622_EVENT_PYLD_FCS-128  
SUNI4x622_EVENT_PYLD_LCD-128  
SUNI4x622_EVENT_PYLD_MAXL-128  
SUNI4x622_EVENT_PYLD_MINL-128  
SUNI4x622_EVENT_PYLD_OOCD-128  
inc file  
suni4x622_api.h-124  
suni4x622_defs.h-124  
suni4x622_err.h-124  
suni4x622_fns.h-124  
suni4x622_hw.h-119, 124  
suni4x622_rtos.h-118, 119, 124  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
134  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
suni4x622_strs.h-124  
suni4x622_typs.h-124  
perrDevice-55  
pfifocfg-75, 76  
pfirstByte-113  
pISV-114  
pJ0-62  
src file  
suni4x622_api.c-124  
suni4x622_aps.c-124  
suni4x622_diag.c-124  
suni4x622_hw.c-118, 124  
suni4x622_intf.c-124  
suni4x622_isr.c-124  
suni4x622_loh.c-124  
suni4x622_poh.c-124  
suni4x622_pyld.c-124  
suni4x622_rtos.c-118, 124  
suni4x622_soh.c-124  
suni4x622_stats.c-124  
suni4x622_util.c-124  
pJ1-69  
pK1-66  
pK2-66  
plinecfg-76  
pmask-60, 61, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,  
92, 93, 94  
pmem-112  
pmiv-52  
pProfile-54  
pProfileNum-54  
ppyldcfg-74  
profileNum-35, 54, 55, 56, 57  
pS1-67  
E
psdcfg-65  
enumerated types  
psfcfg-64  
eSUNI4x622_DEV_STATE-35  
eSUNI4x622_ISR_MODE-27, 35, 81  
eSUNI4x622_MOD_STATE-34  
psrc-112, 113  
pstatusChan-96  
pstatusLine-98  
pstatusLOH-97  
pstatusPYLD-98  
pstatusRPOH-97  
pstatusSOH-96, 97  
psyscfg-76  
error  
errDevice-34, 51, 55  
errModule-27, 33, 51  
M
module  
ptmpisv-95  
stateModule-26, 33, 34, 51  
S
P
structures  
pointers  
sSUNI4x622_CBACK-28, 35  
pBaseAddr-55  
sSUNI4x622_CFG_CHAN-28, 35, 36  
sSUNI4x622_CFG_CLK-41, 42  
pblock-60, 61  
pcountsChan-99  
pcountsLOH-100  
pcountsPYLD-101  
pcountsRPOH-100  
pcountsSOH-99  
pddb-34, 51  
sSUNI4x622_CFG_FIFO-36, 41, 75  
sSUNI4x622_CFG_GLOBAL-28, 35, 36  
sSUNI4x622_CFG_INTF_LINE_GLOBAL-36, 44, 76  
sSUNI4x622_CFG_INTF_SYS_GLOBAL-36, 43, 76  
sSUNI4x622_CFG_LINE_INTF-36, 42  
sSUNI4x622_CFG_LOH-36, 37  
pdiv-56, 57  
sSUNI4x622_CFG_PYLD-36, 40, 74  
sSUNI4x622_CFG_RALRM-42, 43  
pdpv-104, 105, 106, 107, 120  
pdst-112, 113  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
135  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PM5358 S/UNI-4x622 Driver Manual  
sSUNI4x622_CFG_RPOH-36, 38  
sSUNI4x622_CFG_SD-44, 65  
sSUNI4x622_STATUS_LOH-45, 46, 97  
sSUNI4x622_STATUS_PYLD-45, 47  
sSUNI4x622_STATUS_RPOH-45, 46, 97  
sSUNI4x622_STATUS_SOH-45, 96  
sSUNI4x622_CFG_SF-44, 64  
sSUNI4x622_CFG_SOH-36, 37  
sSUNI4x622_CFG_TPOH-36, 38  
sSUNI4x622_CNTR_CHAN-48, 99  
sSUNI4x622_CNTR_LOH-48, 49, 100  
sSUNI4x622_CNTR_PYLD-48, 49, 101  
sSUNI4x622_CNTR_RPOH-48, 49, 100  
sSUNI4x622_CNTR_SOH-48, 99  
sSUNI4x622_DDB-34, 121, 122  
sSUNI4x622_USR_CTXT-35, 55, 104, 105, 106, 107,  
120  
system-specific functions  
sysSuni4x622BufferStart-50, 113  
sysSuni4x622BufferStop-115  
sysSuni4x622DPRTask-23, 24, 95, 110, 119  
sysSuni4x622DPVBufferGet-95, 114  
sysSuni4x622DPVBufferRtn-104, 115, 120  
sysSuni4x622ISRHandler-23, 24, 95, 109, 110, 111, 119  
sysSuni4x622ISRHandlerInstall-24, 109  
sysSuni4x622ISRHandlerIntInstall-119  
sysSuni4x622ISRHandlerRemove-111, 119  
sysSuni4x622ISVBufferGet-50, 114  
sysSuni4x622ISVBufferRtn-50, 96, 114  
sysSuni4x622MemAlloc-112, 113, 118  
sysSuni4x622MemCpy-112, 118  
sSUNI4x622_DIV-27, 34, 54, 56, 57  
sSUNI4x622_DPV-51, 104, 105, 106, 107, 114, 115, 120  
sSUNI4x622_HNDL-50, 55, 56, 57, 58, 59, 60, 61, 62, 63,  
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,  
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,  
92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103  
sSUNI4x622_ISV-50, 114  
sSUNI4x622_MASK_ISR-28, 29, 31, 32, 35, 50, 81, 82,  
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94  
sSUNI4x622_MASK_ISR_APS-28, 32  
sSUNI4x622_MASK_ISR_CHAN-28, 29  
sSUNI4x622_MASK_ISR_FIFO-29, 31  
sSUNI4x622_MASK_ISR_INTF_LINE-29, 32  
sSUNI4x622_MASK_ISR_INTF_SYS__GLOBAL-28  
sSUNI4x622_MASK_ISR_LOH-29  
sysSuni4x622MemFree-113, 118  
sysSuni4x622MemSet-112, 113, 118  
sysSuni4x622PollBit-109  
sysSuni4x622PreemptDis-116  
sysSuni4x622PreemptDisable-116  
sysSuni4x622PreemptEn-116  
sSUNI4x622_MASK_ISR_PYLD-29, 31  
sSUNI4x622_MASK_ISR_RPOH-29  
sSUNI4x622_MASK_ISR_SOH-29  
sysSuni4x622PreemptEnable-116  
sysSuni4x622Read-59, 60, 108, 122, 123  
sysSuni4x622ReadReg-119  
sSUNI4x622_MIV-27, 52  
sSUNI4x622_STATUS_CHAN-45, 96  
sSUNI4x622_STATUS_CLK-47, 48  
sSUNI4x622_STATUS_LINE_INTF-45, 48, 98  
sysSuni4x622TimerSleep-115, 118  
sysSuni4x622Write-59, 60, 108  
sysSuni4x622WriteReg-119  
Proprietary and Confidential to PMC-Sierra, Inc.  
Document ID: PMC-2010419, Issue 1  
136  
Download from Www.Somanuals.com. All Manuals Search And Download.  

Pelco Video Gaming Accessories c06hwc User Manual
Pelican DVD Recorder MD3200M User Manual
Philips Portable DVD Player FET941D User Manual
Planet Technology Switch GSD 503 User Manual
Plantronics Headphones C315 User Manual
PMC Sierra Power Screwdriver PM5358 S UNI 4x622 User Manual
Poulan Trimmer 545123431 User Manual
Presto Kitchen Utensil 8800 User Manual
Pro Tech Computer Hardware EB 471LF M1 User Manual
Proview Saw 6537 22 User Manual