Solve RISC CPU Questions - Confirm Answers

  • Thread starter fran1942
  • Start date
  • Tags
    cpu
In summary, the conversation discusses the use of overlapping register windows in a RISC machine and the number of registers available for input and output parameters. The machine has 298 registers with 22 registers in each window, 10 of which are global and 10 are local. The conversation also explores the number of windows available for use and the increment of the current window pointer at each procedure call. The final answer is uncertain as it depends on whether the CWP register is included in the register count.
  • #1
fran1942
80
0
Hello, I am having some trouble with the following set of questions.
I include them along with my answers.
Would anyone be able to confirm if I am correct here ?
Thanks kindly for any help.

Suppose a RISC machine uses overlapping register windows for passing parameters between procedures. The machine has 298 registers, and each register window has 22 registers, of which 10 are global registers and 10 are local registers. Answer the following:

a) How many registers would be available for use by input parameters?
My attempted answer: 1

b) How many registers would be available for use by output parameters?
My attempted answer: 1

c) How many register windows would be available for use?
My attempted answer: 13

d) By how much would the current window pointer (CWP) be incremented at each procedure call ?
My attempted answer: By 12.
 
Last edited:
Physics news on Phys.org
  • #2
I'm very rusty but nobody else has answered so...

As I recall with overlapping register windows the output register is at the end of the window so by incrementing the CWP the output resister of one proceedure automatically becomes the input register of the next proceedure. See drawing.

So I think the CWP only needs to be incremented by 11 not 12.

However that would mean the number of windows you can fit into 298 registers isn't a whole number so I'm probably wrong...

298 - 10 global = 288
but
288/11 = 26.18
 

Attachments

  • Registers.png
    Registers.png
    2 KB · Views: 686
  • Like
Likes 1 person
  • #3
Well I can make the number fit by assuming that the CWP register is one of the 298 registers...

298 - 10 global - 1 CWP = 287

All the windows are 11 registers long except one which is 12 so

287 = 11*n + 12

n = 25 so there are 26 windows in all.
 
  • Like
Likes 1 person

Related to Solve RISC CPU Questions - Confirm Answers

1. What is a RISC CPU?

A RISC (Reduced Instruction Set Computer) CPU is a type of microprocessor that uses a simplified instruction set, allowing for faster and more efficient processing compared to a CISC (Complex Instruction Set Computer) CPU.

2. How does a RISC CPU differ from a CISC CPU?

A RISC CPU has a smaller instruction set, with each instruction performing a single, simple operation. A CISC CPU has a larger instruction set, with each instruction capable of performing more complex operations.

3. What are the benefits of a RISC CPU?

RISC CPUs are typically faster and more efficient than CISC CPUs, as they can execute instructions more quickly and require less processing power. They are also easier to design and manufacture, making them a more cost-effective option.

4. How does a RISC CPU handle complex tasks?

RISC CPUs use a technique called pipelining, which breaks down complex instructions into smaller, simpler instructions that can be executed in parallel. This allows for faster processing of complex tasks.

5. Are RISC CPUs used in modern computers?

Yes, RISC CPUs are still widely used in a variety of modern computers, such as smartphones, tablets, and embedded systems. They are also commonly used in high-performance computing applications, where speed and efficiency are crucial.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Programming and Computer Science
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
23
Views
5K
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
13K
  • Programming and Computer Science
Replies
1
Views
651
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
Back
Top