aboutsummaryrefslogtreecommitdiff
path: root/hdl/wb_stage.v
diff options
context:
space:
mode:
Diffstat (limited to 'hdl/wb_stage.v')
-rw-r--r--hdl/wb_stage.v11
1 files changed, 11 insertions, 0 deletions
diff --git a/hdl/wb_stage.v b/hdl/wb_stage.v
new file mode 100644
index 0000000..37cfc38
--- /dev/null
+++ b/hdl/wb_stage.v
@@ -0,0 +1,11 @@
+`timescale 1ns / 1ps
+
+module wb_stage(
+ input mem_to_reg,
+ input [31:0] mem_out, alu_out,
+ output [31:0] write_data
+ );
+
+ assign write_data = mem_to_reg ? mem_out : alu_out;
+
+endmodule