MIPS32 port

ChibiOS public support forum for topics related to the micro-controllers based on MIPS32 cores.
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: MIPS32 port

Postby pito » Thu Jan 17, 2013 11:07 pm

A comparison pic32mx@72MHz optim2 vs. STM32F103@72MHz, gnu comp.

pic32mx_o2_vs_stm32f103.jpg
pic32mx_o2_vs_stm32f103.jpg (73.18 KiB) Viewed 5530 times

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Thu Jan 17, 2013 11:09 pm

I checked the configuration and it looks good. 2 wait states for PFM access and 0 for RAM.
Do you change the system clock when(MIPS_CPU_FREQ in mcuconf.h)? System timer rate is derived from this constant. Also what is the system clock period is defined on STM? For PIC32 demo it's 1kHz.
I glanced at STM datasheet, and unless access to flash is faster on STM both CPUs should have very close in terms of performance. I know that interrupt processing on ARM is more lightweight than on MIPS(to save all those registers in case of context switch). Also gcc is not optimizing the code very well for MIPS, most of the work is around ARM lately. At work I was struggling with MIPS microoptimizations some time ago =/. BTW, do you use same GCC version to build for ARM? For instance, I know that GCC4.7 generates slower code than GCC4.3 for MIPS at least ...

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Thu Jan 17, 2013 11:12 pm

Also could be interesting to see a comparison between mips16 and thumb. In terms of code size and performance.

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: MIPS32 port

Postby pito » Thu Jan 17, 2013 11:20 pm

Do you change the system clock when(MIPS_CPU_FREQ in mcuconf.h)?

Yes, and the dividers in boards as well. A good double check is the systime and of course UART which will not work @115k when dividers and mips_cpu_freq would be set differently..

BTW, do you use same GCC version to build for ARM?

I am using the ARM data from the performance page http://www.chibios.org/dokuwiki/doku.ph ... os:metrics

What might be interesting to see are data for pic32@72MHz built under XC32 with -O2..
p.
Last edited by pito on Thu Jan 17, 2013 11:39 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: MIPS32 port

Postby Giovanni » Thu Jan 17, 2013 11:35 pm

Note that the STM32F1 is not the fastest cortex at that frequency, the F4 is much faster at equal clock because the better Flash controller.

Giovanni

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: MIPS32 port

Postby pito » Fri Jan 18, 2013 12:01 am

Do we have data for STM32F3 @72MHz?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: MIPS32 port

Postby Giovanni » Fri Jan 18, 2013 8:56 am

From my tests, the F3 is exactly equal to the F1 as integer performance, same controller apparently. The ART is specific of the F4.

Giovanni

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Fri Jan 18, 2013 9:03 pm

I have compared gcc4.4 and xc32(based on gcc4.5) with -O1. Code generated with xc32 is slightly faster especially in context switch tests.
Since it's quite possible that gcc4.5 is generating better code for MIPS and there's no influence of microchip work I did a test with Pito's toolchain. Apparently same numbers as with xc32.
Pito, I'm just curious whether your toolchain is based on xc32?

cheers,
/d

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: MIPS32 port

Postby pito » Fri Jan 18, 2013 10:28 pm

My toolchain is the
*** Compiler: GCC 4.5.1 chipKIT Compiler for PIC32 MCUs v1.30-20110506
https://github.com/jasonkajita/chipKIT-cxx/downloads
JasonK is developing compilers at MCHP afaik (ie. XC32)..

PS: I've built it with the newest
*** Compiler: GCC 4.5.1 chipKIT Compiler for PIC32 MCUs v1.31-20120614
and the test numbers are the same..

PS1: Could you share the XC32 project setup to try it with, plz?
p.

pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: MIPS32 port

Postby pito » Sat Jan 19, 2013 1:20 pm

A comparison - pic32mx @128MHz -o2 vs. STM32F4 @168MHz

pic32_128 vs stm32F4_168.jpg
pic32_128 vs stm32F4_168.jpg (70.23 KiB) Viewed 5474 times


Return to “MIPS32 Support”

Who is online

Users browsing this forum: No registered users and 7 guests