-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingle_Cycle.sv
64 lines (57 loc) · 1.01 KB
/
Single_Cycle.sv
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module Single_Cycle (
output logic [31:0] y,
input logic clk,
rst
);
logic [31:0] Instruction, ALU_result, readData, rdata2;
logic [3:0] ALU_control, mask;
logic [2:0] br_type, load;
logic [1:0] wb_sel, store;
logic RegWrite, wr_en, rd_en, sel_A, sel_B, cs;
// Data_Path
DataPath DP (
ALU_result,
Instruction,
rdata2,
mask,
cs,
readData,
ALU_control,
br_type,
load,
wb_sel,
store,
RegWrite,
sel_A,
sel_B,
clk,
rst
);
// Controller
Controller CU (
Instruction[6:0],
Instruction[31:25],
Instruction[14:12],
ALU_control,
br_type,
load,
wb_sel,
store,
RegWrite,
wr_en,
rd_en,
sel_A,
sel_B
);
DataMemory DM (
readData,
ALU_result,
rdata2,
mask,
wr_en,
rd_en,
cs,
clk
);
// assign y = wdata;
endmodule