multicore fix
This commit is contained in:
82
hw/rtl/cache/VX_bank.v
vendored
82
hw/rtl/cache/VX_bank.v
vendored
@@ -2,54 +2,54 @@
|
||||
`include "VX_define.vh"
|
||||
module VX_bank #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
parameter CACHE_SIZE = 0,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
parameter WORD_SIZE = 0,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 0,
|
||||
// Number of cycles to complete i 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
parameter STAGE_1_CYCLES = 0,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
parameter REQQ_SIZE = 0,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
parameter MRVQ_SIZE = 0,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
parameter DFPQ_SIZE = 0,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
parameter SNRQ_SIZE = 0,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
parameter CWBQ_SIZE = 0,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
parameter DWBQ_SIZE = 0,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
parameter DFQQ_SIZE = 0,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
parameter LLVQ_SIZE = 0,
|
||||
// Fill Forward SNP Queue
|
||||
parameter FFSQ_SIZE = 8,
|
||||
parameter FFSQ_SIZE = 0,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16,
|
||||
parameter FILL_INVALIDAOR_SIZE = 0,
|
||||
|
||||
// Enable cache writeable
|
||||
parameter WRITE_ENABLE = 1,
|
||||
parameter WRITE_ENABLE = 0,
|
||||
|
||||
// Enable dram update
|
||||
parameter DRAM_ENABLE = 1,
|
||||
parameter DRAM_ENABLE = 0,
|
||||
|
||||
// Enable snoop forwarding
|
||||
parameter SNOOP_FORWARDING = 0,
|
||||
|
||||
// core request tag size
|
||||
parameter CORE_TAG_WIDTH = 1,
|
||||
parameter CORE_TAG_WIDTH = 0,
|
||||
|
||||
// size of tag id in core request tag
|
||||
parameter CORE_TAG_ID_BITS = 0
|
||||
@@ -172,21 +172,9 @@ module VX_bank #(
|
||||
assign reqq_push = core_req_ready && (| core_req_valids);
|
||||
|
||||
VX_cache_req_queue #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE),
|
||||
.CORE_TAG_WIDTH (CORE_TAG_WIDTH),
|
||||
.CORE_TAG_ID_BITS (CORE_TAG_ID_BITS)
|
||||
) req_queue (
|
||||
@@ -363,17 +351,7 @@ module VX_bank #(
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE),
|
||||
.DRAM_ENABLE (DRAM_ENABLE),
|
||||
.WRITE_ENABLE (WRITE_ENABLE)
|
||||
) tag_data_access (
|
||||
@@ -458,21 +436,11 @@ module VX_bank #(
|
||||
assign {miss_add_tag, miss_add_mem_read, miss_add_mem_write, miss_add_tid} = inst_meta_st2;
|
||||
|
||||
VX_cache_miss_resrv #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE),
|
||||
.CORE_TAG_WIDTH (CORE_TAG_WIDTH)
|
||||
) cache_miss_resrv (
|
||||
.clk (clk),
|
||||
@@ -568,20 +536,8 @@ module VX_bank #(
|
||||
wire [`LINE_ADDR_WIDTH-1:0] fill_invalidator_addr = addr_st2;
|
||||
|
||||
VX_fill_invalidator #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE)
|
||||
) fill_invalidator (
|
||||
.clk (clk),
|
||||
|
||||
36
hw/rtl/cache/VX_cache.v
vendored
36
hw/rtl/cache/VX_cache.v
vendored
@@ -140,21 +140,10 @@ module VX_cache #(
|
||||
assign dram_rsp_ready = (| per_bank_dram_fill_rsp_ready);
|
||||
|
||||
VX_cache_core_req_bank_sel #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE)
|
||||
.NUM_REQUESTS (NUM_REQUESTS)
|
||||
) cache_core_req_bank_sell (
|
||||
.core_req_valid (core_req_valid),
|
||||
.core_req_addr (core_req_addr),
|
||||
@@ -320,21 +309,9 @@ module VX_cache #(
|
||||
endgenerate
|
||||
|
||||
VX_cache_core_rsp_merge #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE),
|
||||
.CORE_TAG_WIDTH (CORE_TAG_WIDTH),
|
||||
.CORE_TAG_ID_BITS (CORE_TAG_ID_BITS)
|
||||
) cache_core_rsp_merge (
|
||||
@@ -351,21 +328,10 @@ module VX_cache #(
|
||||
);
|
||||
|
||||
VX_cache_dram_req_arb #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE),
|
||||
.PRFQ_SIZE (PRFQ_SIZE),
|
||||
.PRFQ_STRIDE (PRFQ_STRIDE)
|
||||
) cache_dram_req_arb (
|
||||
|
||||
39
hw/rtl/cache/VX_cache_core_req_bank_sel.v
vendored
39
hw/rtl/cache/VX_cache_core_req_bank_sel.v
vendored
@@ -2,43 +2,14 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_cache_core_req_bank_sel #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
parameter WORD_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 0,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
// Function ID, {Dcache=0, Icache=1, Sharedmemory=2}
|
||||
parameter FUNC_ID = 0,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16
|
||||
parameter NUM_REQUESTS = 0
|
||||
) (
|
||||
input wire [NUM_REQUESTS-1:0] core_req_valid,
|
||||
input wire [NUM_REQUESTS-1:0][31:0] core_req_addr,
|
||||
|
||||
43
hw/rtl/cache/VX_cache_core_rsp_merge.v
vendored
43
hw/rtl/cache/VX_cache_core_rsp_merge.v
vendored
@@ -1,49 +1,16 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_cache_core_rsp_merge #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
parameter WORD_SIZE = 0,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16,
|
||||
|
||||
parameter NUM_REQUESTS = 0,
|
||||
// core request tag size
|
||||
parameter CORE_TAG_WIDTH = 1,
|
||||
parameter CORE_TAG_WIDTH = 0,
|
||||
// size of tag id in core request tag
|
||||
parameter CORE_TAG_ID_BITS = 0,
|
||||
|
||||
// dram request tag size
|
||||
parameter DRAM_TAG_WIDTH = 1
|
||||
parameter CORE_TAG_ID_BITS = 0
|
||||
) (
|
||||
// Per Bank WB
|
||||
input wire [NUM_BANKS-1:0][`REQS_BITS-1:0] per_bank_core_rsp_tid,
|
||||
|
||||
35
hw/rtl/cache/VX_cache_dfq_queue.v
vendored
35
hw/rtl/cache/VX_cache_dfq_queue.v
vendored
@@ -1,41 +1,12 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_cache_dfq_queue #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16
|
||||
parameter DFQQ_SIZE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
|
||||
47
hw/rtl/cache/VX_cache_dram_req_arb.v
vendored
47
hw/rtl/cache/VX_cache_dram_req_arb.v
vendored
@@ -1,46 +1,17 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_cache_dram_req_arb #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
parameter WORD_SIZE = 0,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16,
|
||||
|
||||
// Prefetcher
|
||||
parameter PRFQ_SIZE = 64,
|
||||
parameter PRFQ_STRIDE = 2
|
||||
parameter DFQQ_SIZE = 0,
|
||||
// Prefetcher
|
||||
parameter PRFQ_SIZE = 0,
|
||||
parameter PRFQ_STRIDE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
@@ -101,7 +72,9 @@ module VX_cache_dram_req_arb #(
|
||||
wire dfqq_push = (| per_bank_dram_fill_req_valid);
|
||||
|
||||
VX_cache_dfq_queue #(
|
||||
|
||||
.BANK_LINE_SIZE(BANK_LINE_SIZE),
|
||||
.NUM_BANKS(NUM_BANKS),
|
||||
.DFQQ_SIZE(DFQQ_SIZE)
|
||||
) cache_dfq_queue (
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
|
||||
38
hw/rtl/cache/VX_cache_miss_resrv.v
vendored
38
hw/rtl/cache/VX_cache_miss_resrv.v
vendored
@@ -1,44 +1,18 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_cache_miss_resrv #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
parameter WORD_SIZE = 0,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
parameter NUM_REQUESTS = 0,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16,
|
||||
|
||||
parameter MRVQ_SIZE = 0,
|
||||
// caceh requests tag size
|
||||
parameter CORE_TAG_WIDTH = 1
|
||||
parameter CORE_TAG_WIDTH = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
|
||||
39
hw/rtl/cache/VX_cache_req_queue.v
vendored
39
hw/rtl/cache/VX_cache_req_queue.v
vendored
@@ -1,45 +1,14 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_cache_req_queue #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
parameter WORD_SIZE = 0,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 0,
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16,
|
||||
|
||||
parameter REQQ_SIZE = 0,
|
||||
// core request tag size
|
||||
parameter CORE_TAG_WIDTH = 1,
|
||||
|
||||
parameter CORE_TAG_WIDTH = 0,
|
||||
// size of tag id in core request tag
|
||||
parameter CORE_TAG_ID_BITS = 0
|
||||
) (
|
||||
|
||||
35
hw/rtl/cache/VX_fill_invalidator.v
vendored
35
hw/rtl/cache/VX_fill_invalidator.v
vendored
@@ -1,41 +1,12 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_fill_invalidator #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
parameter NUM_BANKS = 0,
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16
|
||||
parameter FILL_INVALIDAOR_SIZE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
|
||||
8
hw/rtl/cache/VX_prefetcher.v
vendored
8
hw/rtl/cache/VX_prefetcher.v
vendored
@@ -1,12 +1,12 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_prefetcher #(
|
||||
parameter PRFQ_SIZE = 64,
|
||||
parameter PRFQ_STRIDE = 2,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4
|
||||
parameter WORD_SIZE = 0,
|
||||
parameter PRFQ_SIZE = 0,
|
||||
parameter PRFQ_STRIDE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
|
||||
2
hw/rtl/cache/VX_snp_fwd_arb.v
vendored
2
hw/rtl/cache/VX_snp_fwd_arb.v
vendored
@@ -1,7 +1,7 @@
|
||||
`include "VX_cache_config.vh"
|
||||
|
||||
module VX_snp_fwd_arb #(
|
||||
parameter NUM_BANKS = 1,
|
||||
parameter NUM_BANKS = 1,
|
||||
parameter BANK_LINE_SIZE = 1
|
||||
) (
|
||||
input wire [NUM_BANKS-1:0] per_bank_snp_fwd_valid,
|
||||
|
||||
53
hw/rtl/cache/VX_tag_data_access.v
vendored
53
hw/rtl/cache/VX_tag_data_access.v
vendored
@@ -2,46 +2,22 @@
|
||||
|
||||
module VX_tag_data_access #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
parameter CACHE_SIZE = 0,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
parameter WORD_SIZE = 0,
|
||||
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16,
|
||||
parameter STAGE_1_CYCLES = 0,
|
||||
|
||||
// Enable cache writeable
|
||||
parameter WRITE_ENABLE = 1,
|
||||
parameter WRITE_ENABLE = 0,
|
||||
|
||||
// Enable dram update
|
||||
parameter DRAM_ENABLE = 1
|
||||
parameter DRAM_ENABLE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
@@ -100,18 +76,7 @@ module VX_tag_data_access #(
|
||||
.CACHE_SIZE (CACHE_SIZE),
|
||||
.BANK_LINE_SIZE (BANK_LINE_SIZE),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE (WORD_SIZE),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
.DFPQ_SIZE (DFPQ_SIZE),
|
||||
.SNRQ_SIZE (SNRQ_SIZE),
|
||||
.CWBQ_SIZE (CWBQ_SIZE),
|
||||
.DWBQ_SIZE (DWBQ_SIZE),
|
||||
.DFQQ_SIZE (DFQQ_SIZE),
|
||||
.LLVQ_SIZE (LLVQ_SIZE),
|
||||
.FILL_INVALIDAOR_SIZE (FILL_INVALIDAOR_SIZE)
|
||||
.WORD_SIZE (WORD_SIZE)
|
||||
) tag_data_structure (
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
|
||||
37
hw/rtl/cache/VX_tag_data_structure.v
vendored
37
hw/rtl/cache/VX_tag_data_structure.v
vendored
@@ -2,42 +2,13 @@
|
||||
|
||||
module VX_tag_data_structure #(
|
||||
// Size of cache in bytes
|
||||
parameter CACHE_SIZE = 1024,
|
||||
parameter CACHE_SIZE = 0,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE = 16,
|
||||
parameter BANK_LINE_SIZE = 0,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
parameter NUM_BANKS = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
// Function ID, {Dcache=0, Icache=1, Sharedmemory=2}
|
||||
parameter FUNC_ID = 0,
|
||||
|
||||
// Queues feeding into banks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Request Queue Size
|
||||
parameter REQQ_SIZE = 8,
|
||||
// Miss Reserv Queue Knob
|
||||
parameter MRVQ_SIZE = 8,
|
||||
// Dram Fill Rsp Queue Size
|
||||
parameter DFPQ_SIZE = 2,
|
||||
// Snoop Req Queue
|
||||
parameter SNRQ_SIZE = 8,
|
||||
|
||||
// Queues for writebacks Knobs {1, 2, 4, 8, ...}
|
||||
// Core Writeback Queue Size
|
||||
parameter CWBQ_SIZE = 8,
|
||||
// Dram Writeback Queue Size
|
||||
parameter DWBQ_SIZE = 4,
|
||||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 8,
|
||||
// Lower Level Cache Hit Queue Size
|
||||
parameter LLVQ_SIZE = 16,
|
||||
|
||||
// Fill Invalidator Size {Fill invalidator must be active}
|
||||
parameter FILL_INVALIDAOR_SIZE = 16
|
||||
parameter WORD_SIZE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
|
||||
Reference in New Issue
Block a user