This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8127: Replace the Face Detect functionality done on the M3 processor with other functionality?

I would like to do some number crunching that the A8 is ill-equipped to handle in the M3 - perhaps by replacing the Face Detect functionality with some other functionality needed by my application.

Is this possible? How to go about this? Does sample code exist?

I traced the fd_execute() function in the DM8217 project - and it is finally implemented by setting some register - no source code is exposed for this...

  • As far as I know the Face Detect module is not reprogrammable: its block diagram (in the omap4 TRM) shows it has a ROM, and its initialization requires no firmware upload or such.

    Also, of all cores available on this SoC, the cortex-M3 cores (there are three I know of) are probably by far the least suitable for number crunching.  They are used mainly for managing peripherals.

    Video-specific stuff tends to be done in the HDVICP subsystem, which has two ARM926 cores and a whole bunch of hardware accelerators.  For other number crunching, the cortex-A8 should be a decent choice for algorithms that can make effective use of its Neon unit, and as alternative there's the C674x DSP.  Finally the SGX530 might perhaps be usable for computation, though I'm not sure if anyone has ever done this yet.

    Note that I'm describing the DM8148 here.  I know the DM8127 is some subset thereof, though due to lack of public documentation I don't know which subset, so some options above may not apply.

  • Thanks for your answer. I am working with Zev and would like to continue this thread.

    I'd like to clear up 2 issues which I can't figure out.

    1) Doesn't face detection involve computation and imaging analytics? Since our project has no use for face detection, I want to put other code in this M3 core. Is this at all possible?

    2)I would very much like to program the C674x DSP. I'd appreciate any info about how to go about this.

    Thanks,

    Mechi

  • The face detect module is a "black box" dedicated module for that purpose: while it contains some kind of microprocessor, no documentation mentions what kind of, I see no reason to assume it is a cortex-m3.  It appears to always run out of its own local ROM so there's no reprogrammability there it seems.

    Programmable cores on the DM814x are:

    • The cortex-A8 of course
    • The dual cortex-m3 subsystem ("ducati" / "media controller")
    • The cortex-m3 in the security subsystem
    • The two ARM9 sequencer cores in IVA (aka HDVICP2)
    • The ARM9 in TPPSS (but that whole subsystem is disabled)
    • In theory the SGX could also be used as a core but "Imagination Technologies say that the gpu has OpenCL 1.0 embedded capabilities, but it depends on the SOC vendor whether a driver is available or not".  I don't know whether TI makes OpenCL support available for the SGX nowadays, maybe someone from TI can comment.

    Finally, given the insane flexibility of the EDMA (especially given that it's explicitly permitted to (re)program EDMA transfers using EDMA transfers), it seems very likely to me that it is turing-complete hence could be counted as another core ;-)

    You can either use a Code Composer project to write a DSP application or just use Makefiles as usual if you prefer.  Running it is a simple matter of loading the program into memory, setting a register in the control module which tells the DSP what its boot address is, and taking the DSP out of reset.  You can do this either from linux or at an earlier stage if you prefer.

  • Mechi Fendel1 said:

    I would very much like to program the C674x DSP. I'd appreciate any info about how to go about this.

    Attached is a version of my DSP project, stripped of all our application-specific stuff.  I'm not going to pretend it's some kind of shining light of an example of writing code for the DSP, but it's something.  Since I got completely lost in all the build settings in eclipse I'm using a manual makefile instead.  It should build from the commandline or from CCS (though if using it in a CCS project you'll need to disable automatic makefile generation, otherwise it will overwrite my manual makefile, or if you're bold you can try recreating similar settings from within CCS).  There's also a small js file to upload the compiled executable using Debug Server Scripting.

    In the longer run, especially for more complicated applications, it is probably worthwhile investigating existing frameworks that should make life easier (like TI-RTOS).  But since this was my first project, and the app basically a single loop of code, doing everything manually was easier imho.

    8004.demo.zip

  • Thanks Matthijs.

    I will study your code and I'm sure i'll learn much.

    Thanks again for sharing this with me.

    Take care,

    Mechi