Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Richard Erlacher
06/22/10 07:54
Read: 913 times
Denver, Co

#176827 - Yes, but does it?
Responding to: Per Westermark's previous message
Per Westermark said:
It doesn't matter if you talk about single-bit or multi-bit operations. We are not talking about 32-bit general-purpose processors, but processors intended for microcontroller use. Many of the 32-bit processors have memory mappings allowing the program to specify one port address to read 32-bits. A different address to read the low 16 bits. A third address to read the high 16-bits. A fourth address to read the low 8 bits, ...

An NXP LPC23xx or LPC17xx can manage an 8-bit or 16-bit read or write just as well as it manages a full 32-bit access. And the LPC17xx can continue this by having 32 unique addresses to just read or write a single bit. When needing to get the third and seventh bit, no normal processor will have such a dedicated instruction, so it'll be time for normal and/or operations. A 32-bit processor then automagically get the freedom to and/or 32-bit masks making it able to match and surpass any 8-bit processor. There are also 32-bit processors that can perorm a mask operation directly on the memory read - an advantage of having larger instructions and hence more bits available for the instruction decoder.

A 32-bit processor can always be built to match any instruction set you can have in an 8-bit processor. Look at the instruction sizes of the 8051. They can be implemented in a 32-bit processor, and there would still be ample of instruction space left for adding full 32-bit instructions.

So there can never be a general rule that a 8-bit processor can have an instruction set that can not be matched by a 32-bit processor.

It is easier to build a fast 8-bit ALU than a fast 32-bit or 64-bit ALU, so in theory you would be able to build an 8-bit processor that could run at a higher clock frequency than a 32-bit processor. But in the real world, we already know that few 8-bit processors reaches past 100MHz - there isn't enough driving force for taking the costs to produce extremely fast 8-bit processors since a program that needs such high speeds normally also needs the type of computation performance that improves with 16-bit or 32-bit operations, doing a single add instead of one add and three add-with-carry. Right now, the absolutely fastest 8051 implementations are sold as cores for incorporation in programmable logic, for customers who have already decided to take the extra cost to get custom hw acceleration.

In the end, it all comes back to the simple rule that you can find a specific 8-bit processor that can beat a specific 32-bit processor when doing a specific operation. But that is a specific case that can not be extrapolated - there are no physical limitations stopping a 32-bit processor from implementing the exact same instruction and processing that specific instruction in the same number of clock cycles, or even supporting superscalar operation.

In the real world, there are economic factors that limits the availability of too fast 8-bit processors, or 8-bit processors using the smallest geometries. At the same time, there are economic factors that tries to make 32-bit processors have as well-rounded instruction sets as possible, which is a reason why you don't normally do a "80351" 32-bit processor. The 80251 chip does exist, but didn't manage to deliver enough to make it take reasonably amounts of market share. A badly selling 80251 hasn't inspired the processor manufacturers into trying to copy the 8051 instruction set into 32-bit processors. But they are extremely interested into getting huge performance/mW from their 32-bit chips, so even if you do find 8051 instructions that can't be directly matched, you will find that the 32-bit processors are very, very fast anyway.

Every month, new interesting processors gets released. We can't design based on 10 year old truths. We have to look around, all the time. In some situations, the critical factor is how much flash or RAM we need. In some situations it is the number of nWh needed to perform a specific task. In some situations we need to operate concurrently on many I/O signals. All we know is that the price of the processor does not reflect the number of transistors in the core, or the size of the flash or RAM. And the number of transistors does not reflect the current consumption. So as professional developers, we just have to chose a processor based on some "best for the task" score, and not just based on "is my faviourite". Is the processor (cost, learning time, speed, current consumption, availability now, availability 5 years from now, tool quality, ...) a good fit?

The above can basically lead to one of three things:
1) we end up working with a lot of different processors, since the needs are so different between projects.
2) we end up cherry-picking projects to just do projects that fits reasonably well with our favourite set of processors.
3) we use our favourite processors weither they is good or bad for the task, sometimes producing substandard products because we were too stubborn.

I tend to end up in the first group. One project may use an 8051. The next an AVR. The third a PIC. The fourth a PPC. The fifth an ARM. For some reason, I have never done a commercial project with any MSP430, but hopefully one day... It doesn't bother me if I have to learn a new processor, as long as the required tools are commercial grade. I'm not too convinced about the tool quality for the PIC chips, but that is something to save for a different thread ;)

The real question is not whether or not a thing is possible, but, whether it has been done. Nobody's going to wait for this manufacturer or that to build what they need. They have to solve their problems with what can be obtained now ... not only the hardware but the associated development tools as well.

