fetch buffer enabled based on num entries

This commit is contained in:
Jordan Carlin 2024-11-10 16:11:17 -08:00
parent 35636723fb
commit 75bbc435e6
No known key found for this signature in database
10 changed files with 10 additions and 9 deletions

View File

@ -117,7 +117,7 @@ localparam logic VECTORED_INTERRUPTS_SUPPORTED = 0;
localparam logic BIGENDIAN_SUPPORTED = 0;
// Fetch buffer configuration
localparam logic FETCHBUFFER_SUPPORTED = 0;
localparam FETCHBUFFER_ENTRIES =32'd0;
// TLB configuration. Entries should be a power of 2
localparam ITLB_ENTRIES = 32'd0;

View File

@ -117,7 +117,7 @@ localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
localparam logic BIGENDIAN_SUPPORTED = 1;
// Fetch buffer configuration
localparam logic FETCHBUFFER_SUPPORTED = 1;
localparam FETCHBUFFER_ENTRIES = 32'd3;
// TLB configuration. Entries should be a power of 2
localparam ITLB_ENTRIES = 32'd32;

View File

@ -117,7 +117,7 @@ localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
localparam logic BIGENDIAN_SUPPORTED = 0;
// Fetch buffer configuration
localparam logic FETCHBUFFER_SUPPORTED = 1;
localparam FETCHBUFFER_ENTRIES = 32'd3;
// TLB configuration. Entries should be a power of 2
localparam ITLB_ENTRIES = 32'd32;

View File

@ -117,7 +117,7 @@ localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
localparam logic BIGENDIAN_SUPPORTED = 0;
// Fetch buffer configuration
localparam logic FETCHBUFFER_SUPPORTED = 1;
localparam FETCHBUFFER_ENTRIES = 32'd3;
// TLB configuration. Entries should be a power of 2
localparam ITLB_ENTRIES = 32'd0;

View File

@ -117,7 +117,7 @@ localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
localparam logic BIGENDIAN_SUPPORTED = 1;
// Fetch buffer configuration
localparam logic FETCHBUFFER_SUPPORTED = 1;
localparam FETCHBUFFER_ENTRIES = 32'd3;
// TLB configuration. Entries should be a power of 2
localparam ITLB_ENTRIES = 32'd32;

View File

@ -117,7 +117,7 @@ localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
localparam logic BIGENDIAN_SUPPORTED = 0;
// Fetch buffer configuration
localparam logic FETCHBUFFER_SUPPORTED = 1;
localparam FETCHBUFFER_ENTRIES = 32'd3;
// TLB configuration. Entries should be a power of 2
localparam ITLB_ENTRIES = 32'd0;

View File

@ -45,7 +45,7 @@ localparam cvw_t P = '{
ICACHE_WAYSIZEINBYTES : ICACHE_WAYSIZEINBYTES,
ICACHE_LINELENINBITS : ICACHE_LINELENINBITS,
CACHE_SRAMLEN : CACHE_SRAMLEN,
FETCHBUFFER_SUPPORTED : FETCHBUFFER_SUPPORTED,
FETCHBUFFER_ENTRIES : FETCHBUFFER_ENTRIES,
IDIV_BITSPERCYCLE : IDIV_BITSPERCYCLE,
IDIV_ON_FPU : IDIV_ON_FPU,
PMP_ENTRIES : PMP_ENTRIES,

View File

@ -75,7 +75,7 @@ typedef struct packed {
logic ICACHE_SUPPORTED;
// Fetch Buffer Configuration
logic FETCHBUFFER_SUPPORTED;
int FETCHBUFFER_ENTRIES;
// TLB configuration. Entries should be a power of 2
int ITLB_ENTRIES;

View File

@ -303,7 +303,7 @@ module ifu import cvw::*; #(parameter cvw_t P) (
assign IFUStallF = IFUCacheBusStallF | SelSpillNextF;
assign GatedStallD = StallD & ~SelSpillNextF;
if (P.FETCHBUFFER_SUPPORTED) begin : fetchbuffer
if (P.FETCHBUFFER_ENTRIES != 0) begin : fetchbuffer
fetchbuffer #(P) fetchbuff(.clk, .reset, .StallF, .StallD, .FlushD, .WriteData(PostSpillInstrRawF), .ReadData(InstrRawD), .FetchBufferStallF);
end else begin
flopenl #(32) AlignedInstrRawDFlop(clk, reset | FlushD, ~StallD, PostSpillInstrRawF, nop, InstrRawD);

View File

@ -67,6 +67,7 @@ module riscvassertions import cvw::*; #(parameter cvw_t P);
assert ((P.ZCD_SUPPORTED == 0) | (P.D_SUPPORTED == 1)) else $fatal(1, "ZCD requires D");
assert ((P.LLEN == P.XLEN) | (P.DCACHE_SUPPORTED & P.DTIM_SUPPORTED == 0)) else $fatal(1, "LLEN > XLEN (D on RV32 or Q on RV64) requires data cache");
assert ((P.ZICCLSM_SUPPORTED == 0) | (P.DCACHE_SUPPORTED == 1)) else $fatal(1, "ZICCLSM requires DCACHE_SUPPORTED");
assert ((P.FETCHBUFFER_ENTRIES == 0) | (P.FETCHBUFFER_ENTRIES >= 3)) else $fatal(1, "FETCHBUFFER_ENTRIES must be 0 (disabled) or at least 3");
end
endmodule