-
Notifications
You must be signed in to change notification settings - Fork 0
/
DM_WB.v
43 lines (41 loc) · 1.01 KB
/
DM_WB.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
37
38
39
40
41
42
43
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 01/11/2022 04:42:15 PM
// Design Name:
// Module Name: DM_WB
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module DM_WB(input [31:0]ALU_ResultM,ReadData,PCPlus4M,input [4:0]rdM,input clk,input rst,input [1:0]ResultSrcM,input RegWriteM, output reg [31:0] ALU_ResultW,ReadDataW,PCPlus4W,output reg [4:0]rdW,output reg[1:0]ResultSrcW,output reg RegWriteW);
always @(posedge clk)
if (rst)
begin
ALU_ResultW<=32'b00;
ReadDataW<=32'b00;
PCPlus4W<=32'b00;
rdW<=0;
RegWriteW<=0;
ResultSrcW<=0;
end
else
begin
ALU_ResultW<=ALU_ResultM;
ReadDataW<=ReadData;
PCPlus4W<=PCPlus4M;
rdW<=rdM;
ResultSrcW<=ResultSrcM;
RegWriteW<=RegWriteM;
end
endmodule