-
Notifications
You must be signed in to change notification settings - Fork 1
/
SimptelO9.v.bak
37 lines (29 loc) · 933 Bytes
/
SimptelO9.v.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module SimptelO9(CLOCK_50);
input CLOCK_50;
wire opCode, ALUOp, PCWriteCond, PCWrite, IorD, MemWrite, MemtoReg, IRWrite, ALUSrcA, RegWrite, RegDst;
wire [1:0] ALUSrcB, PCSource;
control_unit(.opCode(opCode),
.clk(CLOCK_50), .reset(0),
.ALUOp(ALUOp),
.PCWriteCond(PCWriteCond), .ALUSrcB(ALUSrcB[1:0]), .PCSource(PCSource),
.PCWrite(PCWrite), .IorD(IorD), .MemWrite(MemWrite), .MemtoReg(MemtoReg),
.IRWrite(IRWrite), .ALUSrcA(ALUSrcA), .RegWrite(RegWrite), .RegDst(RegDst));
datapath dpath(
.PCWriteCond(PCWriteCond),
.PCWrite(PCWrite),
.IorD(IorD),
.MemRead(0),
.MemWrite(MemWrite),
.MemtoReg,
IRWrite,
.PCSource(PCSource),
.ALUOp(ALUOp),
.ALUSrcB(ALUSrcB[1:0]),
.ALUSrcA(ALUSrcA),
.RegWrite(RegWrite),
.RegDst(RegDst),
.clk(CLOCK_50),
.reset(0),
.opcode(opCode)
);
endmodule