摘 要 本文论述的主要是用现代电子设计技术的核心——EDA来设计一个四位微处理器,并对其进行编译、仿真、调试和优化,实现四位微处理器的全部功能。 用EDA工具设计硬件电路的方法有很多,本文所述采用了当前流行的自顶向下设计方法。它的设计思想是整个系统的设计过程是分层次的:先作顶层设计即总体框图的设计,再作底层设计即子系统子电路的设计。在每一个层次上,大体都有描述、划分、综合和验证等四种类型的工作。 本文所述的设计是用硬件描述语言VHDL实现的。VHDL是一种全方位的硬件描述语言,能够使设计者在系统级的抽象层次上对系统的结构、功能、行为进行方便规范的描述,而不用考虑系统的具体实现细节,编程风格类似于高级语言,而且有丰富的库文件可以调用。 本次设计的编译、仿真是用EDA软件MAX+PLUSII完成的,具体实现过程采用和设计方法相反的顺序即自底向上的流程:从具体的部件开始,逐步由下而上集成为完成某局部功能的模块,最后由这些模块构成一个完整的数字系统。 经过大量的调试工作后,程序的编译通过,仿真得到了正确的输出结果,从而实现了四位微处理器的加法、减法、与、或、异或等算术和逻辑运算及对存储器的读写和数据移位等的全部功能。 关键词:四位微处理器;EDA;自顶向下;VHDL;层次化 ABSTRACT
What this text mainly discusses is to design a four bit microprocessor with the core of the modern electronics design technique -- EDA , meanwhile compiling,simulating,debugging and excellenting, finally carry out all functions of four bit microprocessor. There are many ways to design hardware circuits using EDA tools. What this text tells is a Top-Down design approach in popular. Its main idea is the design process of the whole system is layering: Make the top design first namely the design of the framework, then the bottom design namely the design of the sub- system and sub-circuits. On each layer, four kinds of work are needed: description,dividing,comprehension and verification. The design is realized by VHDL.VHDL is a kind of all-directions hardware description language, which is convinent to designer to describe the structure, function and behavior of the system on the abstract layer,and need not consider the details of the system. Its programming style is similar with high level language, and there are abundant library documents that can be used. Its compiling and simulating is completed by MAX+PLUSII--EDA software. The realization is contrary with its design namely Bottom-Up:Begin with the concrete parts ,then gather to modules that complete some partial function from bottom to top, finally constitute an integrity of numerical system. After lots of debugging,its compiling passes and gets the right results in simulating.Thus all functions of the four bit microprocessor are successfully realized.for example, addition,subtraction,and,or,difference and the read and write of memory and so on. Key words:four bit microprocessor;EDA;Bottom-Up;VHDL;layering 目 录 第1章 绪论……………………………………………………………………1 1.1 引言 ……………………………………………………………………1 1.2 选题背景及要求 ………………………………………………………2 1.2.1 选题的背景………………………………………………………2 1.2.2 选题的目的及意义………………………………………………3 1.2.3 课题内容及要求…………………………………………………3 1.3 论文结构 ………………………………………………………………4 第2章 设计前的准备 ………………………………………………………5 2.1 数字系统的设计 ………………………………………………………5 2.1.1 数字系统概述……………………………………………………5 2.1.2 数字系统的设计方法……………………………………………5 2.1.3数字系统的设计原则……………………………………………6 2.1.4数字系统的设计步骤……………………………………………7 2.2 VHDL语言基础 ………………………………………………………8 2.2.1 VHDL程序结构…………………………………………………9 2.2.2 VHDL基本知识 ………………………………………………11 2.2.3 VHDL主要描述语句 …………………………………………13 2.3 MAX+PLUSII软件介绍………………………………………………14 2.3.1 MAX+PLUSII简介 ……………………………………………14 2.3.2 MAX+PLUSII的输入方式 ……………………………………15 2.3.3 MAX+PLUSII开发数字系统的过程 …………………………15 2.4 本章小结………………………………………………………………16 第3章 系统分析与总体设计 ……………………………………………17 3.1 微处理器概述…………………………………………………………17 3.1.1 微处理器发展史 ………………………………………………17 3.1.2 微处理器的内部结构 …………………………………………18 3.2 课题的设计方法和流程………………………………………………19 3.3 微处理器的总体分析与设计…………………………………………19 3.3.1 总体结构分析及框图设计 ……………………………………19 3.3.2 各模块划分与端口定义 ………………………………………21 3.4 各个模块的分析设计…………………………………………………22 3.4.1 随机存储器组的分析 …………………………………………22 3.4.2 通用寄存器的分析 ……………………………………………22 3.4.3 操作数多路选择器的分析 ……………………………………24 3.4.4 算术逻辑运算单元的分析 ……………………………………25 3.4.5 输出多路选择器的分析 ………………………………………27 3.5 本章小结………………………………………………………………27 第4章 各模块的具体设计和实现………………………………………28 4.1 指令分析及程序包设计………………………………………………28 4.1.1 指令级分析及设计……………………………………………28 4.1.2 指令代码程序包的设计 ………………………………………29 4.2 各模块的框图设计与VHDL实现 …………………………………30 4.2.1 RAM_REGS模块的设计实现…………………………………32 4.2.2 Q_REG模块的设计实现………………………………………34 4.2.3 SRC_OP模块的设计实现………………………………………36 4.2.4 ALU模块的设计实现 …………………………………………37 4.2.5 OUT_MUX模块的设计实现 …………………………………38 4.3 各模块的编译和仿真…………………………………………………39 4.3.1 各模块的编译情况 ……………………………………………39 4.3.2 各模块的仿真情况 ……………………………………………43 4.4 本章小结………………………………………………………………46 第5章 整体形成及功能测试 ……………………………………………47 5.1 系统形成与功能测试…………………………………………………47 5.1.1 微处理器的整体框图形成 ……………………………………47 5.1.2 整体功能测试与分析 …………………………………………47 5.2 设计工作得失总结……………………………………………………49 5.3 微处理器设计领域的新技术…………………………………………50 5.4 本章小结………………………………………………………………51 结论 ……………………………………………………………………………52 参考文献………………………………………………………………………53 致谢 ……………………………………………………………………………54 附录I 各模块详细代码……………………………………………………55 附录II 指令功能……………………………………………………………64 附录III 系统整体框图 ……………………………………………………66 |
EDA设计四位微处理器及仿真
查看评论
已有0位网友发表了看法