![](https://www.jinchutou.com/images/s.gif)
实验7-取指令与指令译码实验
6页1、实验报告 2018 年 5 月 5 日 成绩: 姓名阳光男学号16041321班级16052317专业计算机科学与技术课程名称计算机组成原理与系统结构试验任课老师张翔老师指导老师张翔老师机位号默认实验序号7实验名称实验七 取指令与指令译码实验实验时间2018/5/30实验地点1教211实验设备号个人电脑+Nexy3开发板 一、实验程序源代码顶层电路:module top(input clk,input rst,input 1:0C,output reg7:0LED);wire 31:0Inst_code;pc pc_test(clk,rst,Inst_code);always(*)begin case(C) 2b00:LED=Inst_code7:0; 2b01:LED=Inst_code15:8; 2b10:LED=Inst_code23:16; 2b11:LED=Inst_code31:24;endcaseendendmodulePC取指令电路module pc(input clk,input rst,output wire31:0Inst_code);reg 31:0PC;wir
2、e31:0PC_new;initialPC=32h00000000;Inst_ROM Inst_ROM1 ( .clka(clk), .addra(PC7:2), .douta(Inst_code) );assign PC_new=PC+4;always(posedge rst or negedge clk)beginif(rst)PC=32h00000000;elsePC=24h000000,PC_new7:0;endendmodule测试代码:module test;/ Inputsreg clk;reg rst;/ Outputswire 31:0 Inst_code;/ Instantiate the Unit Under Test (UUT)pc uut (.clk(clk), .rst(rst), .Inst_code(Inst_code);initial begin/ Initialize Inputsclk = 0;rst = 0;/ Wait 100 ns for global reset to finish#100;clk = 1;rst = 0;#100;clk
《实验7-取指令与指令译码实验》由会员日度分享,可在线阅读,更多相关《实验7-取指令与指令译码实验》请在金锄头文库上搜索。
![沈孝生2018年下学期公开课.doc](/Images/s.gif)
2023-07-15 4页
![工程安全管理体系及措施.doc](/Images/s.gif)
2023-12-01 44页
![八年级下期地理期末试卷.docx](/Images/s.gif)
2023-02-17 3页
![中班健康活动:营救小动物.doc](/Images/s.gif)
2022-12-03 3页
![安全生产“打非治违”工作总结.docx](/Images/s.gif)
2024-02-22 3页
![中考最全复习资料数学题卷.docx](/Images/s.gif)
2022-10-20 6页
![大班语言游戏教案《咪咪和汪汪的信》.doc](/Images/s.gif)
2024-01-06 3页
![小学数学教案(集合15篇)_1.doc](/Images/s.gif)
2023-06-08 62页
![物流总监岗位职责.docx](/Images/s.gif)
2023-11-09 3页
![小学教学教育教案教育教案小故事.docx](/Images/s.gif)
2024-03-29 4页