We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Think you. I modified my source :
printf("%lu * %bu = ", N, M); printf("%lu\n", Freq); Freq=25690112L; printf("%lu * %bu = ", Freq, 4); Freq*=4; printf("%lu\n", Freq);
It work correctly. but the Long Integer Multiple fault also.
Run Result: 24500000 * 4 = 4294926936 25690112 * 4 = 1568
C8051F120 DataSheet said that: Page 157, Rev1.2 13. MULTIPLY AND ACCUMULATE (MAC0) The C8051F120/1/2/3 devices include a multiply and accumulate engine which can be used to speed up many mathematical operations. MAC0 contains a 16-by-16 bit multiplier and a 40-bit adder, which can perform integer or fractional multiply-accumulate and multiply operations on signed input values in two SYSCLK cycles. A rounding engine provides a rounded 16-bit fractional result after an additional (third) SYSCLK cycle. MAC0 also contains a 1- bit arithmetic shifter that will left or right-shift the contents of the 40-bit accumulator in a single SYSCLK cycle. Figure 13.1 shows a block diagram of the MAC0 unit and its associated Special Function Registers.
yes i see
i look at prelimanary data who does not have mac
i look at newe data rev 1.4 at
www.silabs.com/.../C8051F12x-13x.pdf
has details in page 165
do you errorr in ide or on hardare?????
sir erac is very right with ide not emulater all devs
if hardware is give error tell keil see they fix it??????
My Program runs on simulator . It runs out correct result on simulator when not use on-chip arichmetic accelerator.
but do it run correct on hardwaaare???!!!
if just on simuletor then think it is simulater do not simelate good!!!!????
then no be bug of compiler huh????
A SIMULATOR simulates and as such will NEVER give you the full (and correct) story. Also, as stated before, there is no way it is economically feasible for Keil to simulate every exotic function of all exotic derivatives of the '51.
such special interest issues is what keeps Keil from taking time for general and important issues such as changing compiler things like mov r7,Ralph mov a,r7 to mov a,Ralph in the COMPILER, not the optimizer
If you doubt the simulator, try it on the hardware, stick the code on your devboard use the emulator and check. This is so darn simple and would have been resolved in 5 minutes instead of the DAYS these threads has run.
Erik
"A SIMULATOR simulates and as such will NEVER give you the full (and correct) story"
i not think you be right with NEVER!!!!!!
a dedacated simulator for a specifec cpu is posssible to give correct story
but point by me is that compiler probly do not have the bug whot he say before!!!
a small correction:
A SIMULATOR simulates and as such a simulator you can afford will NEVER ......
re "a dedacated simulator for a specifec cpu" dream on.
again: why not just spend 5 minutes and try it with your devboard and emulator instead if spending days discussing it
sir eric
again i sit in corner with hat on and think hard
i do think we basicerally agree on point
do you?????
i sit in corner with hat on and think hard
WHY?
STOP THINKING!!!! stick the stuff on a devboard, hook up the emulator and see the result. WHY ON EARTH 'think' about somethog you can (dis)prove in 5 minutes??????
"The C8051F120/1/2/3 devices include a multiply and accumulate engine which can be used to speed up many mathematical operations."
OK - the MAC engine can be used that way - but do the Keil tools support it?
Does the option that you are selecting relate specifically to the MAC engine on the SiLabs C8051F120/1/2/3 devices?
"My Program runs on simulator"
And so it should! The Simulator will simulate the on-chip arithmetic acccelerator that the tools expect - if your real hardware doesn't have such a feature, then it obviously won't work properly on that hardware!
Thanks all.
to sir Eric it run correct on hardwaaare? My hardware circuit board is producing, and my board will connect several systems which are developping too.
The communication protocol between systems is constitute. So We can program and debug synchronously. I developped the MCU program and a AGSI DLL for Simulator other systems.
Even if run on the hardware, we cannot acquire other systems for debuging our hardware.
So simulator is very important method for us.
C8051F120 has 120KB Flash Code memory. My Mcu program size is 80KB now. and It would grown to 100KB or more. so emulator is download code to board slowly , and the mcu can be programed for limitted times, Then if debug it on hardware, we need offen repace the MCU. I closed the On-Chip Arithmetic Accelerator when simulating, I'll try on-chip accelerator on board,when finished simulation.
to sir Andy OK - the MAC engine can be used that way - but do the Keil tools support it? Keil support the MAC of C8051F, On "Target Options", if you select other MCU such as "Intel 8051H", the "On-chip Arichmetic Accelerator" option will dispear.
"STOP THINKING!!!! "
sir erac
that is VERY bad idea you say me!!!
persoon must think to design project!!!!
it called planning you know
i give you book on design for you be learning ????
OK, so we've established that your chip does have an arithmetic accelerator, and the Keil tools do support it...
"My Mcu program size is 80KB now."
So you must have a full, licensed copy of the tools, then?
In that case, you should contact Keil support with this issue.
Have you also contacted Silicon Labs?
So you must be using some kind of banking?
Have you checked carefully if there are any particular issues in using the accelerator with banking?
mr erac
here is good book i read for you please
books.google.com/books