# CHIP Functions
[CHIP]

## Functions
Uint32 | CSL_chipReadReg (CSL_ChipReg reg)
Uint32 | CSL_chipWriteReg (CSL_ChipReg reg, CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipReadAMR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadCSR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadIFR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadIER ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadISTP ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadIRP ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadNRP ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadERP ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadTSCL ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadTSCH ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadARP ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadILC ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadRILC ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadREP ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadPCE1 ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadDNUM ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadSSR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadGPLYA ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadGPLYB ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadGFPGFR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadDIER ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadTSR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadITSR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadNTSR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadEFR ()
CSL_IDEF_INLINE Uint32 | CSL_chipReadIERR ()
CSL_IDEF_INLINE Uint32 | CSL_chipWriteAMR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteCSR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteISR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteICR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteIER (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteISTP (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteIRP (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteNRP (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteERP (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteTSCL (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteARP (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteILC (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteRILC (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteREP (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteSSR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteGPLYA (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteGPLYB (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteGFPGFR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteDIER (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteTSR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteITSR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteNTSR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteECR (CSL_Reg32 val)
CSL_IDEF_INLINE Uint32 | CSL_chipWriteIERR (CSL_Reg32 val)

## Function Documentation

CSL_IDEF_INLINE Uint32 CSL_chipReadAMR | ( |  | ) |

============================================================================
CSL_chipReadAMR

Description
This API reads the Addressing Mode (AMR) control register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
AMR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 amrVal;
            amrVal = CSL_chipReadAMR ();

===========================================================================

Addressing Mode Register

CSL_IDEF_INLINE Uint32 CSL_chipReadARP | ( |  | ) |

============================================================================
CSL_chipReadARP

Description
This API reads the Analysis Return Pointer (ARP) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
ARP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 arpVal;
            arpVal = CSL_chipReadARP ();

===========================================================================

Analysis Return Pointer

CSL_IDEF_INLINE Uint32 CSL_chipReadCSR | ( |  | ) |

============================================================================
CSL_chipReadCSR

Description
This API reads the Control Status (CSR) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
CSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 csrVal;
            csrVal = CSL_chipReadCSR ();

===========================================================================

Control Status Register

CSL_IDEF_INLINE Uint32 CSL_chipReadDIER | ( |  | ) |

============================================================================
CSL_chipReadDIER

Description
This API reads the Debug Interrupt Enable Register (DIER) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
DIER

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 dierVal;
            dierVal = CSL_chipReadDIER ();

===========================================================================

Debug Interrupt Enable Register

CSL_IDEF_INLINE Uint32 CSL_chipReadDNUM | ( |  | ) |

============================================================================
CSL_chipReadDNUM

Description
This API reads the DSP Core Number (DSPNUM) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
DNUM

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 dnumVal;
            dnumVal = CSL_chipReadDNUM ();

===========================================================================

DSP Core Number Register

CSL_IDEF_INLINE Uint32 CSL_chipReadEFR | ( |  | ) |

============================================================================
CSL_chipReadEFR

Description
This API reads the Exception Flag Register (EFR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
EFR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 efrVal;
            efrVal = CSL_chipReadEFR ();

===========================================================================

Exception Flag Register

CSL_IDEF_INLINE Uint32 CSL_chipReadERP | ( |  | ) |

============================================================================
CSL_chipReadERP

Description
This API reads the Exception Return Pointer register (ERP) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
NRP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 erpVal;
            erpVal = CSL_chipReadERP ();

===========================================================================

Exception Return Pointer Registers

CSL_IDEF_INLINE Uint32 CSL_chipReadGFPGFR | ( |  | ) |

============================================================================
CSL_chipReadGFPGFR

Description
This API reads the Galios Field Multiply Control Register (GFPGFR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
GFPGFR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 gfpgfrVal;
            gfpgfrVal = CSL_chipReadGFPGFR ();

===========================================================================

Galois Field Polynomial Generator Function Register

CSL_IDEF_INLINE Uint32 CSL_chipReadGPLYA | ( |  | ) |

============================================================================
CSL_chipReadGPLYA

Description
This API reads the GMPY A-side polynomial Register (GPLYA) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
GPLYA

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 gplyaVal;
            gplyaVal = CSL_chipReadGPLYA ();

===========================================================================

GMPY Polynomial.A Side Register

CSL_IDEF_INLINE Uint32 CSL_chipReadGPLYB | ( |  | ) |

============================================================================
CSL_chipReadGPLYB

Description
This API reads the GMPY B-side polynomial Register (GPLYB) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
GPLYB

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 gplybVal;
            gplybVal = CSL_chipReadGPLYB ();

===========================================================================

GMPY Polynomial.B Side Register

CSL_IDEF_INLINE Uint32 CSL_chipReadIER | ( |  | ) |

============================================================================
CSL_chipReadIER

Description
This API reads the Interrrupt Enable register (IER) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
IER

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 ierVal;
            ierVal = CSL_chipReadIER ();

===========================================================================

Interrupt Enable Register

CSL_IDEF_INLINE Uint32 CSL_chipReadIERR | ( |  | ) |

============================================================================
CSL_chipReadIERR

Description
This API reads the Internal Exception Report Register (IERR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
IERR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 ierrVal;
            ierrVal = CSL_chipReadIERR ();

===========================================================================

Internal Exception Report Register

CSL_IDEF_INLINE Uint32 CSL_chipReadIFR | ( |  | ) |

============================================================================
CSL_chipReadIFR

Description
This API reads the Interrrupt Flag register (IFR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
IFR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 ifrVal;
            ifrVal = CSL_chipReadIFR ();

===========================================================================

Interrupt Flag Register

CSL_IDEF_INLINE Uint32 CSL_chipReadILC | ( |  | ) |

============================================================================
CSL_chipReadILC

Description
This API reads the Inner Loop SPL Buffer Count (ILC) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
ILC

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 ilcVal;
            ilcVal = CSL_chipReadILC ();

===========================================================================

SPLOOP Inner Loop Count Register

CSL_IDEF_INLINE Uint32 CSL_chipReadIRP | ( |  | ) |

============================================================================
CSL_chipReadIRP

Description
This API reads the Interrrupt Return Pointer register (IRP) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
IRP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 irpVal;
            irpVal = CSL_chipReadIRP ();

===========================================================================

Interrupt Return Pointer Register

CSL_IDEF_INLINE Uint32 CSL_chipReadISTP | ( |  | ) |

============================================================================
CSL_chipReadISTP

Description
This API reads the Interrrupt Service Table Pointer register (ISTP) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
ISTP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 istpVal;
            istpVal = CSL_chipReadISTP ();

===========================================================================

Interrupt Service Table Pointer Register

CSL_IDEF_INLINE Uint32 CSL_chipReadITSR | ( |  | ) |

============================================================================
CSL_chipReadITSR

Description
This API reads the Interrupt Task State Register (ITSR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
ITSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 itsrVal;
            itsrVal = CSL_chipReadITSR ();

===========================================================================

Interrupt Task State Register

CSL_IDEF_INLINE Uint32 CSL_chipReadNRP | ( |  | ) |

============================================================================
CSL_chipReadNRP

Description
This API reads the Nonmaskable Interrupt Return Pointer register (NRP) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
NRP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 nrpVal;
            nrpVal = CSL_chipReadNRP ();

===========================================================================

Nonmaskable Interrupt (NMI) Registers

CSL_IDEF_INLINE Uint32 CSL_chipReadNTSR | ( |  | ) |

============================================================================
CSL_chipReadNTSR

Description
This API reads the NMI/Exception Task State Register (NTSR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
NTSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 ntsrVal;
            ntsrVal = CSL_chipReadNTSR ();

===========================================================================

NMI/Exception Task State Register

CSL_IDEF_INLINE Uint32 CSL_chipReadPCE1 | ( |  | ) |

============================================================================
CSL_chipReadPCE1

Description
This API reads the Program Counter, E1 Phase (PCE1) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
PCE1

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 pce1Val;
            pce1Val = CSL_chipReadPCE1 ();

===========================================================================

E1 Phase Program Counter

Uint32 CSL_chipReadReg | ( | CSL_ChipReg | reg | ) |

============================================================================
CSL_chipReadReg

Description
This API reads the specified control register.

Arguments

            reg     Specifies the control register to be read

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
AMR; CSR; IFR; IER; ISTP; IRP; NRP; TSCL; TSCH; ARP; ILC; RILC; REP; PCE1; DNUM; SSR; GPLYA; GPLYB; GFPGFR; DIER; TSR; ITSR; NTSR; EFR; IERR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 amr;
            amr = CSL_chipReadReg (AMR);

===========================================================================

Addressing Mode Register

Control Status Register

Interrupt Flag/Set/Clear Registers

Interrupt Enable Register

Interrupt Service Table Pointer Register

Interrupt Return Pointer Register

Nonmaskable Interrupt (NMI) / Exception Return Pointer Registers

Time Stamp Counter Register - Low

Time Stamp Counter Registers - High

Analysis Return Pointer

SPLOOP Inner Loop Count Register

SPLOOP Reload Inner Loop Count Register

Restricted Entry Point Address Register

E1 Phase Program Counter

DSP Core Number Register

Saturation Status Register

GMPY Polynomial.A Side Register

GMPY Polynomial.B Side Register

Galois Field Polynomial Generator Function Register

Task State Register

Interrupt Task State Register

NMI/Exception Task State Register

Exception Flag and Clear Registers

Internal Exception Report Register

CSL_IDEF_INLINE Uint32 CSL_chipReadREP | ( |  | ) |

============================================================================
CSL_chipReadREP

Description
This API reads the Restricted Entry Point Address (REP) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
REP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 repVal;
            repVal = CSL_chipReadREP ();

===========================================================================

Restricted Entry Point Address Register

CSL_IDEF_INLINE Uint32 CSL_chipReadRILC | ( |  | ) |

============================================================================
CSL_chipReadRILC

Description
This API reads the Reload Inner Loop SPL Buffer Count (RILC) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
RILC

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 rilcVal;
            rilcVal = CSL_chipReadRILC ();

===========================================================================

SPLOOP Reload Inner Loop Count Register

CSL_IDEF_INLINE Uint32 CSL_chipReadSSR | ( |  | ) |

============================================================================
CSL_chipReadSSR

Description
This API reads the Saturation Status Register (SSR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
SSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 ssrVal;
            ssrVal = CSL_chipReadSSR ();

===========================================================================

Saturation Status Register

CSL_IDEF_INLINE Uint32 CSL_chipReadTSCH | ( |  | ) |

============================================================================
CSL_chipReadTSCH

Description
This API reads the Time Stamp Counter Higher Order 32-bits (TSCH) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
CSL_chipWriteTSCL() must be called with any arbitrary value to enable the TSC first before this API is called.

Post Condition
None

Reads
TSCH

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 tschVal;
            tschVal = CSL_chipReadTSCH ();

===========================================================================

Time Stamp Counter Registers - High

CSL_IDEF_INLINE Uint32 CSL_chipReadTSCL | ( |  | ) |

============================================================================
CSL_chipReadTSCL

Description
This API reads the Time Stamp Counter Lower Order 32-bits (TSCL) register and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
CSL_chipWriteTSCL() must be called with any arbitrary value to enable the TSC first before this API is called.

Post Condition
None

Reads
TSCL

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 tsclVal;
            tsclVal = CSL_chipReadTSCL ();

===========================================================================

Time Stamp Counter Register - Low

CSL_IDEF_INLINE Uint32 CSL_chipReadTSR | ( |  | ) |

============================================================================
CSL_chipReadTSR

Description
This API reads the Task State Register (TSR) and returns its contents.

Arguments None

Return Value Uint32

- The control register value read

Pre Condition
None

Post Condition
None

Reads
TSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 tsrVal;
            tsrVal = CSL_chipReadTSR ();

===========================================================================

Task State Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteAMR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteAMR

Description
This API configures the Addressing Mode Register (AMR) with the specified new value 'val'. This API returns the old AMR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value

Pre Condition
None

Post Condition
The AMR control register is written with the value passed

Writes
AMR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldamr;
            oldamr = CSL_chipWriteAMR (56);

===========================================================================

Addressing Mode Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteARP | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteARP

Description
This API writes to the Analysis Return Pointer (ARP) with the specified value 'val'. This API returns the old ARP value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from ARP register

Pre Condition
None

Post Condition
The ARP control register is written with the value passed

Writes
ARP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldARP;
            oldARP = CSL_chipWriteARP (56);

===========================================================================

Analysis Return Point Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteCSR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteCSR

Description
This API configures the Control Status Register (CSR) with the specified new value 'val'. This API returns the old CSR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value

Pre Condition
None

Post Condition
The CSR control register is written with the value passed

Writes
CSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldcsr;
            oldcsr = CSL_chipWriteCSR (56);

===========================================================================

Control Status Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteDIER | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteDIER

Description
This API writes to the Debug Interrupt Enable Register (DIER) with the specified value 'val'. This API returns the old DIER value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from DIER register

Pre Condition
None

Post Condition
The DIER control register is written with the value passed

Writes
DIER

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldDIER;
            oldDIER = CSL_chipWriteDIER (56);

===========================================================================

Debug Interrupt Enable Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteECR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteECR

Description
This API writes to the Exception Clear Register (ECR) with the specified value 'val' to clear the corresponding bits in the EFR. This API returns the old EFR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from EFR register

Pre Condition
None

Post Condition
The ECR control register is written with the value passed and the corresponding exception bits in the EFR register are cleared.

Writes
EFR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldEFR;
            oldEFR = CSL_chipWriteECR (56);

===========================================================================

Return the old value from Exception Flag Register and set the Clear Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteERP | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteERP

Description
This API writes to the Exception Return Pointer Register (ERP) with the specified value 'val' to setup a return point in the program to continue execution after an exception has occured. This API returns the old ERP value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from NRP register

Pre Condition
None

Post Condition
The NRP control register is written with the value passed

Writes
NRP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldERP;
            oldERP = CSL_chipWriteERP (56);

===========================================================================

Exception Return Point (ERP) Registers

CSL_IDEF_INLINE Uint32 CSL_chipWriteGFPGFR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteGFPGFR

Description
This API writes to the Galios Field Polynomial Generator Function Register (GFPGFR) with the specified value 'val'. This API returns the old GFPGFR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from GFPGFR register

Pre Condition
None

Post Condition
The GFPGFR control register is written with the value passed

Writes
GFPGFR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldGFPGFR;
            oldGFPGFR = CSL_chipWriteGFPGFR (56);

===========================================================================

Galois Field Polynomial Generator Function Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteGPLYA | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteGPLYA

Description
This API writes to the GMPY Polynomial-A side Register (GPLYA) with the specified value 'val'. This API returns the old GPLYA value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from GPLYA register

Pre Condition
None

Post Condition
The GPLYA control register is written with the value passed

Writes
GPLYA

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldGPLYA;
            oldGPLYA = CSL_chipWriteGPLYA (56);

===========================================================================

GMPY Polynomial.A Side Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteGPLYB | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteGPLYB

Description
This API writes to the GMPY Polynomial-B side Register (GPLYB) with the specified value 'val'. This API returns the old GPLYB value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from GPLYB register

Pre Condition
None

Post Condition
The GPLYB control register is written with the value passed

Writes
GPLYB

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldGPLYB;
            oldGPLYB = CSL_chipWriteGPLYB (56);

===========================================================================

GMPY Polynomial.B Side Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteICR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteICR

Description
This API writes to the Interrupt Clear Register (ICR) with the specified new value 'val' to clear the maskable interrupts configured in the IFR register. This API returns the old interrupt state from IFR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from IFR

Pre Condition
None

Post Condition
The ICR control register is written with the value passed

Writes
ICR

Affects
IFR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldIFR;
            oldIFR = CSL_chipWriteICR (56);

===========================================================================

CSL_IDEF_INLINE Uint32 CSL_chipWriteIER | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteIER

Description
This API writes to the Interrupt Enable Register (IER) with the specified new value 'val' to enable/disable individual interrupts in the system. This API returns the old interrupt enable state from IER value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from IER

Pre Condition
None

Post Condition
The IER control register is written with the value passed

Writes
IER

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldIER;
            oldIER = CSL_chipWriteIER (56);

===========================================================================

Interrupt Enable Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteIERR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteIERR

Description
This API writes to the Internal Exception Report Register (IERR) with the specified value 'val'. This API returns the old IERR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from IERR register

Pre Condition
None

Post Condition
The IERR control register is written with the value passed.

Writes
IERR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldIERR;
            oldIERR = CSL_chipWriteIERR (56);

===========================================================================

Internal Exception Report Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteILC | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteILC

Description
This API writes to the SPLOOP Inner Loop Count Register (ILC) with the specified value 'val'. This API returns the old ILC value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from ILC register

Pre Condition
None

Post Condition
The ILC control register is written with the value passed

Writes
ILC

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldILC;
            oldILC = CSL_chipWriteILC (56);

===========================================================================

SPLOOP Inner Loop Count Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteIRP | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteIRP

Description
This API writes to the Interrupt Return Pointer Register (IRP) with the specified value 'val' to setup a return point in the program to continue execution after a maskable interrupt is executed. This API returns the old IRP value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from IRP

Pre Condition
None

Post Condition
The IRP control register is written with the value passed

Writes
IRP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldIRP;
            oldIRP = CSL_chipWriteIRP (56);

===========================================================================

Interrupt Return Pointer Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteISR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteISR

Description
This API configures the Interrupt Set Register (ISR) with the specified new value 'val'. This API returns the old ISR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value

Pre Condition
None

Post Condition
The ISR control register is written with the value passed

Writes
ISR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldISR;
            oldISR = CSL_chipWriteISR (56);

===========================================================================

Read Interrupt Flag Register and write to the Interrupt Set Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteISTP | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteISTP

Description
This API writes to the Interrupt Service Table Pointer Register (ISTP) with the specified value 'val' to setup a ISR base address for a given interrupt in the ISTB. This API returns the old ISTP value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from ISTP

Pre Condition
None

Post Condition
The ISTP control register is written with the value passed

Writes
ISTP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldISTP;
            oldISTP = CSL_chipWriteISTP (56);

===========================================================================

Interrupt Service Table Pointer Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteITSR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteITSR

Description
This API writes to the Interrupt Task State Register (ITSR) with the specified value 'val'. This API returns the old ITSR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from ITSR register

Pre Condition
None

Post Condition
The ITSR control register is written with the value passed

Writes
ITSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldITSR;
            oldITSR = CSL_chipWriteITSR (56);

===========================================================================

Interrupt Task State Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteNRP | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteNRP

Description
This API writes to the NMI Return Pointer Register (NRP) with the specified value 'val' to setup a return point in the program to continue execution after an NMI has occured. This API returns the old NRP value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from NRP

Pre Condition
None

Post Condition
The NRP control register is written with the value passed

Writes
NRP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldNRP;
            oldNRP = CSL_chipWriteNRP (56);

===========================================================================

Nonmaskable Interrupt (NMI) Registers

CSL_IDEF_INLINE Uint32 CSL_chipWriteNTSR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteNTSR

Description
This API writes to the NMI/Exception Task State Register (NTSR) with the specified value 'val'. This API returns the old NTSR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from NTSR register

Pre Condition
None

Post Condition
The NTSR control register is written with the value passed

Writes
NTSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldNTSR;
            oldNTSR = CSL_chipWriteNTSR (56);

===========================================================================

NMI/Exception Task State Register

Uint32 CSL_chipWriteReg | ( | CSL_ChipReg | reg,
|  | CSL_Reg32 | val |
| ) |  |  |

============================================================================
CSL_chipWriteReg

Description
This API writes specified control register with the specified value 'val'. On successful writes, it returns the old value from the register. When the specified control register is a "Read-Only" register, this API just returns a 0.

Arguments

            reg     Specifies the control register to be written to
            val     Value to be written.

Return Value Uint32

- New programmed value or Zero when Register is Read-Only

Pre Condition
None

Post Condition
The reg control register is written with the value passed and the previous contents of the register are returned to the calling application.

Writes
AMR; CSR; ISR; ICR; IER; ISTP; IRP; NRP; TSCL; ARP; ILC; RILC; REP; SSR; GPLYA; GPLYB; GFPGFR; DIER; TSR; ITSR; NTSR; ECR; IERR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldamr;
            oldamr = CSL_chipWriteReg (AMR, 56);

===========================================================================

Addressing Mode Register

Control Status Register

Read Interrupt Flag Register and write to the Interrupt Set Register

Read Interrupt Flag Register and write to the Interrupt Clear Register

Interrupt Enable Register

Interrupt Service Table Pointer Register

Interrupt Return Pointer Register

Nonmaskable Interrupt (NMI) / Exception Return Pointer Registers

Time Stamp Counter Register - Low

Time Stamp Counter Registers - High

Analysis Return Pointer

SPLOOP Inner Loop Count Register

SPLOOP Reload Inner Loop Count Register

Restricted Entry Point Address Register

E1 Phase Program Counter

DSP Core Number Register

Saturation Status Register

GMPY Polynomial.A Side Register

GMPY Polynomial.B Side Register

Galois Field Polynomial Generator Function Register

Debug Interrupt Enable Register

Task State Register

Interrupt Task State Register

NMI/Exception Task State Register

Exception Flag and Clear Registers

Internal Exception Report Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteREP | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteREP

Description
This API writes to the Restricted Entry-Point Register (REP) with the specified value 'val'. This API returns the old REP value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from REP register

Pre Condition
None

Post Condition
The REP control register is written with the value passed

Writes
REP

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldREP;
            oldREP = CSL_chipWriteREP (56);

===========================================================================

Restricted Entry Point Address Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteRILC | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteRILC

Description
This API writes to the SPLOOP Reload Inner Loop Count Register (RILC) with the specified value 'val'. This API returns the old RILC value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from RILC register

Pre Condition
None

Post Condition
The RILC control register is written with the value passed

Writes
RILC

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldRILC;
            oldRILC = CSL_chipWriteRILC (56);

===========================================================================

SPLOOP Reload Inner Loop Count Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteSSR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteSSR

Description
This API writes to the Saturation Status Register (SSR) with the specified value 'val'. This API returns the old SSR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from SSR register

Pre Condition
None

Post Condition
The SSR control register is written with the value passed

Writes
SSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldSSR;
            oldSSR = CSL_chipWriteSSR (56);

===========================================================================

Saturation Status Register

CSL_IDEF_INLINE Uint32 CSL_chipWriteTSCL | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteTSCL

Description
This API writes to the Time-Stamp Counter (low order 32 bits) Register (TSCL) with the specified value 'val' to enable the TSC. This API returns the old TSCL value on return. The actual value written "val" to TSCL has no effect on the Time stamp counter. The value is simply ignored by the hardware, and a write to TSCL is used only to enable the Time Stamp Counter.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from TSCL register

Pre Condition
None

Post Condition
The TSCL control register is written with the value passed

Writes
TSCL

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldTSCL;
            oldTSCL = CSL_chipWriteTSCL (56);

===========================================================================

Time Stamp Counter Register - Low

CSL_IDEF_INLINE Uint32 CSL_chipWriteTSR | ( | CSL_Reg32 | val | ) |

============================================================================
CSL_chipWriteTSR

Description
This API writes to the Task State Register (TSR) with the specified value 'val'. This API returns the old TSR value on return.

Arguments

            val         Value to be written.

Return Value Uint32

- New programmed value from TSR register

Pre Condition
None

Post Condition
The TSR control register is written with the value passed

Writes
TSR

Usage Constraints:
Please refer to the C64x+ user guide for constraints while accessing registers in different privilege levels.

Example

            Uint32 oldTSR;
            oldTSR = CSL_chipWriteTSR (56);

===========================================================================

Task State Register

Copyright 2012, Texas Instruments Incorporated