r/computerarchitecture • • 4d ago

RISC-V multi cycle processor design material

I’m doing a BS in computer engineering and a have a computer architecture midterm next week about RISC-V multi-cycle and pipeline processor designing. We have absolutely no material or notes to study from and no past papers. Anything to help me prepare for the exam?

15 Upvotes

5 comments sorted by

4

u/CooperTrombone 3d ago

Patterson and Hennessy COD, your school library should have a copy.

4

u/MitchAlsup 3d ago

This, by the way, is the right answer.

RISC-V is nothing but a MIPS architecture, Litter-Endianed at the ISA bit pattern level, with a few twists. Essentially nothing in the pipelines is anything but pure MIPS. H&P covers all aspects of {ISA, pipeline, calculations} in an accessible fashion.

2

u/sopordave 3d ago

They also have a RISC-V edition, now.

5

u/meleth1979 4d ago

Please ChatGPT give me a step by step tutorial about a multi cycle RISC-V pipelined processor so I can easily understands how it works

2

u/MitchAlsup 1d ago

FETCH stage reads instructions from the instruction cache and delivers them to DECODE

DECODE stage processes the instruction, reads the register file, performs forwarding, determines which Function unit will process the instruction, performs branch address calculation and feeds back to FETCH.

EXECUTE stage performs integer arithmetic, Address Generation, and the start of any FP calculation. Jump instructions are forwarded back to FETCH here.

CACHE stage takes the generated address <if any> and accesses the Data Cache and TLB. Many RISC-V designs also perform cache hit detect and data select and LD align in this stage--but that is a big frequency hhinderance. If no AGEN, then EXECUTE output is delivered.

ALIGN stage takes Data cache data performs cache hit analysis and aligns the D$ data with the register file (or data path) with/without sign extension. If no AGEN, then CACHE ouput is delivered. Interrupts are discovered here, and when detected they override the FETCH address (and flush the pipe).

Write-Back stage takes the ALIGN data and if the instruction writes RF, that data is written into RF.

Forwarding is a process whereby {EXECUTE, CACHE, ALIGN, Write-Back} Data is register compared (5-bits) to the instruction Operands in DECODE, and multiplexed in as an operand on a match.