Add write enable output to the memory bus

This will be used by the bus arbiter and the hazard unit. We could use
the write_mask output, but this would introduce a longer delay.
This commit is contained in:
Graham Edgecombe 2017-12-17 20:47:17 +00:00
parent 7ef3e831ce
commit 7f81e495b3
2 changed files with 4 additions and 0 deletions

View file

@ -13,6 +13,7 @@ module rv32 (
/* data memory bus */
output logic [31:0] data_address_out,
output logic data_read_out,
output logic data_write_out,
input [31:0] data_read_value_in,
output logic [3:0] data_write_mask_out,
output logic [31:0] data_write_value_out
@ -260,6 +261,7 @@ module rv32 (
/* control out (to memory bus) */
.data_read_out(data_read_out),
.data_write_out(data_write_out),
.data_write_mask_out(data_write_mask_out),
/* data out */

View file

@ -38,6 +38,7 @@ module rv32_mem (
/* control out (to data memory bus) */
output logic data_read_out,
output logic data_write_out,
output logic [3:0] data_write_mask_out,
/* data out */
@ -62,6 +63,7 @@ module rv32_mem (
assign branch_pc_out = branch_pc_in;
assign data_read_out = read_in;
assign data_write_out = write_in;
assign data_address_out = result_in;
always_comb begin