-1

Major difference in RISC and CISC is that in RISC we must need to use registers to do any arithmetic or logic operation. But in case of CISC we can do such operation directly with memory locations. So what is the advantage of implementing register banking in micro controller architectures? Question is not for the advantage of RISC but the question is for what is need of register in RISC architecture. As in other architecture CISC operation can be done directly with meomery location we don't need to take it in register and then again move into the memory location. Below is the example: CISC: MUL A,B RISC: LDA R0,A LDA R1,B MUL R0,R1 STR A,R0

So in above example what is the advantage of using R0 and R1 ie. registers. what is the advantage of load store architecture?

shreyas_patel21
  • 317
  • 1
  • 4
  • 14
  • Possible duplicate of [What does 'bank'ing a register mean?](http://stackoverflow.com/questions/13432297/what-does-banking-a-register-mean) – user3528438 Feb 05 '17 at 17:20
  • this question is not the duplicate of [What does 'bank'ing a register mean?](http://stackoverflow.com/questions/13432297/what-does-banking-a-register-mean) because that question is about banking and from that we can't get the proper answer for the advantage of register architecture. – shreyas_patel21 Feb 05 '17 at 17:34
  • This question is not about banked registers, the term was incorrectly used in the question. the title and the question need to be re-written for clarity. (and then still closed because there is no answer). – old_timer Feb 06 '17 at 03:52
  • Again the question was not for banked registers, the term was register bank. I was asking for register or register bank. If you took it other way does not mean everyone can take it that way. – shreyas_patel21 Feb 06 '17 at 17:29

3 Answers3

2

Register banking is something else, I assume you are simply asking about using a register directly or not. Well the memory access takes an eternity, even if cached. Several to hundreds of clock cycles for each of the operands where in RISC if you are assuming a pure register based scheme which not all are, the lines are getting fuzzy. With CISC if microcoded it is going to registers anyway, then the operation is happening, if not microcoded then it still gets latched into internal temporary storage (registers) and then the operation can begin. With risc you have a couple-three extra, simpler, instructions the latching to registers takes the same amount of time as it does in CISC. Now if the algorithm never uses that result or does not use it for a while, it might be a win for CISC (if not microcoded) but if the value is an intermediate value in an algorithm then a clear win for RISC. Even if everything is cached it is a half a dozen to dozen clock cycles to get each parameter and write it back, any cache misses and it is an eternity. Same for RISC but with more registers, and significantly faster access to those registers, zero or one clock for each value and to store back, for some percentage if not the whole algorithm.

As with any benchmarking it is trivial to show a RISC winning case and to show a CISC winning case.

The major difference between RISC and CISC is CISC are complicated time consuming instructions where RISC they are much simpler, you arrange the tasks you need to do and have tighter control over those tasks, you dont have a lot of waste per step. One could argue caches were created to deal with the inefficiencies of CISC or at least one popular one. Both benefit sure, but one relies on the other doesnt as much. Trivial to show CISC winning code and trivial to show RISC winning code. Same goes for VLIW, and others.

RISC designs are simpler, smaller, pipes can be shorter, compiler has more control over the performance, etc. So with microcontrollers you can have a very nice processor core with a 3 stage pipeline that is really low power and still quite efficient. The 6502, z80, 8051, etc have really died off for the most part, you still do see a lot of 8051s if you are looking, the desktop/laptop you might be reading this with probably has one 8051, but that is due to royalties and not because of its size or performance, you probably have several to dozens of ARM cores for every x86, within the same box or certainly around the house. A CISC is going to be relatively massive and inefficient, it might be possible to get the power consumption down to RISC levels, that may just be a matter of design and not CISC vs RISC, but the RISC implementations are doing a much better job at watts per mhz than the CISC implementations.

old_timer
  • 69,149
  • 8
  • 89
  • 168
1

Using registers can simplify the operand fetching logic of functional unis. With CISC functional units should be able to fetch data from memory. With RISC, all the functional units will operate on registers as it is guaranteed that the data will be there, so less complicated.

Also, think of a case where you have multiple MUL operations some uses data at location A, some use B, shown below.

'MUL A, B' 'MUL C, B'

When you perform the operation in CISC, you will be reading B, twice. But in RISC, you load it to a register once, and can use multiple times. So less memory (cache) accesses.

Also think of number of bits needed to represent that MUL in CISC. As A, B, C can be memory locations, they could be anywhere within your address spaces. On the other hand with registers in RISC, bits needed to represent your operands are less, hence less complicated instruction set.

Isuru H
  • 1,191
  • 1
  • 8
  • 11
0

As from above responses, we can conclude that the using registers instead of direct memory location gives the benefit in efficiency in terms of clock cycle and so the power consumption. They also give the benefit in term of complexity of instructions.

shreyas_patel21
  • 317
  • 1
  • 4
  • 14