基于MIPS指令单周期微控制器设计 哈工大_第1页
基于MIPS指令单周期微控制器设计 哈工大_第2页
基于MIPS指令单周期微控制器设计 哈工大_第3页
基于MIPS指令单周期微控制器设计 哈工大_第4页
基于MIPS指令单周期微控制器设计 哈工大_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、课程设计说明书(论文)课程名称: 数字集成系统课程设计 设计题目: 基于MIPS指令的单周期微控制器设计 院 系: 航天学院 微电子科学与技术系 班 级: 设 计 者: 学 号: 指导教师: 设计时间: 2015年7月27日-2015年8月7日 姓 名: 院 (系): 专 业: 班 号: 任务起至日期: 2015 年 7 月 27 日 至 2015 年 8 月 7 日 课程设计题目:基于MIPS指令的单周期微控制器设计已知技术参数和设计要求:Load/store,算术逻辑运算和流程控制是RISC的主要组成部分,本设计以MIPS指令子集为例,研究RISC的基本原理与硬件建模。(1) load/s

2、tore设计设计要求:参考计算机组成与设计硬件/软件接口,进行模块划分和设计微控制器整体结构,设计支持load、store指令的数据通路,并比较各种实现的效率、面积和速度。(2) 算术逻辑运算设计设计要求:设计支持add、sub、multi、or等指令的数据通路。(3) 流程控制设计设计要求:设计支持branch、jump等指令的数据通路。(4) 基于MIPS指令的单周期微控制器设计设计要求:同组同学共同完成具有10条左右指令的单周期微控制器设计。基本要求:1)确定设计采用的结构2)划分所确定的结构,画出模块图,确定模块间的连接关系,端口方向及宽度3)确定设计的验证方案,验证点及验证向量4)完

3、成设计的RTL建模及测试平台建模5)完成设计的验证、逻辑综合,给出设计的评价(面积、速度)6)完成设计报告工作量:本课程设计按照每4人一组分工协作完成。每位成员完成设计要求中的(1)(3)任务之一,作为独立完成项,在完成个人项目基础上共同完成设计要求中的第(4)项。熟悉开发环境、学习EDA工具使用:10学时分析题目、确定设计方案:5学时设计、验证、综合以及结果分析、整理数据:25学时工作计划安排: 2015.7.272015.7.28 学习modelsim、DesignCompiler使用方法 2015.7.292015.7.30 分析设计题目,确定结构及模块划分 2015.7.312015.

4、8.6 完成设计、验证、综合与性能分析 2015.8.7 提交课程设计报告 同组设计者及分工: 指导教师签字_ 年 月 日 教研室主任意见: 教研室主任签字_ 年 月 日*注:此任务书由课程设计指导教师填写。一、 功能描述基于MIPS指令的单周期微控制器设计:l_w和s_w指令的实现:控制器实现支持load word(lw)、store word(sw)指令的MIPS单周期数据通路: l_w:寄存器rs中的数据和立即数imm相加,得到存储器地址,用这个地址访问存储器,把得到的存储器数据写入寄存器rt中。把PC + 4写入PC。 s_w:寄存器rs中的数据和立即数imm相加,得到存储器地址,把寄

5、存器rt中的数据写入这个地址的存储器中。把PC + 4写入PC。二、 设计方案:1. 整体框图:2. 模块划分:下图中,各个大模块中还包含:立即数符号位扩展,寄存器堆,存储器,ALU,指令寄存器,PC,控制部件3. 模块连接框图:4. 总体设计思想:我设计的部分主要包三四部分,分别为:指令寄存器、寄存器堆、和存储器,额外还有一个Alu,即加法器和一个pc,即程序计数器,是借助同组同学编译的程序。存取指令需要两个状态单元,计算下一个指令地址需要一个加法器,两个状态单元分别是指令寄存器和程序寄存器。指令寄存器是制度的,任意时刻的输出都反映了输入的地址的内容,而不需要读控制信号。程序计数器是一个32

