-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmips.v
36 lines (31 loc) · 1.31 KB
/
mips.v
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
35
36
`timescale 1ps/1ps
module mips(input clk, rst,
input [31:0] instrF, readdataM,
output [31:0] pcF,
output memwriteM,
output [31:0] alumultoutM, writedataM);
wire [5:0] opD, fnD;
wire equalD, flushE, regwriteW, memtoregW, jalW,
regwriteM, memtoregM, jalM, lohiM,
regwriteE, memtoregE, jalE, multstartE, multsignE,
branchD, jumpD, pcsrcD;
wire [1:0] alusrcE, regdstE;
wire [3:0] alucontrolE;
controller c(clk, rst, opD, fnD, equalD, flushE,
regwriteW, memtoregW, jalW,
regwriteM, memtoregM, jalM, memwriteM, aluormultM, lohiM,
regwriteE, memtoregE, jalE,
aluormultE, jalD,
multstartE, multsignE,
alucontrolE, alusrcE, regdstE,
branchD, jumpD, pcsrcD);
datapath dp(clk, rst, instrF,
regwriteW, memtoregW, jalW,
regwriteM, memtoregM, jalM, memwriteM, aluormultM, lohiM,
regwriteE, memtoregE, jalE, multstartE, multsignE, aluormultE,
alucontrolE, alusrcE, regdstE,
branchD, jumpD, pcsrcD, jalD,
readdataM, alumultoutM, writedataM,
pcF, flushE, equalD,
opD, fnD);
endmodule