Solve RISC CPU Questions - Confirm Answers

  • Thread starter Thread starter fran1942
  • Start date Start date
  • Tags Tags
    cpu
Click For Summary
SUMMARY

The discussion centers on RISC CPU architecture, specifically regarding overlapping register windows for parameter passing. The participant analyzed a scenario with 298 registers, 22 per window, and provided answers to questions about input/output parameter registers and the current window pointer (CWP) increment. The correct calculations reveal that there are 26 register windows available, with the CWP incrementing by 11 at each procedure call, confirming the participant's reasoning and adjustments to their initial answers.

PREREQUISITES
  • Understanding of RISC CPU architecture
  • Familiarity with register windowing concepts
  • Basic knowledge of parameter passing in procedures
  • Ability to perform arithmetic operations related to registers
NEXT STEPS
  • Study RISC CPU register windowing techniques in detail
  • Learn about parameter passing mechanisms in RISC architectures
  • Explore the implications of overlapping register windows on performance
  • Investigate the design and implementation of RISC processors
USEFUL FOR

Computer architecture students, RISC CPU designers, and software engineers working on low-level programming or performance optimization in RISC environments.

fran1942
Messages
80
Reaction score
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
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: 754
  • Like
Likes   Reactions: 1 person
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   Reactions: 1 person

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 23 ·
Replies
23
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
Replies
7
Views
14K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K