[go: nahoru, domu]

Skip to content

Digital Systems 2 Course [ECE 778] - CA2 - Spring 2023 - University of Tehran - Dr. Safari

Notifications You must be signed in to change notification settings

fardinabbasi/RISC-V_Processor_SingleCycle

Repository files navigation

Single Cycle RISC-V Processor

Design and implementation of RISC-V processor with a single-cycle datapath and controller.

Commands

R_Type:  add, sub, and, or, slt
I_Type:  lw, addi, xori, ori, slti, jalr
S_Type:  sw
J_Type:  jal
B_Type:  beq, bne, blt, bge
U_Type:  lui

Datapath

Controller

Immediate Extension Unit Controller

ALU Opcode Controller

ALU Controller

Test Code

The following assembly code can be converted to machine code using RISC-V Online Assembler.

add X7,X0,X0;
addi X6,X0,10;
Loop:
beq X7,X6,end;
slti X8,X7,2;
lw X1,A(X8)
if:
 slt X9,X12,X11;
beq X9,X0,end-if;
add X12,X0,X11;
end-if:
addi X7,X7,1;
J Loop;
end:

About

Digital Systems 2 Course [ECE 778] - CA2 - Spring 2023 - University of Tehran - Dr. Safari

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published