| Author |
Message |
nebisman
Joined: 13 Apr 2002 Posts: 291 Helped: 1
|
09 Nov 2003 20:34 simple question about 8051 Atmel CORE |
|
|
|
|
Hi friends
Could you tell me how many clock cycles per instruction are for this processor. If it is variable length what is a good average?
:=) thanks ME and gil.
nebisman
Last edited by nebisman on 10 Nov 2003 0:30; edited 1 time in total |
|
| Back to top |
|
 |
gil
Joined: 28 Mar 2002 Posts: 36 Helped: 1 Location: Argentina
|
09 Nov 2003 20:53 Re: simple question about 8051 Atmel CORE |
|
|
|
|
| 12 as far I know
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
09 Nov 2003 22:40 |
|
|
|
|
The instructions for 8051 cores are variable lenght.
The shortest lenght is 12 clock cycles.
Read this Atmel document:
Architecture Overview www.atmel.com/dyn/resources/prod_documents/DOC0497.PDF
Look at the section about Machine Cycles.
Some instructions like MUL and DIV are 4 * 12 clock cycles.
|
|
| Back to top |
|
 |
Google AdSense

|
09 Nov 2003 22:40 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
wzdreamer
Joined: 16 Jan 2002 Posts: 131
|
11 Nov 2003 10:13 |
|
|
|
|
there are some new Atmel's product which has 6 cloks per machine cycle....
but for all other Atmel's devices is 12...
I mean 8051 Architecture....
|
|
| Back to top |
|
 |
wzdreamer
Joined: 16 Jan 2002 Posts: 131
|
11 Nov 2003 10:18 |
|
|
|
|
| there are some devices which works on 60MHz with internal memory when 12 cloks per cycle....
|
|
| Back to top |
|
 |
GeorgeM
Joined: 19 Nov 2003 Posts: 37
|
20 Nov 2003 11:03 Re: simple question about 8051 Atmel CORE |
|
|
|
|
The modern '51 derivatives have 70% of instructions with 1-2 system clocks....
For example, the Cygnal C8051F12x and it can work at 50 MHz and ever at 100 MHz
|
|
| Back to top |
|
 |
wzdreamer
Joined: 16 Jan 2002 Posts: 131
|
20 Nov 2003 17:26 |
|
|
|
|
Cygnal 8051 is not Atmel 8051
I can buy AT89S52 for 1.75 USD per 1 pc.
and 18 USD to 34 USD per 1 pc. for Cygnal 8051 family...
choice is yours....
|
|
| Back to top |
|
 |
W49N3R
Joined: 23 Nov 2003 Posts: 5
|
23 Nov 2003 6:36 Re: simple question about 8051 Atmel CORE |
|
|
|
|
12 clock cycles to fetch a byte and execute. Instructions that need more than one byte (usualy the ones addressing memory or with included operand values) will require extra one or two memory fetch cycles.
It can leads to 12, 24 or 36 cycles.
Considering yet that the 8051 core uses only one accumulator, some simple task of rotating one bit in a byte in memory uses 3 or more instructions, it can goes to more than 100 clock cycles just to rotate left one bit in some RAM memory byte.
Interesting fact:
I love the 8051, worked with for many years, and still working, but, when you comparing the above 8051 clock cycles to the AVR, this one can rotate one bit in its internal 32 accumulators tied up to the ALU, in a SINGLE clock cycle, that means the AVR does it at least 100 times faster than the plain 8051. In other words, you also could say that if choosing the lower clock frequency for the AVR in order to produce the same results in time than the 8051, the AVR could run in 1/100 clock (for that rotate instruction) and probably in 1/20 of the power consumed by the plain 8051.
One of the AVR tricks is that it fetches memory data in 16 bits wide, so even instructions with 2 bytes are fetched at once, while in the 8051 it takes two machine cycles (24 clock cycles).
Wagner.
|
|
| Back to top |
|
 |
