icache readonly optimization
This commit is contained in:
2
hw/rtl/cache/VX_bank.v
vendored
2
hw/rtl/cache/VX_bank.v
vendored
@@ -247,7 +247,7 @@ module VX_bank #(
|
|||||||
mrsq_enable || flush_enable,
|
mrsq_enable || flush_enable,
|
||||||
mshr_enable ? 1'b0 : creq_rw,
|
mshr_enable ? 1'b0 : creq_rw,
|
||||||
mshr_enable ? mshr_addr : (mem_rsp_valid ? mem_rsp_addr : (flush_enable ? `LINE_ADDR_WIDTH'(flush_addr) : creq_addr)),
|
mshr_enable ? mshr_addr : (mem_rsp_valid ? mem_rsp_addr : (flush_enable ? `LINE_ADDR_WIDTH'(flush_addr) : creq_addr)),
|
||||||
mem_rsp_valid ? mem_rsp_data : creq_line_data,
|
(mem_rsp_valid || !WRITE_ENABLE) ? mem_rsp_data : creq_line_data,
|
||||||
mshr_enable ? mshr_wsel : creq_wsel,
|
mshr_enable ? mshr_wsel : creq_wsel,
|
||||||
mshr_enable ? mshr_byteen : creq_byteen,
|
mshr_enable ? mshr_byteen : creq_byteen,
|
||||||
mshr_enable ? mshr_tid : creq_tid,
|
mshr_enable ? mshr_tid : creq_tid,
|
||||||
|
|||||||
6
hw/rtl/cache/VX_data_access.v
vendored
6
hw/rtl/cache/VX_data_access.v
vendored
@@ -45,16 +45,18 @@ module VX_data_access #(
|
|||||||
`UNUSED_VAR (reset)
|
`UNUSED_VAR (reset)
|
||||||
`UNUSED_VAR (readen)
|
`UNUSED_VAR (readen)
|
||||||
|
|
||||||
|
localparam BYTEENW = WRITE_ENABLE ? CACHE_LINE_SIZE : 1;
|
||||||
|
|
||||||
wire [`LINE_SELECT_BITS-1:0] line_addr;
|
wire [`LINE_SELECT_BITS-1:0] line_addr;
|
||||||
wire [CACHE_LINE_SIZE-1:0] byte_enable;
|
wire [CACHE_LINE_SIZE-1:0] byte_enable;
|
||||||
|
|
||||||
assign line_addr = addr[`LINE_SELECT_BITS-1:0];
|
assign line_addr = addr[`LINE_SELECT_BITS-1:0];
|
||||||
assign byte_enable = (WRITE_ENABLE && !is_fill) ? byteen : {CACHE_LINE_SIZE{1'b1}};
|
assign byte_enable = is_fill ? {CACHE_LINE_SIZE{1'b1}} : byteen;
|
||||||
|
|
||||||
VX_sp_ram #(
|
VX_sp_ram #(
|
||||||
.DATAW (CACHE_LINE_SIZE * 8),
|
.DATAW (CACHE_LINE_SIZE * 8),
|
||||||
.SIZE (`LINES_PER_BANK),
|
.SIZE (`LINES_PER_BANK),
|
||||||
.BYTEENW (CACHE_LINE_SIZE),
|
.BYTEENW (BYTEENW),
|
||||||
.RWCHECK (1)
|
.RWCHECK (1)
|
||||||
) data_store (
|
) data_store (
|
||||||
.clk(clk),
|
.clk(clk),
|
||||||
|
|||||||
Reference in New Issue
Block a user