Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
CS231
Computer Organization Lab
Two Tasks
1. Augment the RV32I single-cycle processor by supporting the LUI
instruction
p Please refer to RARS help menu or online RISC-V ISA manual for the
functionality and format of the LUI instruction.
p Test your design with TestRV32I
p The memory address to be tested is 0x2004
p The correct output on MData after finishing the program is
0xbeefdead
2. Implement the pipelined RV32I based on the single-cycle
processor in Task 1
p Your pipeline processor only needs to impelment the Forward Unit,
without the need to implement the Hazard Unit, because the test
code does not have control hazard to deal with.
p Test your design with TestPipeline, and the same output as Task 1 is
expected.
2Test Code
n The code for testing your designs is given below
3
.text
.globl main
main:
li t0, 0xdeadbeef
li t1, 0x2000
sw t0, 0(t1)
#FA=2 (EX Forward), FB=1 (MEM Forward)
lw t2, 0(t1)
#t2=0xdeadbeef, FA=1 (MEM Forward)
sw t2, 4(t1)
#FM=1 (SW GPR[rs2] Forward), FA=1 (MEM Forward)
lw t3, 4(t1)
#t2=0xdeadbeef
srli t4, t2, 16
#t4=0x0000dead
slli t5, t3, 16
#t5=0xbeef0000, FA=1 (MEM Forward)
or t5, t5, t4
#t5=0xbeefdead, FA=2 (EX Forward), FB=1 (MEM Foreward)
addi t1, t1, 4
sw t5, 0(t1)
#FA=2 (EX forward), FB=1 (MEM Foreward)
li a7, 10
ecall
v2.0 raw
deadc2b7
eef28293
00002337
00030313
00532023
00032383
00732223
00432e03
0103de93
010e1f13
01df6f33
00430313
01e32023
00a00893
00000073
final-code.asm
final-code.hexSubmission
n This time you will not be testing your design on the EduCoder
platform. You only need to test in logisim.
n After passing logisim tests, you need to submit the following
materials on Moodle CS231 course page
p Your circuit design file: the design file should be self-contained, any sub-circuit
should be in the same file of your design -- do not load your sub-circuits as
standalone logisim library
p The two screenshoot files for the test results: TestRV32I.png and TestPipeline.png
n Submission deadline and site
p Deadline: June 6 00:00
p Site: Moodle CS231 course“Final Project”assignment
n The final project account for 15 points of the course
p Task 1: 6 points
p Task 2: 9 points