Is the Multiply-Accumulate (MAC) Unit supported by the C51 compiler for the cygnal c8051f12x devices? How to use it?
The whole point of all the 8051 derivatives is that they all have the same instruction set - the only differences are in the SFRs. Unless Cygnal has broken this, there will be no specific compiler suppport - it's just down to you to read the data sheet and find out what SFRs are involved, and what you need to do with them...
It's Section 13 in the data sheet
thank you for your reply. it's troublesome to write a lot of codes to realize a multiply operations with the MAC,will the future C51 compiler be support the MAC in the C8051F12x.
"it's troublesome to write a lot of codes to realize a multiply operations with the MAC" Some people are never satisfied! Try doing it without a MAC! "will the future C51 compiler be support the MAC in the C8051F12x." See my original asnwer - this is not a compiler issue! Perhaps you should talk to Cygnal (SiLabs) about providing a support library - eg, like the Triscend SDK http://www.triscend.com/developmenttools/sdk.htm
thank you.As we know,A MAC Unit is available in the ST10F2xx, ST10R2xx, and Infineon XC16x devices. It was first supported by intrinsic function in C166 Version 4.02,why the MAC isn't supported by the C51?
From a quick look at the C166 Instruction Set, it looks like the Multiply instruction uses the hardware multiplier implicitly. The compiler is concerned with generating instructions, so it has to support it! This is completely different from the Cygnal, where no specific instructions are involved - the MAC is just another peripheral, like the Timers, ADC, etc.
You're pretty arrogant, Andy. You can claim what you want but the MAC definately SHOULD be supported. The instruction set has nothing to do with it. You don't have native floating point support in any 8051 or in the C166/167/ST10 family, but you have a floating point library that provides the support. If you have an ST10 the floating point library is different and supports the MAC. The only excuse for not supporting the MAC on the F120 is that Keil doesn't want to put the effort into it, which doesn't say much for Keil. Considering what I paid for this development platform AND the claim that the F120 was supported, I expected the MAC to be used in floating point. Pretty pitiful if you ask me, as were your rather rude posts concerning this matter.
You can claim what you want but the MAC definately SHOULD be supported If Keil were to support derivative specific operations, then where is the limit. The MAC IS supported, Keil let you write to any specified SFR. If you have a problem, why not write your own library routines. Erik
First, I've been down that road before. I wrote a significantly faster floating point library for the C167 because I was doing a fair amount of signal processing (real time motion control application) and I can tell you it was a LOT of work. In this (8051) instance I spent the extra money to get floating point support so I wouldn't have to go through that again. Anyone who wants to use fixed point math in things like DSP functions can raise their hand now. I know I don't want to (it's too easy to make mistakes and painful to maintain / modify). Using the MAC for floating point is not the same as supporting every peripheral on every vendors chip. It's something that should be there, and floating point IS a compiler related issue. If you can produce a floating point library then you should be able to produce a version that uses MAC (and Keil does this for the C166/ST10 products). The modifying their existing library to take advantage of MAC is not such a big thing to do - IF you have the source code. Once it's done and released it wouldn't be hard for a user to tailor it to a different chip, and you can bet other vendors will include MAC capabilities in their hardware (there may already be some - haven't checked).
View all questions in Keil forum