-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMA.v
More file actions
40 lines (33 loc) · 826 Bytes
/
Copy pathMA.v
File metadata and controls
40 lines (33 loc) · 826 Bytes
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
/*
MA:
Author: 2016eeb1087(sanket Nyayadhish)
Date: 23/12/2017
*/
module MA(
input [31:0] Op2,
input [31:0] AluResult,
input IsLd,
input IsSt,
output [31:0] LdResult
);
wire [31:0] Op2,AluResult;
wire IsLd,IsSt;
reg [31:0] LdResult;
//---------------------------------------
always @(*)
begin
#2 // waiting for aluresult to come.
if (IsLd == 1)
begin
P.Am1 = AluResult ;
LdResult = P.Dm1;
P.RW = 0;
end
else if ( IsSt == 1)
begin
P.RW = 1;
P.Am2 = AluResult ;
P.Dm3 = Op2 ;
end
end
endmodule