As I've said, I often use an MCU as a piece of hardware, and not as a computer. That relies on the MCU being able to do very specific things at a very specific rate in a very specific way. I'm not referring to "general" concepts, but, rather, to very specific features. As you probably recall, I'm particularly enamored with the feature set of the Maxim/Dallas DS89C4x0, specifically the dual DPTR and associated operations. Why? Well, it's because I can quickly move data around using those features, and, I've found that I often need to do that. If I were dealing with 32-bit data, a 32-bit MCU might seem appealing. However, my app's generally involve 8-bit data paths, or, occasionally, 16-bit paths. When I see a 32-bit MCU that can fetch an 8-bit value from a fixed location and move it to a location specified by a pointer, increment that pointer, and do it again in two clocks, as the Maxim/Dallas MCU can do in two or three 30 ns clocks, in page mode 1, or even in 5 clocks as it would in non-page mode, it'll get a serious look. The DS89C4x0's aren't the cheapest 805x's, but 32-bitters tend to be quite pricey once you look at the faster and more feature-rich versions. The cost of a set of development tools is a factor in some cases as well, at least for me, since my volume is generally very low. All those things have to be considered in the context of what you have to do, how you intend to do it, and what it's going to cost. The MCU cost is only important in cases where the design is ultimately intended for production, but the development cost, including tools, is important in cases where it is not.

The system designer has to be aware of what his hardware can do. He has to trade off the relevant factors of hardware cost, development cost, development time, power, etc, as his requirements demand. You're certainly right in that all things are possible, if one is "rolling his own" MCU in programmable logic, but how many of the current 805x users are doing that? Since ARM isn't available as "free" IP, that's not being used.

What do you have in mind as far as your notion that all instructions/operations can be implemented? Is there a core that you'd choose for DIY MCU applications?