6、位的寄存器,让在每个时钟周期末都会被写入。加法器被设计为只进行加法运算的ALU,他将输入的俩个32位数相加将结果输出。Mips指令执行时,首先需要的是指令存储器,用来存储指令,并根据所给地址提供指令,指令地址存放在pc中,pc的设计还需要一个加法器来指向下一个指令的地址。在执行R型指令时,读两个寄存器,对他们中的内容进行Alu操作,再写出结果。处理器的32个寄存器组成一个寄存器堆的结构,即register。在读取指令的时候,一般形式为:op rs rt imm,此时需要将一个16位的立即数带符号扩充为32位,然后和rs地址内的内容通过Alu加法器相加,如果是读取指令即load word ,即得

7、出的是存储器地址,将得出的存储器地址内的内容写入rt所指的寄存器地址处,如果是存储指令即store word,即得出的存储器地址用来写入rt地址内的所存内容。5. PC程序计数器:6. L_w电路图:7. L_w的设计思想: sw rt, imm(rs) ; memoryrs+(sign)imm read_file -format verilog /home/homeO5/user1/dbf4/alu.v /home/homeO5/user1/dbf4/control.v /home/homeO5/user1/dbf4/cpu_top.v /home/homeO5/user1/dbf4/l_s

8、.v /home/homeO5/user1/dbf4/pc.v /home/homeO5/user1/dbf4/regfile.vLoading verilog files: /home/homeO5/user1/dbf4/alu.v /home/homeO5/user1/dbf4/control.v /home/homeO5/user1/dbf4/cpu_top.v /home/homeO5/user1/dbf4/l_s.v /home/homeO5/user1/dbf4/pc.v /home/homeO5/user1/dbf4/regfile.v Detecting input file

9、type automatically (-rtl or -netlist).Running DC verilog readerReading with Presto HDL Compiler (equivalent to -rtl option).Running PRESTO HDLCCompiling source file /home/homeO5/user1/dbf4/alu.vCompiling source file /home/homeO5/user1/dbf4/control.vWarning: /home/homeO5/user1/dbf4/alu.v:13: The stat

10、ements in initial blocks are ignored. (VER-281)Warning: /home/homeO5/user1/dbf4/control.v:7: Port aluc is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/control.v:8: Port pcsource is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/control.v:29: the undeclared symbol i_lw assum

11、ed to have the default net type, which is wire. (VER-936)Warning: /home/homeO5/user1/dbf4/control.v:30: the undeclared symbol i_sw assumed to have the default net type, which is wire. (VER-936)Compiling source file /home/homeO5/user1/dbf4/cpu_top.vWarning: /home/homeO5/user1/dbf4/cpu_top.v:16: the u

12、ndeclared symbol wmem assumed to have the default net type, which is wire. (VER-936)Warning: /home/homeO5/user1/dbf4/cpu_top.v:23: The statements in initial blocks are ignored. (VER-281)Compiling source file /home/homeO5/user1/dbf4/l_s.vWarning: /home/homeO5/user1/dbf4/cpu_top.v:61: The statements i

13、n initial blocks are ignored. (VER-281)Warning: /home/homeO5/user1/dbf4/l_s.v:11: The statements in initial blocks are ignored. (VER-281)Compiling source file /home/homeO5/user1/dbf4/pc.vWarning: /home/homeO5/user1/dbf4/pc.v:4: Port pcin is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/

14、pc.v:5: Port pc4 is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/pc.v:8: The statements in initial blocks are ignored. (VER-281)Warning: /home/homeO5/user1/dbf4/pc.v:17: Port pc_in is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/pc.v:17: Port qa is implicitly typed (VER-9

15、87)Warning: /home/homeO5/user1/dbf4/pc.v:18: Port imm1 is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/pc.v:19: Port imm2 is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/pc.v:21: Port pc_out is implicitly typed (VER-987)Warning: /home/homeO5/user1/dbf4/pc.v:22: Port selec

16、t is implicitly typed (VER-987)Compiling source file /home/homeO5/user1/dbf4/regfile.vWarning: /home/homeO5/user1/dbf4/regfile.v:13: The statements in initial blocks are ignored. (VER-281)Statistics for case statements in always block at line 13 in file /home/homeO5/user1/dbf4/alu.v=| Line | full/ p

17、arallel |=| 23 | auto/auto |=Warning: /home/homeO5/user1/dbf4/l_s.v:11: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Warning: /home/homeO5/user1/dbf4/l_s.v:14: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Inf

