-
Notifications
You must be signed in to change notification settings - Fork 0
/
Arm.sv
24 lines (22 loc) · 842 Bytes
/
Arm.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
module arm(input logic clk, reset,
output logic [31:0] PC,
input logic [31:0] Instr,
output logic MemWrite, MemByte,
output logic [31:0] ALUResult, WriteData,
input logic [31:0] ReadData);
logic [3:0] ALUFlags;
logic RegWrite,
ALUSrcA, ALUSrcB ,MemtoReg, PCSrc;
logic [1:0] RegSrc, ImmSrc;
logic [2:0] ALUControl;
controller c(clk, reset, Instr[31:12], ALUFlags,
RegSrc, RegWrite, ImmSrc,
ALUSrcA, ALUSrcB, ALUControl,
MemWrite, MemByte, MemtoReg, PCSrc);
datapath dp(clk, reset,
RegSrc, RegWrite, ImmSrc,
ALUSrcA, ALUSrcB, ALUControl,
MemtoReg, PCSrc,
ALUFlags, PC, Instr,
ALUResult, WriteData, ReadData);
endmodule