List of 104 messages in thread
So What Is An 8051/2 Good For?      Andy Neil      06/17/10 16:35      
   thoughts      Erik Malund      06/18/10 04:36      
      The Future of the 805x      Joseph Hebert      06/18/10 08:40      
         PARC      Rob Klein      06/18/10 09:01      
            Bigger Hammers      Joseph Hebert      06/18/10 09:37      
               re: Bigger Hammers      Rob Klein      06/18/10 10:59      
               The opposite problem seems more common here!      Andy Neil      06/18/10 15:50      
         Would Toyota have had the problem if ...      Erik Malund      06/18/10 09:31      
            Toyota: Case in point      Joseph Hebert      06/18/10 09:46      
            RE: Toyota      Andy Neil      06/18/10 10:17      
               It was a mechanical fix ...      Richard Erlacher      06/18/10 22:37      
            Parallel Processing      Justin Fontes      06/18/10 10:35      
               Sometimes the practical reality is of little consequence      Richard Erlacher      06/18/10 22:45      
                  Totally Agree, but I was looking for a magic bullet      Justin Fontes      06/18/10 23:09      
                  RE: "outperform"      Andy Neil      06/19/10 01:10      
                     There are some operations ...      Richard Erlacher      06/19/10 06:19      
                        rephrased      Erik Malund      06/19/10 06:44      
                        Now, you are extrapolating      Per Westermark      06/19/10 06:44      
                           good points, but      Erik Malund      06/19/10 07:12      
                              How many 8051 chips uses 0.13u?      Per Westermark      06/19/10 08:57      
                                 not yet      Erik Malund      06/19/10 13:05      
                           not exactly ...      Richard Erlacher      06/20/10 09:39      
                              Do not get focused on one operation...      Michael Karas      06/20/10 10:20      
                              any 8-bit instruction can exist in a 32-bit processor      Per Westermark      06/20/10 12:14      
                                 Yes, but does it?      Richard Erlacher      06/22/10 07:54      
                                    So have you looked at any other processors?      Per Westermark      06/22/10 09:37      
                                       not a point of disagreement, but you missed it anyway      Richard Erlacher      06/22/10 22:50      
                                          A good point      Justin Fontes      06/22/10 23:10      
                                             beg to differ      Michael Karas      06/22/10 23:23      
                                             Disagree entirely!      Andy Neil      06/23/10 00:45      
                                          Yes, auto-increment/decrement is standard and not "feature"      Per Westermark      06/23/10 00:29      
                                             What I wanted to point out ...      Richard Erlacher      06/23/10 06:07      
                                                Same same all the time. no "one size fits".      Per Westermark      06/23/10 07:46      
                                                   and the most important point is (drumroll) ....      Erik Malund      06/23/10 09:49      
                                                Comparing Apples to Oranges      Andy Neil      06/23/10 08:03      
                                          Prices are comparable      Andy Neil      06/23/10 01:00      
               Parallel processing        Oliver Sedlacek      06/22/10 02:40      
                  Sweeping generalisation!      Andy Neil      06/22/10 03:22      
                     Not a magic silver bullit      Per Westermark      06/22/10 04:20      
                        Fond memories      Oliver Sedlacek      06/22/10 07:58      
                        A magic bullet      Justin Fontes      06/22/10 10:17      
                           Most concepts already exists in the wild      Per Westermark      06/22/10 11:31      
                           Another generalisation        Andy Neil      06/22/10 14:43      
                           Speed vs latency      Oliver Sedlacek      06/22/10 14:47      
                              Why 8051?      Andy Neil      06/22/10 15:08      
                                 Isn't it obvious?      Justin Fontes      06/22/10 23:17      
                                    ARM simpler than 8051      Oliver Sedlacek      06/23/10 00:21      
                                       Generalisation      Andy Neil      06/23/10 01:34      
                                          ARM 'MCUs' have their limitations too!      Valentin Angelovski      06/24/10 07:52      
                                             You normally engineer with a backup plan      Per Westermark      06/24/10 08:20      
                                    No, it's not!      Andy Neil      06/23/10 01:27      
                                       Im just trying to provide an argument      Justin Fontes      06/23/10 10:33      
                                          x bits are just one parameter among many      Per Westermark      06/23/10 11:27      
                                             Avoiding the issue      Justin Fontes      06/23/10 21:09      
                                                Avoiding what issue?      Per Westermark      06/24/10 03:10      
                                          They say it because it's true!      Andy Neil      06/24/10 00:59      
                                          RE: ARM is not the only 32-bitter      Andy Neil      06/24/10 01:15      
                                    Please don'g generalize      Per Westermark      06/23/10 01:28      
                                 Heterogenous multiprocessing widespread      Oliver Sedlacek      06/23/10 00:17      
                  Re: Multicore 8051      Valentin Angelovski      06/24/10 06:48      
                     ALU chaining      Oliver Sedlacek      06/24/10 06:57      
   Well... maybe      Jez Smith      06/18/10 14:47      
      A Linear Accelerator?      Joseph Hebert      06/18/10 15:28      
         Its one of these      Jez Smith      06/18/10 15:51      
      please, repeat      Stefan KAnev      06/19/10 04:56      
         All I was saying was      Jez Smith      06/19/10 10:39      
   So what the '51 are good for...      Jan Waclawek      06/21/10 13:54      
      Not terribly helpful      Andy Neil      06/21/10 14:46      
         Always up to the developers      Per Westermark      06/21/10 15:24      
            RE: The manufacturers tells us...      Andy Neil      06/21/10 15:30      
               Sales - "may be used for" presented as "recommended"      Per Westermark      06/21/10 16:41      
               pretty hot, low-power and small      Maarten Brock      06/22/10 15:17      
                  Automotive...      Andy Neil      06/22/10 15:26      
         but answers your original question (at least the one...      Jan Waclawek      06/22/10 10:19      
         MCS51 still rocking !!!      Kiran V. Sutar      06/23/10 05:14      
            Scale      Andy Neil      06/23/10 06:09      
            Missing the point      Andy Neil      06/23/10 06:21      
               Impossible to generalize into fields      Per Westermark      06/23/10 08:09      
                  An appropriate generalisation...      Andy Neil      06/23/10 10:20      
               You are right..Andy Neil      Kiran V. Sutar      06/24/10 05:27      
                  Cheers!      Andy Neil      06/24/10 05:43      
                     No..only AT89C52 can be used      Kiran V. Sutar      06/24/10 05:56      
                        why do you insist on Atmel?      Erik Malund      06/24/10 06:05      
                        what a strange post      Erik Malund      06/24/10 06:09      
                        Tools?      Andy Neil      06/24/10 07:12      
                           Multiple manufactuers with (almost) identical chips      Per Westermark      06/24/10 07:48      
                              Getting better      Andy Neil      06/24/10 08:52      
                                 Unified interrupt controller is really great      Per Westermark      06/24/10 09:28      
                           Yes, even with free tools for PIC/AVR      Kiran V. Sutar      06/24/10 08:38      
                              I mean no offense, but ...      Richard Erlacher      06/26/10 09:59      
                              Similar difficulties coming to 8051/2?      Andy Neil      06/26/10 10:28      
                                 Same same      Per Westermark      06/26/10 11:18      
                  Is it your purchase price or why so sure AVR or PIC are off?      Per Westermark      06/24/10 05:55      
                     Answer to Per and Erik...      Kiran V. Sutar      06/24/10 06:38      
                  Living in the past      John D. Maniraj      06/24/10 09:44      
                     Thanks John D. Maniraj      Kiran V. Sutar      06/25/10 03:54      
                     locking      Erik Malund      06/25/10 07:20      
                        RE: Locking      Andy Neil      06/25/10 07:32      
                        Agreed, but      John D. Maniraj      06/25/10 11:00      
                           fairly easy      Erik Malund      06/25/10 11:53      
      Don't forget consumer devices      David Good      06/24/10 13:45      
         A perfect application      David Good      06/25/10 10:49      
   8051 vs ARM      Valentin Angelovski      06/24/10 08:34      
   just thought of one case      Erik Malund      06/24/10 12:32      

Back to Subject List