18、erred memory devices in process in routine DataMem line 12 in file /home/homeO5/user1/dbf4/l_s.v.=| Register Name | Type | Width | Bus | MB | AR | AS | SR | SS | ST |=| register_reg | Latch | 32 | Y | N | N | N | - | - | - | register_reg | Latch | 32 | Y | N | N | N | - | - | - |=Statistics for MUX_

19、OPs=| block name/line | Inputs | Outputs | # sel inputs | MB |=| DataMem/11 | 256 | 32 | 8 | N |=Warning: /home/homeO5/user1/dbf4/l_s.v:158: do20:16 is being read, but does not appear in the sensitivity list of the block. (ELAB-292)Warning: /home/homeO5/user1/dbf4/l_s.v:159: do15:11 is being read, b

20、ut does not appear in the sensitivity list of the block. (ELAB-292)Statistics for case statements in always block at line 154 in file /home/homeO5/user1/dbf4/l_s.v=| Line | full/ parallel |=| 157 | auto/auto |=Warning: /home/homeO5/user1/dbf4/l_s.v:144: Potential simulation-synthesis mismatch if ind

21、ex exceeds size of array register. (ELAB-349)Warning: /home/homeO5/user1/dbf4/l_s.v:145: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Warning: /home/homeO5/user1/dbf4/l_s.v:146: Potential simulation-synthesis mismatch if index exceeds size of array regis

22、ter. (ELAB-349)Warning: /home/homeO5/user1/dbf4/l_s.v:147: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Statistics for MUX_OPs=| block name/line | Inputs | Outputs | # sel inputs | MB |=| InstMem/144 | 128 | 1 | 7 | N |=Inferred memory devices in process

23、 in routine pc line 8 in file /home/homeO5/user1/dbf4/pc.v.=| Register Name | Type | Width | Bus | MB | AR | AS | SR | SS | ST |=| pc4_reg | Flip-flop | 32 | Y | N | N | N | N | N | N |=Warning: /home/homeO5/user1/dbf4/pc.v:34: qa is being read, but does not appear in the sensitivity list of the blo

24、ck. (ELAB-292)Statistics for case statements in always block at line 30 in file /home/homeO5/user1/dbf4/pc.v=| Line | full/ parallel |=| 31 | auto/auto |=Warning: /home/homeO5/user1/dbf4/regfile.v:13: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Warning:

25、 /home/homeO5/user1/dbf4/regfile.v:14: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Warning: /home/homeO5/user1/dbf4/regfile.v:19: Potential simulation-synthesis mismatch if index exceeds size of array register. (ELAB-349)Inferred memory devices in proce

26、ss in routine regfile line 16 in file /home/homeO5/user1/dbf4/regfile.v.=| Register Name | Type | Width | Bus | MB | AR | AS | SR | SS | ST |=| register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y |

27、N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y |

28、N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y |

29、N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y |

30、N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y |

31、N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y |

32、N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N | register_reg | Flip-flop | 32 | Y | N | N | N | N | N | N |=Statistics for MUX_OPs=| block name/line | Inputs | Outputs | # sel inputs | MB |=| regfile/13 |

33、 32 | 32 | 5 | N | regfile/14 | 32 | 32 | 5 | N |=Presto compilation completed successfully.Current design is now /home/homeO5/user1/dbf4/alu.db:aluWarning: Overwriting design file /home/homeO5/user1/dbf4/DataMem.db. (DDB-24)Warning: Overwriting design file /home/homeO5/user1/dbf4/InstMem.db. (DDB-2

34、4)Loaded 11 designs.Current design is alu.design_vision Current design is alu.10.功能综合:Report : areaDesign : cpu_topVersion: C-2009.06Date : Fri Aug 7 08:43:23 2015*Library(s) Used: typical (File: /export/homeO5/libs/smic18/std_cell/2005q4v1/aci/sc-x/synopsys/typical.db)Number of ports: 1Number of ne

35、ts: 368Number of cells: 10Number of references: 10Combinational area: 144196.113892Noncombinational area: 377346.823853Net Interconnect area: undefined (No wire load specified)Total cell area: 521542.937745Total area: undefinedReport : timing -path full -delay max -max_paths 1Design : cpu_topVersion:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论