Do microcontrollers have cache?

  • Thread starter Thread starter EvLer
  • Start date Start date
AI Thread Summary
Microcontrollers may or may not have cache, depending on their architecture, with RISC designs typically incorporating cache for performance, while CISC designs generally do not. RISC architectures aim for simpler instructions that can be executed quickly, often utilizing cache to maintain high processing speeds. In contrast, CISC processors require multiple cycles to execute complex instructions, which diminishes the need for cache. Cache can be expensive and is justified only when performance enhancements are significant. Understanding the differences between RISC and CISC architectures helps clarify the role of cache in microcontrollers.
EvLer
Messages
454
Reaction score
0
Do microcontrollers have cache?
 
Engineering news on Phys.org
Depends on the uC. RISC architectures typically use cache, but I don't think it's common for CISC architectures. Not sure about that though. Do you have a uC in mind?
 
no, not really, just was wondering when someone asked me i could not think if they do or not. But thanks! now at least i know that they may or may not.
 
one more question: what is usefulness in NOT having cache or what is used in place of it?
Thanks!
 
I googled risc cisc cache tutorial, and got some great hits. Here's the first one:

http://www.laynetworks.com/RISC.htm

The goal with a RISC architecture is to have fewer and simpler instructions in the instruction set. As they say on that web page, ideally your RISC processor should be able to execute one of its instructions per clock cycle, versus many cycles in traditional CISC processors. In a traditional CISC processor, you spend several minor cycles fetching the first part of the instruction, then figure out if there is more to fetch (multi-word instructions like long jumps or add immediates), then mess around some more, then finally perform the instruction.

But since the RISC architecture is aimed at executing one simple instruction per clock cycle, it can gobble up data much faster than a CISC processor, so internal fast cache is used as a pipeline to keep the RISC engine running at full speed. But as with any pipeline architecture, if you get an unanticipated branch, you have to empty the pipe and start re-filling it, which lowers the effective speed of the processor.

You can have several levels of cache, with the smallest and fastest on the processor silicon itself, and an intermediate cache off-chip that is fed by the main RAM section of the motherboard. Since cache needs to be fast, it is expensive to use, and you only use it if you can justify the cost from the performance enhancement angle. With a CISC processor, you usually just have RAM outside and no justification for pipeline cache.
 
Last edited by a moderator:
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Electromagnet magnetic field issue'
Hi Guys We are a bunch a mechanical engineers trying to build a simple electromagnet. Our design is based on a very similar magnet. However, our version is about 10 times less magnetic and we are wondering why. Our coil has exactly same length, same number of layers and turns. What is possibly wrong? PIN and bracket are made of iron and are in electrical contact, exactly like the reference design. Any help will be appreciated. Thanks. edit: even same wire diameter and coil was wounded by a...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...
Back
Top