-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipe_WB.v
39 lines (36 loc) · 1.08 KB
/
pipe_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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 18:08:31 04/18/2016
// Design Name:
// Module Name: pipe_WB
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module pipe_WB(MEMwreg,MEMm2reg,MEMwn,MEMaluResult,MEMmemOut,clrn,clk,
WBwreg,WBdata,WBwn
);
input MEMwreg,MEMm2reg;
input [4:0] MEMwn;
input [31:0] MEMaluResult,MEMmemOut;
input clrn,clk;
output [31:0] WBdata;
output WBwreg;
output [4:0] WBwn;
wire m2reg;
wire [31:0] aluResult,memOut;
MEM_WB_reg mem_to_wb_reg(.MEMwreg(MEMwreg),.MEMm2reg(MEMm2reg),.MEMwn(MEMwn),.MEMaluResult(MEMaluResult),.MEMmemOut(MEMmemOut),.clrn(clrn),.clk(clk),
.WBwreg(WBwreg),.WBm2reg(m2reg),.WBwn(WBwn),.WBaluResult(aluResult),.WBmemOut(memOut));
mux2x32 wb_data_select(aluResult,memOut,m2reg,WBdata);
endmodule