DSPRelated.com
Forums

C code that can auto-detect C67x vs. C62x

Started by Jeff Brower October 16, 2008
CSL function CHIP_getCpuId(); (described in spru401e.pdf) would be the way to go.

- Andrew E.

----- Original Message ----
From: Jeff Brower
To: Richard Williams
Cc: c...
Sent: Thursday, October 16, 2008 12:41:23 PM
Subject: Re: [c6x] C code that can auto-detect C67x vs. C62x

Richard-

> Per the TI knowledge base...
>
> "Identifying whether the DSP is C6201 Integer DSP or a C6701 Floating Point DSP
>
> Problem:
> How can the user use software to check a DSP to identify if it is a C6201
> interger DSP or a C6701 Floating Point DSP?
>
> Solution:
> The user can view the value of the CSR register to determine this. See bit
> positions 31-24 that indicates the CPU ID. If CPU ID is equal to 00b it
> indicates a C62x if the value is 10b - indicates a C67x. Please see detail on
> page 2-18 of the TMS320C6000 CPU Instruction Set Referernce Guide (spru189F) for
> more information."

Thanks very much -- it's easy to read the CSR from C code, so I'm good.

-Jeff

> ---------- Original Message -----------
> From: Jeff Brower
> To: c...
> Sent: Thu, 16 Oct 2008 09:06:22 -0500
> Subject: [c6x] C code that can auto-detect C67x vs. C62x
>
> > All-
> >
> > Does anyone know where to find a bit of C code that can determine if
> > the underlying CPU is C6701 vs. C6201 (or C6711 vx. C6211)?
> >
> > I want to build some code with 67x as the target in CCS, but calls
> > fixed-point routines if it's running on a 62x device.
> >
> > Thanks.
> >
> > -Jeff