Tasks
Implement datapath components in RV32I single-cycle processor
2
Control Logic (Decoder)
Tasks
n Implement the Controller
n Impelment the Single-cycle Processor using
p Datapath components implemented in Lab4
– You need to load your Lab4 circ file as a library for using them
p Controller implemented in this Lab
n Test your implementations using
p TestController
p TestRV32I
3
Implement the Controller
n Instructions to support
p Instructions covered in class,
p ECALL instruction
– We use it in a simple way: once the processor encounters an
ECALL instruction, it sets the Halt signal to 1, and the processor
should stop execution (i.e., PC should not be updated any more,
making the processor halts at the ECALL instruction forever)
n You need to implement totally xxx instructions
p See the next slide for more details...
Test Your Controller
n A tester named TestController has been provided to
faciliate your testing of your controller locally
p You can upload and test your implementation on EduCoder
after passing the local test, this will reduce your effort
n The tester is almost done
p Test vectors for the 30 instructions, as well as their
combinations with BrEq/BrLT input signals have been
provided in the corresponding ROMs, and there are 48
elements in each ROM for testing
p But the Result ROM is empty, and you need to fill it with
correct results (each result corresponds to the set of control
signals that should be produced by the controller)
p See the EXCEL file ctr-result.xlsx for more details...
6
Implement the Single-Cycle Processor
n The fetch stage has been given in addition to the input/output pins,
and the IMEM has already been filled with the Fib(6) program (our
processor lacks support for reading a parameter from keyboard)
n You need to implement the rest parts, some important issues include
p How to Halt the processor when encoutering the ECALL instruction?
– Hint: You can use the Halt control signal to disable clock input to PC,
therefore it will not be updated anymore
p The processor should support reading data from an address given by
the input pin Addr, and the data should be passed to the output pin
MData. This will enable us to test that your processor has correctly
executed the program, and the correct result has been writen to the
correct memory location
– Hint: The address input of the DMEM should be able to select from two input
addresses, one from ALU output, and another from the Addr input pin. The
Halt signal can be used to control which path to select
7
Test Your Processor
n The tester (TestRV32I) for your RV32I processor is
simple, but a couple of things to be reminded
p Before testing, you need to set the input pin Addr=0x2000,
because the final result of Fib(6) will be written to this
memory location, and the tester need to read this result from
0x2000
p When the program finished execution (by encountering the
ECALL instruction), the Halt signal becomes 1. Pay attention
to that, and you can check the result of MData to see
whether the it is 0xd (13 in decimal). If yes, your processor
works correctly, and you can upload it to EduCoder for pass
testing.
p The ICount output pin gives the number of instructions that
have been executed, and the PCOut pin gives the address of
currrent instruction
8
List of Files
n RV32I.circ
p The framework of the circuits that you need to implement
n ctr-inst.asm
p The source file containing all instructions and BrEq/BrLT combinations for testing your
controller
n ctr-inst.hex
p The binary of ctr-inst.asm (in textual hex) that has been loaded into the Inst ROM in
TestController
n ctr-breq.hex, ctr-brlt.hex
p The combinations of BrEq/BrLT that are used as input for testing your Controller, which have
been loaded into the BrEq and BrLT ROMs
n ctr-result.xlsx
p The Truth Table for testing your controller. You need to fill it by yourself, and use it to
generate te ctr-result.hex file.
n ctr-result.hex
p The correct result of the generated control signals to compare with the control signals
generated by your controller. You need to load it into the Result_S ROM.
n fib.asm
p The source file of the Fib(6) used for testing your RV32I processor
n fib.hex
p The executable (in textual hex) of Fib(6) that has been loaded into the IMEM
9
The End
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- Excel服务器2025实现了不用安装Excel也能实现Excel共享
- 无界智造 场域共生丨荣事达智能房屋闪耀亮相2025世界制造业大会
- 连连数字CEO辛洁受邀出席INVESTOPIA全球系列对话·中国论坛 与业内共探中阿投资合作机遇
- 共话AI赋能数字化转型 重构企业智能管理新生态
- 三星官宣5月13日举行新品发布会,超轻薄Galaxy S25 Edge发布
- HGC环电强化国际业务领导架构 谭君骥及Ravindran Mahalingam分别担任专精职务
- 海伯森六维力传感器:助力人形机器人产业发展的创新力量
- 达闼董事长黄晓庆:以技术破局致胜从未止步
- 从辅助到核心,企业如何基于AI Agent升级品牌数字营销
- 国产2.5亿超高分辨率图像传感器发布,主要面向机器视觉领域
- 西部数据推出多款超高速、大容量存储解决方案
- 中关村e谷承办“科创耀未来 奋进谱新篇”企业家创新论坛圆满落幕
- 航科卫星“汕头数字一号”卫星发射成功!
- Gartner 最新魔力象限出炉!ManageEngine卓豪成功入围
- 科技重塑物流,英特尔&集和诚加速智慧物流发展!