版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 计算机组成原理实验报告评语:课中检查完成的题号及题数: 课后完成的题号与题数:成绩:指导教师:实验报告实验名称:基于硬布线控制器设计并实现带中断功能的复杂模型机日期:2011-1-12班级:学号:姓名:一、实验目的:1.掌握硬布线控制器的组成原理、设计方法;2.了解硬布线控制器和微程序控制器的各自优缺点;3.掌握并会设计带中断功能的复杂模型机的硬布线控制器。二、实验内容:1.根据带中断功能的复杂模型机的微程序流图,画出状态机描述图;2.分析每个状态所需的控制信号,产生控制信号表,并用VHDL语言来设计程序,实现状态机描述的功能;3.用Quartus软件进行编译链接,选择器件,定义管脚,编程下
2、载,然后用CM3P联机测试每一条机器指令的功能。 三、项目要求及分析: 实验要求设计带中断功能的复杂模型机的硬布线控制器,可先参照前面带中断处理能力的模型机设计实验画出微程序流程图,参照二进制微代码表设控制信号表。然后用VHDL语言编程实现,主要注意原P<1>P<4>的修改,采用分支语句实现。然后就是连线装载带中断处理能力的模型机微程序检验。 四、具体实现: 应包括:状态图、控制信号表、控制引脚图、VHDL程序、机器码验证程序等。1、状态图: 2、控制状态表:INTA/WR/RD/IOM/S3/S2/S1/S0/LDA/LDB/LDR0/LDSP/L0AD/LDAR/L
3、DIR/ALUB/RSB/RDB/RIB/SPB/PCB/LDPC/STI/CLIS0 100000000000100111111010S1 100000000000100111111011S2 100000000000110111110111S3 101000000000101111111011S4 100000000100100101111011S5100010010010100011111011S6100000000100100101111011S7 100000100010100011111011S8101000000000110111111011S910110000001010011
4、1111011S10101000000000110111111011S11100000000000100111111011S12101000000010100111111011S13110000000000100110111011S14100000000000000011111111S15100000000000100111111011S16110100000000100101111011S17101000000010100111111011S18110000000000100101111011S19100000001000100111101011S2010001101000110001111
5、1011S21100011000001100011111011S22100000000000110111101011S23101000000010100111111011S24100011000001100011111011S25100000000000110111101011S26101000000000000111111111S27100000000000000011111111S28101000001000100111111011S29101000000000110111111011S30101000000000110111111011S3110100000100010011111101
6、1S32101000000000110111111011S33000000000000110111101011S34110000000000100111110011S35100000001000100111101011S36100011010001100011111011S37000000000000110111111011S38101000000000000111111111S39101000001000100111111011S40100000000100100111011011S41100010010000110011111011S42100010011000100011111011S4
7、3101000001000100111111011S44100000000100100111110011S45100010010000110011111011S46100010011000100011111011S47100000001000100110111011S48100000001000100110111011S49100000000000110111110111S50100000000000110111110111S51100000000010100101111011S52100000000000100111111011S53100000000000110111110111S5410
8、0000000000100111111001S55100000000000100111111010S56100000000000110111101011S57100000001000100111101011S58100000001000100111101011S59100000000000110111110111S60100000000000110111110111S61100000000000110111110111S621000000000001101111101113、控制引脚图:五、调试运行结果: 4、VHDL程序:LIBRARY IEEE;USE IEEE.std_logic_116
9、4.ALL;ENTITY CONTROLLER ISPORT(RESET: INSTD_LOGIC;T1: INSTD_LOGIC;INTR : IN STD_LOGIC;INS : INSTD_LOGIC_VECTOR(7 DOWNTO 0);CTRL : OUTSTD_LOGIC_VECTOR(23 DOWNTO 0);END CONTROLLER;ARCHITECTURE CONTROLLER_ARCH OF CONTROLLER ISTYPE STATE IS (S0,S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16,S17,
10、S18,S19,S20,S21,S22,S23,S24,S25,S26,S27,S28,S29,S30,S31,S32,S33,S34,S35,S36,S37,S38,S39,S40,S41,S42,S43,S44,S45,S46,S47,S48,S49,S50,S51,S52,S53,S54,S55,S56,S57,S58,S59,S60,S61,S62);SIGNAL CUFSM: STATE;-CTRL:INTA,WR,RD,IOM,S3,S2,S1,S0,LDA,LDB,LDRI,LDSP,LOAD,LDAR,LDIR,ALU_B,RS_B,RD_B,RI_B,SP_B,PC_B,LD
11、PC,STI,CLIBEGINPROCESS (T1,RESET,INTR,INS)BEGINIF RESET = '0' THEN CTRL <= "100000000000100111111010" -CLICUFSM <= S0;ELSIF T1'EVENT AND T1 = '1' THENCASE CUFSM ISWHEN S0 =>CTRL <= "100000000000100111111011" -中断判断CUFSM <= S1;WHEN S1 =>IF INTR
12、='1' THEN CTRL <= "000000000000110111101011" -R0->BUS,BUS->ACUFSM <= S33;ELSE CTRL <= "100000000000110111110111" CUFSM <= S2;END IF;WHEN S33=>CTRL <= "110000000000100111110011" CUFSM <= S34;WHEN S34=>CTRL <= "100000001000100
13、111101011" CUFSM <= S35;WHEN S35=>CTRL <= "100011010001100011111011" CUFSM <= S36;WHEN S36=>CTRL <= "000000000000110111111011" CUFSM <= S37;WHEN S37=>CTRL <= "101000000000000111111111" CUFSM <= S38;WHEN S38=>CTRL <= "1000000
14、00000110111110111" CUFSM <= S2;WHEN S2=>CTRL <= "101000000000101111111011" CUFSM <= S3;WHEN S3 =>IF INS(7 downto 4) = "0000" THEN -ADD INSCTRL <= "100000001000100110111011" CUFSM <= S47;ELSIF INS(7 downto 4) = "0001" THEN -AND INSCTRL
15、 <= "100000001000100110111011" CUFSM <= S48;ELSIF INS(7 downto 4) = "0010" THEN - IN INSCTRL <= "100000000000110111110111" CUFSM <= S49;ELSIF INS(7 downto 4) = "0011" THEN -OUT INSCTRL <= "100000000000110111110111" CUFSM <= S50;ELSI
16、F INS(7 downto 4) = "0100" THEN - MOV INSCTRL <= "100000000010100101111011" CUFSM <= S51;ELSIF INS(7 downto 4) = "0101" THEN - HLT INSCTRL <= "100000000000100111111011" CUFSM <= S52;ELSIF INS(7 downto 4) = "0110" THEN - LDI INSCTRL <=
17、"100000000000110111110111" CUFSM <= S53;ELSIF INS(7 downto 4)= "0111" THEN - STI INSCTRL <= "100000000000100111111001" CUFSM <= S54;ELSIF INS(7 downto 4) = "1000" THEN - CLI INSCTRL <= "100000000000100111111010" CUFSM <= S55;ELSIF INS(
18、7 downto 4) = "1001" THEN - PUSH INSCTRL <= "100000000000110111101011" CUFSM <= S56;ELSIF INS(7 downto 4) = "1010" THEN - POP INSCTRL <= "100000001000100111101011" CUFSM <= S57;ELSIF INS(7 downto 4) = "1011" THEN - INET INSCTRL <= &quo
19、t;100000001000100111101011" CUFSM <= S58;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "00" THEN - 直接 INSCTRL <= "100000000000110111110111" CUFSM <= S59;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "01" THEN - 间接 INSCTRL <
20、= "100000000000110111110111" CUFSM <= S60;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "10" THEN - 变址 INSCTRL <= "100000000000110111110111" CUFSM <= S61;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "11" THEN - 相对 INSCTR
21、L <= "100000000000110111110111" CUFSM <= S62;END IF;WHEN S47=>CTRL <= "100000000100100101111011" CUFSM <= S4;WHEN S4=>CTRL <= "100010010010100011111011" CUFSM <= S5;WHEN S5=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S
22、48=>CTRL <= "100000000100100101111011" CUFSM <= S6;WHEN S6 =>CTRL <= "100000100010100011111011" CUFSM <= S7;WHEN S7=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S49=>CTRL <= "101000000000110111111011" CUFSM <= S8;WHE
23、N S8=>CTRL <= "101100000010100111111011" CUFSM <= S9;WHEN S9=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S50=>CTRL <= "101000000000110111111011" CUFSM <= S10;WHEN S10=>CTRL <= "110100000000100101111011" CUFSM <= S16
24、;WHEN S16=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S51=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S52=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S53=>CTRL <= "101000000010100111111011" CUFSM <
25、= S17;WHEN S17=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S54=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S55=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S56=>CTRL <= "110000000000100101111011" CUFSM
26、 <= S18;WHEN S18=>CTRL <= "100000001000100111101011" CUFSM <= S19;WHEN S19=>CTRL <= "100011010001100011111011" CUFSM <= S20;WHEN S20=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S57=>CTRL <= "100011000001100011111011"
27、; CUFSM <= S21;WHEN S21=>CTRL <= "100000000000110111101011" CUFSM <= S22;WHEN S22=>CTRL <= "101000000010100111111011" CUFSM <= S23;WHEN S23=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S58=>CTRL <= "1000110000011000111110
28、11" CUFSM <= S24;WHEN S24=>CTRL <= "100000000000110111101011" CUFSM <= S25;WHEN S25=>CTRL <= "101000000000000111111111" CUFSM <= S26;WHEN S26=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S59=>CTRL <= "101000001000100
29、111111011" CUFSM <= S28;WHEN S28=>CTRL <= "101000000000110111111011" CUFSM <= S29;WHEN S60=>CTRL <= "101000000000110111111011" CUFSM <= S30;WHEN S30=>CTRL <= "101000001000100111111011" CUFSM <= S31;WHEN S31=>CTRL <= "1010000
30、00000110111111011" CUFSM <= S32;WHEN S61 =>CTRL <= "101000001000100111111011" CUFSM <= S39;WHEN S39 =>CTRL <= "100000000100100111011011" CUFSM <= S40;WHEN S40 =>CTRL <= "100010010000110011111011" CUFSM <= S41;WHEN S41 =>CTRL <= &
31、quot;100010011000100011111011" CUFSM <= S42;WHEN S62 =>CTRL <= "101000001000100111111011" CUFSM <= S43;WHEN S43 =>CTRL <= "100000000100100111110011" CUFSM <= S44;WHEN S44 =>CTRL <= "100010010000110011111011" CUFSM <= S45;WHEN S45 =>
32、CTRL <= "100010011000100011111011" CUFSM <= S46;WHEN S29=> IF INS(7 downto 4) = "1100" THEN CTRL <= "101000000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUFSM <= S13;ELSIF
33、 INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto 4) = "1111" THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF;WHEN S32=> IF INS(7 downto 4) = "1100" THEN CTRL <= "1010
34、00000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUFSM <= S13;ELSIF INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto 4) = "1111&qu
35、ot; THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF; WHEN S42 => IF INS(7 downto 4) = "1100" THEN CTRL <= "101000000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUF
36、SM <= S13;ELSIF INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto 4) = "1111" THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF;WHEN S46 => IF INS(7 downto 4) = "1100" THEN CT
37、RL <= "101000000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUFSM <= S13;ELSIF INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto
38、 4) = "1111" THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF; WHEN S12=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S13=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S
39、14=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S15=> IF INS = "00000000" THEN CTRL <= "100000000000100111111011" CUFSM <= S11;ELSIF INS = "10000000" THEN CTRL <= "100000000000000011111111" CUFSM <= S27;END IF;WHEN S11=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S27=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;END CASE;END IF;END PROCESS;END CONTROLLER_ARCH ;5、
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024苗木种植与水资源利用合作合同规范3篇
- 2024版计算机软件许可与实施协议版B版
- 2024年路演活动专用展示厅房屋租赁转租合同3篇
- 2024年项目合作合同:文化旅游景区开发与合作
- 2024年食品冷链物流与配送服务合同
- 2024年鲜活水产品运输合同3篇
- 2024年高效委托薪资发放合作合同版B版
- 2024年采购合同范本:供应商与采购方的货物质量、交付时间等关键条款
- 2022年抚顺职业技术学院公共课《马克思主义基本原理概论》期末试卷A(有答案)
- Unit+5+I+think+that+mooncakes+are+delicious同步练-+2024-2025学年鲁教版(五四学制)八年级英语下册+
- 学校2025年寒假综合实践暨跨学科作业设计活动方案
- 10以内加减法(直接打印,20篇)
- 矿卡司机安全教育考试卷(带答案)
- 五年级上册数学脱式计算300题及答案
- 院内按病种分值付费(DIP)专题培训
- 安全保护区巡查管理规定
- 药物性肝损伤药物治疗
- 2021年12月医院临床药师培训理论考核试题(心血管专业)
- 科目一考试成绩表
- 喷塑特殊过程能力确认记录1
- 内蒙古自治区建设工程费用定额2009年版
评论
0/150
提交评论