Author Topic: CM7 vs DSP  (Read 949 times)

0 Members and 1 Guest are viewing this topic.

Online blueskull

  • Supporter
  • ****
  • Posts: 12270
  • Country: cn
  • Power Electronics Guy
CM7 vs DSP
« on: January 12, 2019, 07:59:58 am »
ARM gurus here, do you recommend me to replace my current ADSP-BF706 with ARM in my design?

My target applications would be sigma delta modulation from 32b to 16b and from 16b to 8b, plus tons of oversampling between each SDM. Both are implemented with MACs and can be manually unrolled.

From a DSP Concepts article, they claim the 16 bit FIR time is ~1.6 cycles for CM4 and CM7 is ~1.6 times faster than CM4 per MHz, so ~1 cycle per tap on CM7.

That's half the speed compared with BlackFin+ when using SIMD if my math is correct. So what kind of performance can I expect realistically with TCM and cache and use LDM instead of LDR on coeffs?

Will a 400MHz or 600MHz CM7 rival a 400MHz BlackFin+ with ~80% CPU utilization, assuming I hand code everything with intrinsics?

Thanks. I think I will try that out on my STM32H7 board, but I would like to hear some words from the experienced first.
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: ir
    • ASiD Designer
Re: CM7 vs DSP
« Reply #1 on: January 12, 2019, 02:14:00 pm »
I have used DSP many times on Cortex M3,M4,M7,But I have not done it in any other CPU seriously.

The CMSIS is already in ASM with C function wrappers, and you can test it in simulation, and count the cycles in there,

I usually use keil simulator for this purpose. so you can compare to see if they are OK for your job. Certainly Blackfin is dying so switching to Cortex would be a wise choice. ;)
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Online blueskull

  • Supporter
  • ****
  • Posts: 12270
  • Country: cn
  • Power Electronics Guy
Re: CM7 vs DSP
« Reply #2 on: January 12, 2019, 04:26:20 pm »
Too bad, STM32H7 doesn't have on-chip USB HS PHY. I need to take a look at iMX RT.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4740
  • Country: gb
Re: CM7 vs DSP
« Reply #3 on: January 12, 2019, 04:54:06 pm »
Just be aware that not all the CMSIS DSP functions are optimised IME, so you may need to roll your own. I also found that doing some things in floating point were slightly better performing than using the SiMD instructions because there are more floating point registers. Thus you can do certain chained algorithms in small blocks saving on expensive store/loads. I find I sometimes have to resort to assembly language in the pinch points when I can't get the C optimiser to behave itself.

I don't know much about Blackfin to compare, my embedded DSP background has been in TI VLIW and dsPIC.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 2389
  • Country: si
Re: CM7 vs DSP
« Reply #4 on: January 12, 2019, 05:29:53 pm »
The STM32H7 supports an external USB HS PHY chip however so no worries.

And yes for the Cortex M7 i have found that sometimes the CMSIS DSP library runs faster on floating point than in fixed point. If your chip has the floating point extensions you get single  float MAC operation, or a 2 cycle double precision MAC. So when working with 32bit adding together two integers is just as fast as a float MAC. I think the speed advantage comes from the floating point operations taking a different path trough the CPU so other parts are left free for moving data around and counting loop iterations. You still don't get any SIMD with float but if its too slow for you then you do need a real DSP chip.

Oh and you do get a bit of a penalty when using hardware floating point on ARM Cortex. This causes extra CPU registers to be introduced to hold the float numbers and this increases interrupt latency due to those getting pushed to the stack, or extra time to context switch in a RTOS. But you can get around it if you make sure float is only used in one thread of execution, in that case you can just not context switch the contents of float registers because they don't get modified if float instructions are never used.

 

Online blueskull

  • Supporter
  • ****
  • Posts: 12270
  • Country: cn
  • Power Electronics Guy
Re: CM7 vs DSP
« Reply #5 on: January 12, 2019, 05:34:56 pm »
The STM32H7 supports an external USB HS PHY chip however so no worries.

Minimizing chip count and board space is a great goal.

With fan-out space and ULPI, the STM32 is larger than BF706 on board.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 2389
  • Country: si
Re: CM7 vs DSP
« Reply #6 on: January 12, 2019, 05:39:14 pm »
Not if you use it in a small BGA package and add small package PHY, but you get a more expensive PCB design. Its all a trade off depending on what you need.
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: ir
    • ASiD Designer
Re: CM7 vs DSP
« Reply #7 on: January 12, 2019, 06:36:29 pm »
Just Use i.MXRT, it's 600MHz so it's much better, also the new core (i.MX RT600)has a DSP core too, but it's in PRE-PRODUCTION phase for now :palm: :palm:
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: fr
Re: CM7 vs DSP
« Reply #8 on: January 12, 2019, 08:24:59 pm »
If 300MHz max freq is OK, you could also consider the ATSAMS70 series. Cortex M7 with integrated USB HS PHY.

 

Offline errorprone

  • Contributor
  • Posts: 6
Re: CM7 vs DSP
« Reply #9 on: January 22, 2019, 12:56:28 pm »
Not sure how much peripheral activity you are planning on but the iMXRT has a slower bus matrix than the STM32H7.  It is limited to 1/4 of the core clock speed (150MHz) vs 1/2 (200MHz) for the STM32.  For my design with multiple DMA streams I was more bus limited than core limited.

Sent from my LG-H810 using Tapatalk

 
The following users thanked this post: PeterZ


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf