- 11
- 0
- 约1.32万字
- 约 19页
- 2018-11-15 发布于江苏
- 举报
实验研究报告模板
同济大学
计算机科学与技术系
计算机组成原理课程实验报告
学 号 1452312
姓 名 冯凯
专 业 计算机科学与技术
授课老师 王力生
日 期 2016.06.18
实验目标
1、熟悉Verilog语言的编写。
2、掌握计算机的每个部件的构成逻辑及工作原理,计算机各部件之间的连接逻辑,计算机整机的工作原理。
3、掌握CPU功能。
4、设计55条单周期指令CPU下板成功
2、.在自己的CPU上跑一个汇编程序
总体设计
作品功能设计及原理说明
module comp(
input clock,
input resetn,
output [2:0] r,
output [2:0] g,
output [1:0] b,
output hs,
output vs,
);
硬件逻辑图
主要模块设计
1.ALU
module alu(
input [31:0] a,
input [31:0] b,
input [3:0] aluc,
output [31:0] r,
output zero,//零标志
output carry, // 进位标志位
output negative, // 负数标志位
output overflow // 溢出标志位
);
wire [31:0] d_and = ab;//0100
wire [31:0] d_or = a|b;//0101
wire [31:0] d_xor = a^b;//0110
wire [31:0] d_nor = ~(a|b);//0111
wire [31:0] d_lui = {b[15:0],16h0};//100x
wire [31:0] d_slt = ab?1:0;
wire [31:0] d_sltu = (a[31]~b[31])||(a[31]b[31]ab)||(~a[31]~b[31]ab);
wire [31:0] d_and_or = aluc[0]?d_or:d_and;
wire [31:0] d_xor_nor = aluc[0]?d_nor:d_xor;
wire [31:0] d_and_or_xor_nor = aluc[1]?d_xor_nor:d_and_or;
wire [31:0] d_slt_sltu = aluc[0]?d_slt:d_sltu;
wire [31:0] d_lui_slt_sltu = aluc[1]?d_slt_sltu:d_lui;
wire [31:0] d_as;
wire [31:0] d_sh;
wire carry_as;
wire negative_as;
wire overflow_as;
wire carry_sh;
addsub32 as32(a,b,aluc[0],aluc[1],d_as,carry_as,overflow_as);
shift shifter(b,a[4:0],~aluc[1],~aluc[0],d_sh,carry_sh);
mux4x32 select_d(d_as,d_and_or_xor_nor,d_lui_slt_sltu,d_sh,aluc[3:2],r);
mux4x1 select_carry(carry_as,1b0,1b0,carry_sh,aluc[3:2],carry);
mux4x1 select_overflow(overflow_as,1b0,1b0,overflow_sh,aluc[3:2],overflow);
assign zero = ~|r;
assign negative = r[31];
endmodule
2.regfile
module regfile(
input [4:0] raddr1,
input [4:0] raddr2,
input [31:0] wdata,
input [4:0] waddr,
input we,
input clk,
input rst,
output [31:0] radata1,
output [31:0] radata2
);
reg [31:0]
您可能关注的文档
- 定制金产品咨询研究报告(英文).PPT
- 定量问卷分析研究.ppt
- 宜宾市中考历史试题及标准答案.DOC
- 宜宾市高中教学质量检测题数学有标准答案.DOC
- 宜昌市“三校联合体”高二期末联考文科数学试题及标准答案.DOC
- 宜昌市中考化学试题及标准答案.DOC
- 宜昌市中考物理试题及标准答案.DOC
- 宜昌市中考语文试题标准答案.doc
- 宜昌市石油公司竞争策略分析研究.DOC
- 宝钢整体及业绩路演研究报告.PPT
- (正式版)DB51∕T 1867-2014 《袋栽黑木耳生产技术规程》.docx
- (正式版)DB51∕T 2413-2023 《油橄榄密植丰产栽培技术规程》.docx
- (正式版)DB51∕T 2436-2017 《川菜东坡一品肉烹饪工艺技术规范》.docx
- (正式版)DB51∕T 2396-2017 《农村电子商务服务站(点)服务与管理规范》.docx
- (正式版)DB51∕T 2419-2017 《桢楠扦插育苗技术规程》.docx
- CN105145773B 一种无花果曲奇饼干及其制作方法 (江苏农林职业技术学院).docx
- CN105203825A 微测量电极的制作方法和热电势的测量方法及相关装置 (国家纳米科学中心).docx
- CN105137533B 一种啁啾光纤光栅及其制作方法 (南京航空航天大学).docx
- (正式版)DB51∕T 2453-2018 《巴山新居公共管理指南》.docx
- (正式版)DB51∕T 1892-2014 《川西北地区沙化土地治理技术规程》.docx
原创力文档

文档评论(0)