GeorgeM
Joined: 19 Nov 2003 Posts: 37
|
01 Dec 2003 17:35 Re: simple question about 8051 Atmel CORE |
|
|
|
|
| W49N3R wrote: |
Interesting fact:
I love the 8051, worked with for many years, and still working, but, when you comparing the above 8051 clock cycles to the AVR, this one can rotate one bit in its internal 32 accumulators tied up to the ALU, in a SINGLE clock cycle, that means the AVR does it at least 100 times faster than the plain 8051.
One of the AVR tricks is that it fetches memory PROGRAM in 16 bits wide, so instruction (2 bytes) are fetched at once, while in the 8051 it takes two machine cycles (24 clock cycles).
|
To be honest, many 2 bytes instructions of '51 MC are fetched in one machine cycle. Anyway I agree, AVR MC is 20 times really faster the standard 8051 MC and I like the AVR MC & its instruction set (frankly speaking the best choice is the MSP430 instruction set).
The question is what should I do if I need in 50-100 MHz for single instruction. I can buy nine chipest AT89S52 but you know collecting nine pregnant women doesn'n give you a child in the month
Regards,
George
|
|
| Back to top |
|
 |
gul hameed
Joined: 24 Nov 2003 Posts: 27
|
03 Dec 2003 17:21 Re: simple question about 8051 Atmel CORE |
|
|
|
|
very good discution here
i am happy that boys r involved here in answers
i give u simple answer according to my knowlwdge
external crystal is divided by 12 it means if there is 12mhz xtal
then u have 1mega execution cycls and average instructions are takes
2 exe cycles in case of assembly
|
|
| Back to top |
|
 |
nachus001
Joined: 08 Sep 2003 Posts: 20
|
04 Dec 2003 19:14 Re: simple question about 8051 Atmel CORE |
|
|
|
|
Hi George M
I think if you need single clock instructions at 50-100 Mhz you should stick to a DSP chip.
Cheers
Nachus
|
|
| Back to top |
|
 |
mami_hacky
Joined: 28 Mar 2002 Posts: 724 Helped: 4 Location: Some where
|
05 Dec 2003 0:14 |
|
|
|
|
A simple way is to use 8051 Core on a FPGA. 8051 or other cores like it are easily obtainable, and I think when implemented on FPGA, it can run for example with a 100 MHz clock frequcny ( normal running freq for a good design in Spartan-II ) additionaly you can implement much more circuit inside FPGA. it is low cost , reliable, easy to develope and ...
OK! using DSPs is really another solution, however, the development time will become larger and ...
|
|
| Back to top |
|
 |
GeorgeM
Joined: 19 Nov 2003 Posts: 37
|
05 Dec 2003 14:48 |
|
|
|
|
| Nachus wrote: |
I think if you need single clock instructions at 50-100 Mhz you should stick to a DSP chip.
|
Yes, I do. I use the 100 MHz C54xx DSP from TI. But I try to find another way...
| mami_hacky wrote: |
A simple way is to use 8051 Core on a FPGA. 8051 or other cores like it are easily obtainable, and I think when implemented on FPGA, it can
run for example with a 100 MHz clock frequcny ( normal running freq for a good design in Spartan-II ) additionaly you can implement much more circuit inside FPGA. it is low cost , reliable, easy to develope and ...
|
Is there some way to use the AVR core on a FPGA at 50-100 MHz clock?
I am new in FPGA-solutions so one more question. How much does it cost to get the 8051 core on a FPGA?
Regards,
George
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
05 Dec 2003 15:36 |
|
|
|
|
| GeorgeM wrote: |
| Nachus wrote: |
I think if you need single clock instructions at 50-100 Mhz you should stick to a DSP chip.
|
Yes, I do. I use the 100 MHz C54xx DSP from TI. But I try to find another way...
| mami_hacky wrote: |
A simple way is to use 8051 Core on a FPGA. 8051 or other cores like it are easily obtainable, and I think when implemented on FPGA, it can
run for example with a 100 MHz clock frequcny ( normal running freq for a good design in Spartan-II ) additionaly you can implement much more circuit inside FPGA. it is low cost , reliable, easy to develope and ...
|
Is there some way to use the AVR core on a FPGA at 50-100 MHz clock?
I am new in FPGA-solutions so one more question. How much does it cost to get the 8051 core on a FPGA?
Regards,
George |
You can buy AVR ASICs from Atmel running up to 70 MHz.
You can also find some free AVR cores at www.opencores.org
|
|
| Back to top |
|
 |