fixed all build warnings
This commit is contained in:
@@ -7,11 +7,11 @@ module VX_bank
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
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}
|
||||
@@ -54,24 +54,24 @@ module VX_bank
|
||||
|
||||
// Input Core Request
|
||||
input wire delay_req,
|
||||
input wire [NUMBER_REQUESTS-1:0] bank_valids,
|
||||
input wire [NUMBER_REQUESTS-1:0][31:0] bank_addr,
|
||||
input wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] bank_writedata,
|
||||
input wire [NUM_REQUESTS-1:0] bank_valids,
|
||||
input wire [NUM_REQUESTS-1:0][31:0] bank_addr,
|
||||
input wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] bank_writedata,
|
||||
input wire [4:0] bank_rd,
|
||||
input wire [NUMBER_REQUESTS-1:0][1:0] bank_wb,
|
||||
input wire [NUM_REQUESTS-1:0][1:0] bank_wb,
|
||||
input wire [31:0] bank_pc,
|
||||
input wire [`NW_BITS-1:0] bank_warp_num,
|
||||
input wire [NUMBER_REQUESTS-1:0][2:0] bank_mem_read,
|
||||
input wire [NUMBER_REQUESTS-1:0][2:0] bank_mem_write,
|
||||
input wire [`NW_BITS-1:0] bank_warp_num,
|
||||
input wire [NUM_REQUESTS-1:0][2:0] bank_mem_read,
|
||||
input wire [NUM_REQUESTS-1:0][2:0] bank_mem_write,
|
||||
output wire reqq_full,
|
||||
|
||||
// Output Core WB
|
||||
input wire bank_wb_pop,
|
||||
output wire bank_wb_valid,
|
||||
output wire [`vx_clog2(NUMBER_REQUESTS)-1:0] bank_wb_tid,
|
||||
output wire [`LOG2UP(NUM_REQUESTS)-1:0] bank_wb_tid,
|
||||
output wire [4:0] bank_wb_rd,
|
||||
output wire [1:0] bank_wb_wb,
|
||||
output wire [`NW_BITS-1:0] bank_wb_warp_num,
|
||||
output wire [`NW_BITS-1:0] bank_wb_warp_num,
|
||||
output wire [`WORD_SIZE_RNG] bank_wb_data,
|
||||
output wire [31:0] bank_wb_pc,
|
||||
output wire [31:0] bank_wb_address,
|
||||
@@ -105,7 +105,6 @@ module VX_bank
|
||||
input wire snp_fwd_pop
|
||||
);
|
||||
|
||||
|
||||
reg snoop_state = 0;
|
||||
|
||||
always @(posedge clk) begin
|
||||
@@ -152,19 +151,18 @@ module VX_bank
|
||||
.out_data({dfpq_addr_st0, dfpq_filldata_st0}),
|
||||
.empty (dfpq_empty),
|
||||
.full (dfpq_full)
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
wire reqq_pop;
|
||||
wire reqq_push;
|
||||
wire reqq_empty;
|
||||
wire reqq_req_st0;
|
||||
wire[`vx_clog2(NUMBER_REQUESTS)-1:0] reqq_req_tid_st0;
|
||||
wire[`LOG2UP(NUM_REQUESTS)-1:0] reqq_req_tid_st0;
|
||||
wire [31:0] reqq_req_addr_st0;
|
||||
wire [`WORD_SIZE_RNG] reqq_req_writeword_st0;
|
||||
wire [4:0] reqq_req_rd_st0;
|
||||
wire [1:0] reqq_req_wb_st0;
|
||||
wire [`NW_BITS-1:0] reqq_req_warp_num_st0;
|
||||
wire [`NW_BITS-1:0] reqq_req_warp_num_st0;
|
||||
wire [2:0] reqq_req_mem_read_st0;
|
||||
wire [2:0] reqq_req_mem_write_st0;
|
||||
wire [31:0] reqq_req_pc_st0;
|
||||
@@ -174,9 +172,9 @@ module VX_bank
|
||||
VX_cache_req_queue #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
@@ -225,37 +223,37 @@ module VX_bank
|
||||
wire mrvq_full;
|
||||
wire mrvq_stop;
|
||||
wire mrvq_valid_st0;
|
||||
wire[`vx_clog2(NUMBER_REQUESTS)-1:0] mrvq_tid_st0;
|
||||
wire[`LOG2UP(NUM_REQUESTS)-1:0] mrvq_tid_st0;
|
||||
wire [31:0] mrvq_addr_st0;
|
||||
wire [`WORD_SIZE_RNG] mrvq_writeword_st0;
|
||||
wire [4:0] mrvq_rd_st0;
|
||||
wire [1:0] mrvq_wb_st0;
|
||||
wire [31:0] miss_resrv_pc_st0;
|
||||
wire [`NW_BITS-1:0] mrvq_warp_num_st0;
|
||||
wire [`NW_BITS-1:0] mrvq_warp_num_st0;
|
||||
wire [2:0] mrvq_mem_read_st0;
|
||||
wire [2:0] mrvq_mem_write_st0;
|
||||
|
||||
wire miss_add;
|
||||
wire[31:0] miss_add_addr;
|
||||
wire[`WORD_SIZE_RNG] miss_add_data;
|
||||
wire[`vx_clog2(NUMBER_REQUESTS)-1:0] miss_add_tid;
|
||||
wire[`LOG2UP(NUM_REQUESTS)-1:0] miss_add_tid;
|
||||
wire[4:0] miss_add_rd;
|
||||
wire[1:0] miss_add_wb;
|
||||
wire[`NW_BITS-1:0] miss_add_warp_num;
|
||||
wire[`NW_BITS-1:0] miss_add_warp_num;
|
||||
wire[2:0] miss_add_mem_read;
|
||||
wire[2:0] miss_add_mem_write;
|
||||
|
||||
wire[31:0] miss_add_pc;
|
||||
|
||||
wire[31:0] addr_st2;
|
||||
wire is_fill_st2;
|
||||
wire[31:0] addr_st2;
|
||||
wire is_fill_st2;
|
||||
|
||||
VX_cache_miss_resrv #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
@@ -312,7 +310,7 @@ module VX_bank
|
||||
wire going_to_write_st1[STAGE_1_CYCLES-1:0];
|
||||
wire [31:0] addr_st1 [STAGE_1_CYCLES-1:0];
|
||||
|
||||
reg[16:0] p_stage;
|
||||
integer p_stage;
|
||||
always @(*) begin
|
||||
is_fill_in_pipe = 0;
|
||||
for (p_stage = 0; p_stage < STAGE_1_CYCLES; p_stage=p_stage+1) begin
|
||||
@@ -322,8 +320,7 @@ module VX_bank
|
||||
if (is_fill_st2) is_fill_in_pipe = 1;
|
||||
end
|
||||
|
||||
// assign is_fill_in_pipe = (|is_fill_st1) || is_fill_st2;
|
||||
|
||||
// assign is_fill_in_pipe = (|is_fill_st1) || is_fill_st2;
|
||||
|
||||
assign mrvq_pop = mrvq_valid_st0 && !stall_bank_pipe;
|
||||
assign dfpq_pop = !mrvq_pop && !dfpq_empty && !stall_bank_pipe;
|
||||
@@ -421,10 +418,10 @@ module VX_bank
|
||||
|
||||
wire [4:0] rd_st1e;
|
||||
wire [1:0] wb_st1e;
|
||||
wire [`NW_BITS-1:0] warp_num_st1e;
|
||||
wire [`NW_BITS-1:0] warp_num_st1e;
|
||||
wire [2:0] mem_read_st1e;
|
||||
wire [2:0] mem_write_st1e;
|
||||
wire [`vx_clog2(NUMBER_REQUESTS)-1:0] tid_st1e;
|
||||
wire [`LOG2UP(NUM_REQUESTS)-1:0] tid_st1e;
|
||||
wire fill_saw_dirty_st1e;
|
||||
wire is_snp_st1e;
|
||||
|
||||
@@ -436,9 +433,9 @@ module VX_bank
|
||||
VX_tag_data_access #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.FUNC_ID (FUNC_ID),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
@@ -527,15 +524,15 @@ module VX_bank
|
||||
// Enqueue to CWB Queue
|
||||
wire cwbq_push = (valid_st2 && !miss_st2) && !cwbq_full && !((FUNC_ID == `L2FUNC_ID) && (miss_add_wb == 0)) && !((is_snp_st2 && valid_st2 && ffsq_full) || (((valid_st2 && miss_st2 && dirty_st2) || fill_saw_dirty_st2) && dwbq_full) || (valid_st2 && miss_st2 && mrvq_full) || (valid_st2 && miss_st2 && !invalidate_fill && dram_fill_req_queue_full));
|
||||
wire [`WORD_SIZE_RNG] cwbq_data = readword_st2;
|
||||
wire [`vx_clog2(NUMBER_REQUESTS)-1:0] cwbq_tid = miss_add_tid;
|
||||
wire [`LOG2UP(NUM_REQUESTS)-1:0] cwbq_tid = miss_add_tid;
|
||||
wire [4:0] cwbq_rd = miss_add_rd;
|
||||
wire [1:0] cwbq_wb = miss_add_wb;
|
||||
wire [`NW_BITS-1:0] cwbq_warp_num = miss_add_warp_num;
|
||||
wire [`NW_BITS-1:0] cwbq_warp_num = miss_add_warp_num;
|
||||
wire [31:0] cwbq_pc = pc_st2;
|
||||
|
||||
wire cwbq_empty;
|
||||
assign bank_wb_valid = !cwbq_empty;
|
||||
VX_generic_queue_ll #(.DATAW( `vx_clog2(NUMBER_REQUESTS) + 5 + 2 + (`NW_BITS-1+1) + `WORD_SIZE + 32 + 32), .SIZE(CWBQ_SIZE)) cwb_queue(
|
||||
VX_generic_queue_ll #(.DATAW( `LOG2UP(NUM_REQUESTS) + 5 + 2 + (`NW_BITS-1+1) + `WORD_SIZE + 32 + 32), .SIZE(CWBQ_SIZE)) cwb_queue(
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
|
||||
@@ -570,9 +567,9 @@ module VX_bank
|
||||
VX_fill_invalidator #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_cache
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 16,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
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}
|
||||
@@ -57,28 +57,28 @@ module VX_cache
|
||||
input wire reset,
|
||||
|
||||
// Req Info
|
||||
input wire [NUMBER_REQUESTS-1:0] core_req_valid,
|
||||
input wire [NUMBER_REQUESTS-1:0][31:0] core_req_addr,
|
||||
input wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] core_req_writedata,
|
||||
input wire[NUMBER_REQUESTS-1:0][2:0] core_req_mem_read,
|
||||
input wire[NUMBER_REQUESTS-1:0][2:0] core_req_mem_write,
|
||||
input wire [NUM_REQUESTS-1:0] core_req_valid,
|
||||
input wire [NUM_REQUESTS-1:0][31:0] core_req_addr,
|
||||
input wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] core_req_writedata,
|
||||
input wire[NUM_REQUESTS-1:0][2:0] core_req_mem_read,
|
||||
input wire[NUM_REQUESTS-1:0][2:0] core_req_mem_write,
|
||||
|
||||
// Req meta
|
||||
input wire [4:0] core_req_rd,
|
||||
input wire [NUMBER_REQUESTS-1:0][1:0] core_req_wb,
|
||||
input wire [`NW_BITS-1:0] core_req_warp_num,
|
||||
input wire [NUM_REQUESTS-1:0][1:0] core_req_wb,
|
||||
input wire [`NW_BITS-1:0] core_req_warp_num,
|
||||
input wire [31:0] core_req_pc,
|
||||
output wire delay_req,
|
||||
|
||||
// Core Writeback
|
||||
input wire core_no_wb_slot,
|
||||
output wire [NUMBER_REQUESTS-1:0] core_wb_valid,
|
||||
output wire [NUM_REQUESTS-1:0] core_wb_valid,
|
||||
output wire [4:0] core_wb_req_rd,
|
||||
output wire [1:0] core_wb_req_wb,
|
||||
output wire [`NW_BITS-1:0] core_wb_warp_num,
|
||||
output wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] core_wb_readdata,
|
||||
output wire [NUMBER_REQUESTS-1:0][31:0] core_wb_pc,
|
||||
output wire [NUMBER_REQUESTS-1:0][31:0] core_wb_address,
|
||||
output wire [`NW_BITS-1:0] core_wb_warp_num,
|
||||
output wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] core_wb_readdata,
|
||||
output wire [NUM_REQUESTS-1:0][31:0] core_wb_pc,
|
||||
output wire [NUM_REQUESTS-1:0][31:0] core_wb_address,
|
||||
|
||||
|
||||
// Dram Fill Response
|
||||
@@ -113,36 +113,36 @@ module VX_cache
|
||||
);
|
||||
|
||||
|
||||
wire [NUMBER_BANKS-1:0][NUMBER_REQUESTS-1:0] per_bank_valids;
|
||||
wire [NUMBER_BANKS-1:0] per_bank_wb_pop;
|
||||
wire [NUMBER_BANKS-1:0] per_bank_wb_valid;
|
||||
wire [NUMBER_BANKS-1:0][`vx_clog2(NUMBER_REQUESTS)-1:0] per_bank_wb_tid;
|
||||
wire [NUMBER_BANKS-1:0][4:0] per_bank_wb_rd;
|
||||
wire [NUMBER_BANKS-1:0][1:0] per_bank_wb_wb;
|
||||
wire [NUMBER_BANKS-1:0][`NW_BITS-1:0] per_bank_wb_warp_num;
|
||||
wire [NUMBER_BANKS-1:0][`WORD_SIZE_RNG] per_bank_wb_data;
|
||||
wire [NUMBER_BANKS-1:0][31:0] per_bank_wb_pc;
|
||||
wire [NUMBER_BANKS-1:0][31:0] per_bank_wb_address;
|
||||
wire [NUM_BANKS-1:0][NUM_REQUESTS-1:0] per_bank_valids;
|
||||
wire [NUM_BANKS-1:0] per_bank_wb_pop;
|
||||
wire [NUM_BANKS-1:0] per_bank_wb_valid;
|
||||
wire [NUM_BANKS-1:0][`LOG2UP(NUM_REQUESTS)-1:0] per_bank_wb_tid;
|
||||
wire [NUM_BANKS-1:0][4:0] per_bank_wb_rd;
|
||||
wire [NUM_BANKS-1:0][1:0] per_bank_wb_wb;
|
||||
wire [NUM_BANKS-1:0][`NW_BITS-1:0] per_bank_wb_warp_num;
|
||||
wire [NUM_BANKS-1:0][`WORD_SIZE_RNG] per_bank_wb_data;
|
||||
wire [NUM_BANKS-1:0][31:0] per_bank_wb_pc;
|
||||
wire [NUM_BANKS-1:0][31:0] per_bank_wb_address;
|
||||
|
||||
|
||||
wire dfqq_full;
|
||||
wire[NUMBER_BANKS-1:0] per_bank_dram_fill_req;
|
||||
wire[NUMBER_BANKS-1:0][31:0] per_bank_dram_fill_req_addr;
|
||||
wire[NUMBER_BANKS-1:0] per_bank_dram_fill_accept;
|
||||
wire dfqq_full;
|
||||
wire[NUM_BANKS-1:0] per_bank_dram_fill_req;
|
||||
wire[NUM_BANKS-1:0][31:0] per_bank_dram_fill_req_addr;
|
||||
wire[NUM_BANKS-1:0] per_bank_dram_fill_accept;
|
||||
|
||||
wire[NUMBER_BANKS-1:0] per_bank_dram_wb_queue_pop;
|
||||
wire[NUMBER_BANKS-1:0] per_bank_dram_wb_req;
|
||||
wire[NUMBER_BANKS-1:0] per_bank_dram_because_of_snp;
|
||||
wire[NUMBER_BANKS-1:0][31:0] per_bank_dram_wb_req_addr;
|
||||
wire[NUMBER_BANKS-1:0][`BANK_LINE_WORDS-1:0][`WORD_SIZE-1:0] per_bank_dram_wb_req_data;
|
||||
wire[NUM_BANKS-1:0] per_bank_dram_wb_queue_pop;
|
||||
wire[NUM_BANKS-1:0] per_bank_dram_wb_req;
|
||||
wire[NUM_BANKS-1:0] per_bank_dram_because_of_snp;
|
||||
wire[NUM_BANKS-1:0][31:0] per_bank_dram_wb_req_addr;
|
||||
wire[NUM_BANKS-1:0][`BANK_LINE_WORDS-1:0][`WORD_SIZE-1:0] per_bank_dram_wb_req_data;
|
||||
|
||||
wire[NUMBER_BANKS-1:0] per_bank_reqq_full;
|
||||
wire[NUM_BANKS-1:0] per_bank_reqq_full;
|
||||
|
||||
wire[NUMBER_BANKS-1:0] per_bank_snrq_full;
|
||||
wire[NUM_BANKS-1:0] per_bank_snrq_full;
|
||||
|
||||
wire[NUMBER_BANKS-1:0] per_bank_snp_fwd;
|
||||
wire[NUMBER_BANKS-1:0][31:0] per_bank_snp_fwd_addr;
|
||||
wire[NUMBER_BANKS-1:0] per_bank_snp_fwd_pop;
|
||||
wire[NUM_BANKS-1:0] per_bank_snp_fwd;
|
||||
wire[NUM_BANKS-1:0][31:0] per_bank_snp_fwd_addr;
|
||||
wire[NUM_BANKS-1:0] per_bank_snp_fwd_pop;
|
||||
|
||||
|
||||
assign delay_req = (|per_bank_reqq_full);
|
||||
@@ -151,15 +151,15 @@ module VX_cache
|
||||
assign snp_req_delay = (|per_bank_snrq_full);
|
||||
|
||||
|
||||
// assign dram_fill_accept = (NUMBER_BANKS == 1) ? per_bank_dram_fill_accept[0] : per_bank_dram_fill_accept[dram_fill_rsp_addr[`BANK_SELECT_ADDR_RNG]];
|
||||
// assign dram_fill_accept = (NUM_BANKS == 1) ? per_bank_dram_fill_accept[0] : per_bank_dram_fill_accept[dram_fill_rsp_addr[`BANK_SELECT_ADDR_RNG]];
|
||||
assign dram_fill_accept = (|per_bank_dram_fill_accept);
|
||||
|
||||
VX_cache_dram_req_arb #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
@@ -200,9 +200,9 @@ module VX_cache
|
||||
VX_cache_core_req_bank_sel #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
.MRVQ_SIZE (MRVQ_SIZE),
|
||||
@@ -226,9 +226,9 @@ module VX_cache
|
||||
VX_cache_wb_sel_merge #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.FUNC_ID (FUNC_ID),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
@@ -268,7 +268,7 @@ module VX_cache
|
||||
|
||||
|
||||
// Snoop Forward Logic
|
||||
VX_snp_fwd_arb #(.NUMBER_BANKS(NUMBER_BANKS)) VX_snp_fwd_arb(
|
||||
VX_snp_fwd_arb #(.NUM_BANKS(NUM_BANKS)) VX_snp_fwd_arb(
|
||||
.per_bank_snp_fwd (per_bank_snp_fwd),
|
||||
.per_bank_snp_fwd_addr(per_bank_snp_fwd_addr),
|
||||
.per_bank_snp_fwd_pop (per_bank_snp_fwd_pop),
|
||||
@@ -281,30 +281,30 @@ module VX_cache
|
||||
|
||||
genvar curr_bank;
|
||||
generate
|
||||
for (curr_bank = 0; curr_bank < NUMBER_BANKS; curr_bank=curr_bank+1) begin
|
||||
wire [NUMBER_REQUESTS-1:0] curr_bank_valids;
|
||||
wire [NUMBER_REQUESTS-1:0][31:0] curr_bank_addr;
|
||||
wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] curr_bank_writedata;
|
||||
for (curr_bank = 0; curr_bank < NUM_BANKS; curr_bank=curr_bank+1) begin
|
||||
wire [NUM_REQUESTS-1:0] curr_bank_valids;
|
||||
wire [NUM_REQUESTS-1:0][31:0] curr_bank_addr;
|
||||
wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] curr_bank_writedata;
|
||||
wire [4:0] curr_bank_rd;
|
||||
wire [NUMBER_REQUESTS-1:0][1:0] curr_bank_wb;
|
||||
wire [`NW_BITS-1:0] curr_bank_warp_num;
|
||||
wire [NUMBER_REQUESTS-1:0][2:0] curr_bank_mem_read;
|
||||
wire [NUMBER_REQUESTS-1:0][2:0] curr_bank_mem_write;
|
||||
wire [NUM_REQUESTS-1:0][1:0] curr_bank_wb;
|
||||
wire [`NW_BITS-1:0] curr_bank_warp_num;
|
||||
wire [NUM_REQUESTS-1:0][2:0] curr_bank_mem_read;
|
||||
wire [NUM_REQUESTS-1:0][2:0] curr_bank_mem_write;
|
||||
wire [31:0] curr_bank_pc;
|
||||
|
||||
wire curr_bank_wb_pop;
|
||||
wire curr_bank_wb_valid;
|
||||
wire [`vx_clog2(NUMBER_REQUESTS)-1:0] curr_bank_wb_tid;
|
||||
wire [`LOG2UP(NUM_REQUESTS)-1:0] curr_bank_wb_tid;
|
||||
wire [31:0] curr_bank_wb_pc;
|
||||
wire [4:0] curr_bank_wb_rd;
|
||||
wire [1:0] curr_bank_wb_wb;
|
||||
wire [`NW_BITS-1:0] curr_bank_wb_warp_num;
|
||||
wire [`NW_BITS-1:0] curr_bank_wb_warp_num;
|
||||
wire [`WORD_SIZE_RNG] curr_bank_wb_data;
|
||||
wire [31:0] curr_bank_wb_address;
|
||||
|
||||
wire curr_bank_dram_fill_rsp;
|
||||
wire [31:0] curr_bank_dram_fill_rsp_addr;
|
||||
wire [`BANK_LINE_WORDS-1:0][`WORD_SIZE-1:0] curr_bank_dram_fill_rsp_data;
|
||||
wire [`BANK_LINE_WORDS-1:0][`WORD_SIZE-1:0] curr_bank_dram_fill_rsp_data;
|
||||
wire curr_bank_dram_fill_accept;
|
||||
|
||||
wire curr_bank_dfqq_full;
|
||||
@@ -326,7 +326,7 @@ module VX_cache
|
||||
wire curr_bank_snp_fwd;
|
||||
wire[31:0] curr_bank_snp_fwd_addr;
|
||||
wire curr_bank_snp_fwd_pop;
|
||||
wire curr_bank_snrq_full;
|
||||
wire curr_bank_snrq_full;
|
||||
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ module VX_cache
|
||||
assign per_bank_dram_fill_req_addr[curr_bank] = curr_bank_dram_fill_req_addr;
|
||||
|
||||
// Dram fill response
|
||||
assign curr_bank_dram_fill_rsp = (NUMBER_BANKS == 1) || (dram_fill_rsp && (curr_bank_dram_fill_rsp_addr[`BANK_SELECT_ADDR_RNG] == curr_bank));
|
||||
assign curr_bank_dram_fill_rsp = (NUM_BANKS == 1) || (dram_fill_rsp && (curr_bank_dram_fill_rsp_addr[`BANK_SELECT_ADDR_RNG] == curr_bank));
|
||||
assign curr_bank_dram_fill_rsp_addr = dram_fill_rsp_addr;
|
||||
assign curr_bank_dram_fill_rsp_data = dram_fill_rsp_data;
|
||||
assign per_bank_dram_fill_accept[curr_bank] = curr_bank_dram_fill_accept;
|
||||
@@ -385,9 +385,9 @@ module VX_cache
|
||||
VX_bank #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.FUNC_ID (FUNC_ID),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
|
||||
@@ -3,59 +3,17 @@
|
||||
|
||||
`include "../VX_define.vh"
|
||||
|
||||
|
||||
// data tid rd wb warp_num read write
|
||||
|
||||
|
||||
`define vx_clog2(value) ((value == 1) ? 1 : $clog2(value))
|
||||
|
||||
|
||||
`define MRVQ_METADATA_SIZE (`WORD_SIZE + `vx_clog2(NUMBER_REQUESTS) + 5 + 2 + (`NW_BITS-1 + 1) + 3 + 3)
|
||||
`define MRVQ_METADATA_SIZE (`WORD_SIZE + `LOG2UP(NUM_REQUESTS) + 5 + 2 + (`NW_BITS-1 + 1) + 3 + 3)
|
||||
|
||||
// 5 + 2 + 4 + 3 + 3 + 1
|
||||
`define REQ_INST_META_SIZE (5 + 2 + (`NW_BITS-1+1) + 3 + 3 + `vx_clog2(NUMBER_REQUESTS))
|
||||
|
||||
// `define vx_clog2_h(value, x) (value == (1 << x)) ? (x)
|
||||
|
||||
// `define vx_clog2(value) (value == 0 ) ? 0 : \
|
||||
// (value == 1 ) ? 1 : \
|
||||
// `vx_clog2_h(value, 2 ) : \
|
||||
// `vx_clog2_h(value, 3 ) : \
|
||||
// `vx_clog2_h(value, 4 ) : \
|
||||
// `vx_clog2_h(value, 5 ) : \
|
||||
// `vx_clog2_h(value, 6 ) : \
|
||||
// `vx_clog2_h(value, 7 ) : \
|
||||
// `vx_clog2_h(value, 8 ) : \
|
||||
// `vx_clog2_h(value, 9 ) : \
|
||||
// `vx_clog2_h(value, 10) : \
|
||||
// `vx_clog2_h(value, 11) : \
|
||||
// `vx_clog2_h(value, 12) : \
|
||||
// `vx_clog2_h(value, 13) : \
|
||||
// `vx_clog2_h(value, 14) : \
|
||||
// `vx_clog2_h(value, 15) : \
|
||||
// `vx_clog2_h(value, 16) : \
|
||||
// `vx_clog2_h(value, 17) : \
|
||||
// `vx_clog2_h(value, 18) : \
|
||||
// `vx_clog2_h(value, 19) : \
|
||||
// `vx_clog2_h(value, 20) : \
|
||||
// `vx_clog2_h(value, 21) : \
|
||||
// `vx_clog2_h(value, 22) : \
|
||||
// `vx_clog2_h(value, 23) : \
|
||||
// `vx_clog2_h(value, 24) : \
|
||||
// `vx_clog2_h(value, 25) : \
|
||||
// `vx_clog2_h(value, 26) : \
|
||||
// `vx_clog2_h(value, 27) : \
|
||||
// `vx_clog2_h(value, 28) : \
|
||||
// `vx_clog2_h(value, 29) : \
|
||||
// `vx_clog2_h(value, 30) : \
|
||||
// `vx_clog2_h(value, 31) : \
|
||||
// 0
|
||||
`define REQ_INST_META_SIZE (5 + 2 + (`NW_BITS-1+1) + 3 + 3 + `LOG2UP(NUM_REQUESTS))
|
||||
|
||||
`define WORD_SIZE (8*WORD_SIZE_BYTES)
|
||||
`define WORD_SIZE_RNG (`WORD_SIZE)-1:0
|
||||
|
||||
// 128
|
||||
`define BANK_SIZE_BYTES CACHE_SIZE_BYTES/NUMBER_BANKS
|
||||
`define BANK_SIZE_BYTES CACHE_SIZE_BYTES/NUM_BANKS
|
||||
|
||||
// 8
|
||||
`define BANK_LINE_COUNT (`BANK_SIZE_BYTES/BANK_LINE_SIZE_BYTES)
|
||||
@@ -71,7 +29,7 @@
|
||||
`define OFFSET_SIZE_RNG `OFFSET_SIZE_END:0
|
||||
|
||||
// 2
|
||||
`define WORD_SELECT_NUM_BITS (`vx_clog2(`BANK_LINE_WORDS))
|
||||
`define WORD_SELECT_NUM_BITS (`LOG2UP(`BANK_LINE_WORDS))
|
||||
// 2
|
||||
`define WORD_SELECT_SIZE_END (`WORD_SELECT_NUM_BITS)
|
||||
// 2
|
||||
@@ -83,7 +41,7 @@
|
||||
`define WORD_SELECT_SIZE_RNG `WORD_SELECT_SIZE_END-1:0
|
||||
|
||||
// 3
|
||||
`define BANK_SELECT_NUM_BITS (`vx_clog2(NUMBER_BANKS))
|
||||
`define BANK_SELECT_NUM_BITS (`LOG2UP(NUM_BANKS))
|
||||
// 3
|
||||
`define BANK_SELECT_SIZE_END (`BANK_SELECT_NUM_BITS)
|
||||
// 4
|
||||
@@ -96,7 +54,7 @@
|
||||
`define BANK_SELECT_SIZE_RNG `BANK_SELECT_SIZE_END-1:0
|
||||
|
||||
// 3
|
||||
`define LINE_SELECT_NUM_BITS (`vx_clog2(`BANK_LINE_COUNT))
|
||||
`define LINE_SELECT_NUM_BITS (`LOG2UP(`BANK_LINE_COUNT))
|
||||
// 3
|
||||
`define LINE_SELECT_SIZE_END (`LINE_SELECT_NUM_BITS)
|
||||
// 7
|
||||
@@ -120,9 +78,7 @@
|
||||
// 21:0
|
||||
`define TAG_SELECT_SIZE_RNG `TAG_SELECT_SIZE_END-1:0
|
||||
|
||||
|
||||
`define BASE_ADDR_MASK (~((1<<(`WORD_SELECT_ADDR_END+1))-1))
|
||||
|
||||
|
||||
`endif
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ module VX_cache_core_req_bank_sel
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
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}
|
||||
@@ -48,10 +48,10 @@ module VX_cache_core_req_bank_sel
|
||||
|
||||
)
|
||||
(
|
||||
input wire [NUMBER_REQUESTS-1:0] core_req_valid,
|
||||
input wire [NUMBER_REQUESTS-1:0][31:0] core_req_addr,
|
||||
input wire [NUM_REQUESTS-1:0] core_req_valid,
|
||||
input wire [NUM_REQUESTS-1:0][31:0] core_req_addr,
|
||||
|
||||
output reg [NUMBER_BANKS-1:0][NUMBER_REQUESTS-1:0] per_bank_valids
|
||||
output reg [NUM_BANKS-1:0][NUM_REQUESTS-1:0] per_bank_valids
|
||||
);
|
||||
|
||||
wire[31:0] req_address;
|
||||
@@ -60,8 +60,8 @@ module VX_cache_core_req_bank_sel
|
||||
integer curr_req;
|
||||
always @(*) begin
|
||||
per_bank_valids = 0;
|
||||
for (curr_req = 0; curr_req < NUMBER_REQUESTS; curr_req = curr_req + 1) begin
|
||||
if (NUMBER_BANKS == 1) begin
|
||||
for (curr_req = 0; curr_req < NUM_REQUESTS; curr_req = curr_req + 1) begin
|
||||
if (NUM_BANKS == 1) begin
|
||||
// If there is only one bank, then only map requests to that bank
|
||||
per_bank_valids[0][curr_req] = core_req_valid[curr_req];
|
||||
end else begin
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_cache_dfq_queue
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
@@ -45,11 +45,11 @@ module VX_cache_dfq_queue
|
||||
|
||||
)
|
||||
(
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
input wire dfqq_push,
|
||||
input wire[NUMBER_BANKS-1:0] per_bank_dram_fill_req,
|
||||
input wire[NUMBER_BANKS-1:0][31:0] per_bank_dram_fill_req_addr,
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
input wire dfqq_push,
|
||||
input wire[NUM_BANKS-1:0] per_bank_dram_fill_req,
|
||||
input wire[NUM_BANKS-1:0][31:0] per_bank_dram_fill_req_addr,
|
||||
|
||||
input wire dfqq_pop,
|
||||
output wire dfqq_req,
|
||||
@@ -58,18 +58,18 @@ module VX_cache_dfq_queue
|
||||
output wire dfqq_full
|
||||
);
|
||||
|
||||
wire[NUMBER_BANKS-1:0] out_per_bank_dram_fill_req;
|
||||
wire[NUMBER_BANKS-1:0][31:0] out_per_bank_dram_fill_req_addr;
|
||||
wire[NUM_BANKS-1:0] out_per_bank_dram_fill_req;
|
||||
wire[NUM_BANKS-1:0][31:0] out_per_bank_dram_fill_req_addr;
|
||||
|
||||
|
||||
reg [NUMBER_BANKS-1:0] use_per_bank_dram_fill_req;
|
||||
reg [NUMBER_BANKS-1:0][31:0] use_per_bank_dram_fill_req_addr;
|
||||
reg [NUM_BANKS-1:0] use_per_bank_dram_fill_req;
|
||||
reg [NUM_BANKS-1:0][31:0] use_per_bank_dram_fill_req_addr;
|
||||
|
||||
|
||||
wire[NUMBER_BANKS-1:0] qual_bank_dram_fill_req;
|
||||
wire[NUMBER_BANKS-1:0][31:0] qual_bank_dram_fill_req_addr;
|
||||
wire[NUM_BANKS-1:0] qual_bank_dram_fill_req;
|
||||
wire[NUM_BANKS-1:0][31:0] qual_bank_dram_fill_req_addr;
|
||||
|
||||
wire[NUMBER_BANKS-1:0] updated_bank_dram_fill_req;
|
||||
wire[NUM_BANKS-1:0] updated_bank_dram_fill_req;
|
||||
|
||||
|
||||
wire o_empty;
|
||||
@@ -79,7 +79,7 @@ module VX_cache_dfq_queue
|
||||
|
||||
wire push_qual = dfqq_push && !dfqq_full;
|
||||
wire pop_qual = dfqq_pop && use_empty && !out_empty;
|
||||
VX_generic_queue_ll #(.DATAW(NUMBER_BANKS * (1+32)), .SIZE(DFQQ_SIZE)) dfqq_queue(
|
||||
VX_generic_queue_ll #(.DATAW(NUM_BANKS * (1+32)), .SIZE(DFQQ_SIZE)) dfqq_queue(
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
.push (push_qual),
|
||||
@@ -90,13 +90,12 @@ module VX_cache_dfq_queue
|
||||
.full (dfqq_full)
|
||||
);
|
||||
|
||||
|
||||
assign qual_bank_dram_fill_req = use_empty ? (out_per_bank_dram_fill_req & {NUMBER_BANKS{!o_empty}}) : (use_per_bank_dram_fill_req & {NUMBER_BANKS{!use_empty}});
|
||||
assign qual_bank_dram_fill_req = use_empty ? (out_per_bank_dram_fill_req & {NUM_BANKS{!o_empty}}) : (use_per_bank_dram_fill_req & {NUM_BANKS{!use_empty}});
|
||||
assign qual_bank_dram_fill_req_addr = use_empty ? out_per_bank_dram_fill_req_addr : use_per_bank_dram_fill_req_addr;
|
||||
|
||||
wire[`vx_clog2(NUMBER_BANKS)-1:0] qual_request_index;
|
||||
wire[`LOG2UP(NUM_BANKS)-1:0] qual_request_index;
|
||||
wire qual_has_request;
|
||||
VX_generic_priority_encoder #(.N(NUMBER_BANKS)) VX_sel_bank(
|
||||
VX_generic_priority_encoder #(.N(NUM_BANKS)) VX_sel_bank(
|
||||
.valids(qual_bank_dram_fill_req),
|
||||
.index (qual_request_index),
|
||||
.found (qual_has_request)
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_cache_dram_req_arb
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
@@ -54,27 +54,27 @@ module VX_cache_dram_req_arb
|
||||
|
||||
|
||||
// Fill Request
|
||||
output wire dfqq_full,
|
||||
input wire[NUMBER_BANKS-1:0] per_bank_dram_fill_req,
|
||||
input wire[NUMBER_BANKS-1:0][31:0] per_bank_dram_fill_req_addr,
|
||||
output wire dfqq_full,
|
||||
input wire[NUM_BANKS-1:0] per_bank_dram_fill_req,
|
||||
input wire[NUM_BANKS-1:0][31:0] per_bank_dram_fill_req_addr,
|
||||
|
||||
// DFQ Request
|
||||
output wire[NUMBER_BANKS-1:0] per_bank_dram_wb_queue_pop,
|
||||
input wire[NUMBER_BANKS-1:0] per_bank_dram_wb_req,
|
||||
input wire[NUMBER_BANKS-1:0][31:0] per_bank_dram_wb_req_addr,
|
||||
input wire[NUMBER_BANKS-1:0][`BANK_LINE_WORDS-1:0][`WORD_SIZE-1:0] per_bank_dram_wb_req_data,
|
||||
input wire[NUMBER_BANKS-1:0] per_bank_dram_because_of_snp,
|
||||
output wire[NUM_BANKS-1:0] per_bank_dram_wb_queue_pop,
|
||||
input wire[NUM_BANKS-1:0] per_bank_dram_wb_req,
|
||||
input wire[NUM_BANKS-1:0][31:0] per_bank_dram_wb_req_addr,
|
||||
input wire[NUM_BANKS-1:0][`BANK_LINE_WORDS-1:0][`WORD_SIZE-1:0] per_bank_dram_wb_req_data,
|
||||
input wire[NUM_BANKS-1:0] per_bank_dram_because_of_snp,
|
||||
|
||||
// real Dram request
|
||||
output wire dram_req,
|
||||
output wire dram_req_write,
|
||||
output wire dram_req_read,
|
||||
output wire [31:0] dram_req_addr,
|
||||
output wire [31:0] dram_req_size,
|
||||
output wire [`IBANK_LINE_WORDS-1:0][31:0] dram_req_data,
|
||||
output wire dram_req_because_of_wb,
|
||||
output wire dram_req,
|
||||
output wire dram_req_write,
|
||||
output wire dram_req_read,
|
||||
output wire [31:0] dram_req_addr,
|
||||
output wire [31:0] dram_req_size,
|
||||
output wire [`IBANK_LINE_WORDS-1:0][31:0] dram_req_data,
|
||||
output wire dram_req_because_of_wb,
|
||||
|
||||
input wire dram_req_delay
|
||||
input wire dram_req_delay
|
||||
|
||||
);
|
||||
|
||||
@@ -126,10 +126,10 @@ module VX_cache_dram_req_arb
|
||||
.dfqq_full (dfqq_full)
|
||||
);
|
||||
|
||||
wire[`vx_clog2(NUMBER_BANKS)-1:0] dwb_bank;
|
||||
// wire[NUMBER_BANKS-1:0] use_wb_valid = per_bank_dram_wb_req | per_bank_dram_because_of_snp;
|
||||
wire[NUMBER_BANKS-1:0] use_wb_valid = per_bank_dram_wb_req;
|
||||
VX_generic_priority_encoder #(.N(NUMBER_BANKS)) VX_sel_dwb(
|
||||
wire[`LOG2UP(NUM_BANKS)-1:0] dwb_bank;
|
||||
// wire[NUM_BANKS-1:0] use_wb_valid = per_bank_dram_wb_req | per_bank_dram_because_of_snp;
|
||||
wire[NUM_BANKS-1:0] use_wb_valid = per_bank_dram_wb_req;
|
||||
VX_generic_priority_encoder #(.N(NUM_BANKS)) VX_sel_dwb(
|
||||
.valids(use_wb_valid),
|
||||
.index (dwb_bank),
|
||||
.found (dwb_valid)
|
||||
|
||||
@@ -8,11 +8,11 @@ module VX_cache_miss_resrv
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
@@ -53,10 +53,10 @@ module VX_cache_miss_resrv
|
||||
input wire miss_add,
|
||||
input wire[31:0] miss_add_addr,
|
||||
input wire[`WORD_SIZE_RNG] miss_add_data,
|
||||
input wire[`vx_clog2(NUMBER_REQUESTS)-1:0] miss_add_tid,
|
||||
input wire[`LOG2UP(NUM_REQUESTS)-1:0] miss_add_tid,
|
||||
input wire[4:0] miss_add_rd,
|
||||
input wire[1:0] miss_add_wb,
|
||||
input wire[`NW_BITS-1:0] miss_add_warp_num,
|
||||
input wire[`NW_BITS-1:0] miss_add_warp_num,
|
||||
input wire[2:0] miss_add_mem_read,
|
||||
input wire[2:0] miss_add_mem_write,
|
||||
input wire[31:0] miss_add_pc,
|
||||
@@ -72,24 +72,24 @@ module VX_cache_miss_resrv
|
||||
output wire miss_resrv_valid_st0,
|
||||
output wire[31:0] miss_resrv_addr_st0,
|
||||
output wire[`WORD_SIZE_RNG] miss_resrv_data_st0,
|
||||
output wire[`vx_clog2(NUMBER_REQUESTS)-1:0] miss_resrv_tid_st0,
|
||||
output wire[`LOG2UP(NUM_REQUESTS)-1:0] miss_resrv_tid_st0,
|
||||
output wire[4:0] miss_resrv_rd_st0,
|
||||
output wire[1:0] miss_resrv_wb_st0,
|
||||
output wire[`NW_BITS-1:0] miss_resrv_warp_num_st0,
|
||||
output wire[`NW_BITS-1:0] miss_resrv_warp_num_st0,
|
||||
output wire[2:0] miss_resrv_mem_read_st0,
|
||||
output wire[31:0] miss_resrv_pc_st0,
|
||||
output wire[2:0] miss_resrv_mem_write_st0
|
||||
|
||||
);
|
||||
|
||||
// Size of metadata = 32 + `vx_clog2(NUMBER_REQUESTS) + 5 + 2 + (`NW_BITS-1 + 1)
|
||||
// Size of metadata = 32 + `LOG2UP(NUM_REQUESTS) + 5 + 2 + (`NW_BITS-1 + 1)
|
||||
reg[`MRVQ_METADATA_SIZE-1:0] metadata_table[MRVQ_SIZE-1:0];
|
||||
reg[MRVQ_SIZE-1:0][31:0] addr_table;
|
||||
reg[MRVQ_SIZE-1:0][31:0] pc_table;
|
||||
reg[MRVQ_SIZE-1:0] valid_table;
|
||||
reg[MRVQ_SIZE-1:0] ready_table;
|
||||
reg[`vx_clog2(MRVQ_SIZE)-1:0] head_ptr;
|
||||
reg[`vx_clog2(MRVQ_SIZE)-1:0] tail_ptr;
|
||||
reg[`LOG2UP(MRVQ_SIZE)-1:0] head_ptr;
|
||||
reg[`LOG2UP(MRVQ_SIZE)-1:0] tail_ptr;
|
||||
|
||||
reg[31:0] size;
|
||||
|
||||
@@ -99,7 +99,7 @@ module VX_cache_miss_resrv
|
||||
assign miss_resrv_stop = (MRVQ_SIZE != 2) && (size > (MRVQ_SIZE-5));
|
||||
|
||||
wire enqueue_possible = !miss_resrv_full;
|
||||
wire[`vx_clog2(MRVQ_SIZE)-1:0] enqueue_index = tail_ptr;
|
||||
wire[`LOG2UP(MRVQ_SIZE)-1:0] enqueue_index = tail_ptr;
|
||||
|
||||
reg[MRVQ_SIZE-1:0] make_ready;
|
||||
genvar curr_e;
|
||||
@@ -112,7 +112,7 @@ module VX_cache_miss_resrv
|
||||
|
||||
|
||||
wire dequeue_possible = valid_table[head_ptr] && ready_table[head_ptr];
|
||||
wire[`vx_clog2(MRVQ_SIZE)-1:0] dequeue_index = head_ptr;
|
||||
wire[`LOG2UP(MRVQ_SIZE)-1:0] dequeue_index = head_ptr;
|
||||
|
||||
assign miss_resrv_valid_st0 = (MRVQ_SIZE != 2) && dequeue_possible;
|
||||
assign miss_resrv_pc_st0 = pc_table[dequeue_index];
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_cache_req_queue
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
@@ -50,25 +50,25 @@ module VX_cache_req_queue
|
||||
|
||||
// Enqueue Data
|
||||
input wire reqq_push,
|
||||
input wire [NUMBER_REQUESTS-1:0] bank_valids,
|
||||
input wire [NUMBER_REQUESTS-1:0][31:0] bank_addr,
|
||||
input wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] bank_writedata,
|
||||
input wire [NUM_REQUESTS-1:0] bank_valids,
|
||||
input wire [NUM_REQUESTS-1:0][31:0] bank_addr,
|
||||
input wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] bank_writedata,
|
||||
input wire [4:0] bank_rd,
|
||||
input wire [NUMBER_REQUESTS-1:0][1:0] bank_wb,
|
||||
input wire [`NW_BITS-1:0] bank_warp_num,
|
||||
input wire [NUMBER_REQUESTS-1:0][2:0] bank_mem_read,
|
||||
input wire [NUMBER_REQUESTS-1:0][2:0] bank_mem_write,
|
||||
input wire [NUM_REQUESTS-1:0][1:0] bank_wb,
|
||||
input wire [`NW_BITS-1:0] bank_warp_num,
|
||||
input wire [NUM_REQUESTS-1:0][2:0] bank_mem_read,
|
||||
input wire [NUM_REQUESTS-1:0][2:0] bank_mem_write,
|
||||
input wire [31:0] bank_pc,
|
||||
|
||||
// Dequeue Data
|
||||
input wire reqq_pop,
|
||||
output wire reqq_req_st0,
|
||||
output wire [`vx_clog2(NUMBER_REQUESTS)-1:0] reqq_req_tid_st0,
|
||||
output wire [`LOG2UP(NUM_REQUESTS)-1:0] reqq_req_tid_st0,
|
||||
output wire [31:0] reqq_req_addr_st0,
|
||||
output wire [`WORD_SIZE_RNG] reqq_req_writedata_st0,
|
||||
output wire [4:0] reqq_req_rd_st0,
|
||||
output wire [1:0] reqq_req_wb_st0,
|
||||
output wire [`NW_BITS-1:0] reqq_req_warp_num_st0,
|
||||
output wire [`NW_BITS-1:0] reqq_req_warp_num_st0,
|
||||
output wire [2:0] reqq_req_mem_read_st0,
|
||||
output wire [2:0] reqq_req_mem_write_st0,
|
||||
output wire [31:0] reqq_req_pc_st0,
|
||||
@@ -78,39 +78,39 @@ module VX_cache_req_queue
|
||||
output wire reqq_full
|
||||
);
|
||||
|
||||
wire [NUMBER_REQUESTS-1:0] out_per_valids;
|
||||
wire [NUMBER_REQUESTS-1:0][31:0] out_per_addr;
|
||||
wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] out_per_writedata;
|
||||
wire [4:0] out_per_rd;
|
||||
wire [NUMBER_REQUESTS-1:0][1:0] out_per_wb;
|
||||
wire [`NW_BITS-1:0] out_per_warp_num;
|
||||
wire [NUMBER_REQUESTS-1:0][2:0] out_per_mem_read;
|
||||
wire [NUMBER_REQUESTS-1:0][2:0] out_per_mem_write;
|
||||
wire [31:0] out_per_pc;
|
||||
wire [NUM_REQUESTS-1:0] out_per_valids;
|
||||
wire [NUM_REQUESTS-1:0][31:0] out_per_addr;
|
||||
wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] out_per_writedata;
|
||||
wire [4:0] out_per_rd;
|
||||
wire [NUM_REQUESTS-1:0][1:0] out_per_wb;
|
||||
wire [`NW_BITS-1:0] out_per_warp_num;
|
||||
wire [NUM_REQUESTS-1:0][2:0] out_per_mem_read;
|
||||
wire [NUM_REQUESTS-1:0][2:0] out_per_mem_write;
|
||||
wire [31:0] out_per_pc;
|
||||
|
||||
|
||||
reg [NUMBER_REQUESTS-1:0] use_per_valids;
|
||||
reg [NUMBER_REQUESTS-1:0][31:0] use_per_addr;
|
||||
reg [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] use_per_writedata;
|
||||
reg [4:0] use_per_rd;
|
||||
reg [NUMBER_REQUESTS-1:0][1:0] use_per_wb;
|
||||
reg [31:0] use_per_pc;
|
||||
reg [`NW_BITS-1:0] use_per_warp_num;
|
||||
reg [NUMBER_REQUESTS-1:0][2:0] use_per_mem_read;
|
||||
reg [NUMBER_REQUESTS-1:0][2:0] use_per_mem_write;
|
||||
reg [NUM_REQUESTS-1:0] use_per_valids;
|
||||
reg [NUM_REQUESTS-1:0][31:0] use_per_addr;
|
||||
reg [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] use_per_writedata;
|
||||
reg [4:0] use_per_rd;
|
||||
reg [NUM_REQUESTS-1:0][1:0] use_per_wb;
|
||||
reg [31:0] use_per_pc;
|
||||
reg [`NW_BITS-1:0] use_per_warp_num;
|
||||
reg [NUM_REQUESTS-1:0][2:0] use_per_mem_read;
|
||||
reg [NUM_REQUESTS-1:0][2:0] use_per_mem_write;
|
||||
|
||||
|
||||
wire [NUMBER_REQUESTS-1:0] qual_valids;
|
||||
wire [NUMBER_REQUESTS-1:0][31:0] qual_addr;
|
||||
wire [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] qual_writedata;
|
||||
wire [4:0] qual_rd;
|
||||
wire [NUMBER_REQUESTS-1:0][1:0] qual_wb;
|
||||
wire [`NW_BITS-1:0] qual_warp_num;
|
||||
wire [NUMBER_REQUESTS-1:0][2:0] qual_mem_read;
|
||||
wire [NUMBER_REQUESTS-1:0][2:0] qual_mem_write;
|
||||
wire [31:0] qual_pc;
|
||||
wire [NUM_REQUESTS-1:0] qual_valids;
|
||||
wire [NUM_REQUESTS-1:0][31:0] qual_addr;
|
||||
wire [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] qual_writedata;
|
||||
wire [4:0] qual_rd;
|
||||
wire [NUM_REQUESTS-1:0][1:0] qual_wb;
|
||||
wire [`NW_BITS-1:0] qual_warp_num;
|
||||
wire [NUM_REQUESTS-1:0][2:0] qual_mem_read;
|
||||
wire [NUM_REQUESTS-1:0][2:0] qual_mem_write;
|
||||
wire [31:0] qual_pc;
|
||||
|
||||
reg [NUMBER_REQUESTS-1:0] updated_valids;
|
||||
reg [NUM_REQUESTS-1:0] updated_valids;
|
||||
|
||||
wire o_empty;
|
||||
|
||||
@@ -120,7 +120,7 @@ module VX_cache_req_queue
|
||||
wire push_qual = reqq_push && !reqq_full;
|
||||
wire pop_qual = !out_empty && use_empty;
|
||||
|
||||
VX_generic_queue_ll #(.DATAW( (NUMBER_REQUESTS * (1+32+`WORD_SIZE)) + 5 + (NUMBER_REQUESTS*2) + (`NW_BITS-1+1) + (NUMBER_REQUESTS * (3 + 3)) + 32 ), .SIZE(REQQ_SIZE)) reqq_queue(
|
||||
VX_generic_queue_ll #(.DATAW( (NUM_REQUESTS * (1+32+`WORD_SIZE)) + 5 + (NUM_REQUESTS*2) + (`NW_BITS-1+1) + (NUM_REQUESTS * (3 + 3)) + 32 ), .SIZE(REQQ_SIZE)) reqq_queue(
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
.push (push_qual),
|
||||
@@ -132,7 +132,7 @@ module VX_cache_req_queue
|
||||
);
|
||||
|
||||
|
||||
wire[NUMBER_REQUESTS-1:0] real_out_per_valids = out_per_valids & {NUMBER_REQUESTS{~out_empty}};
|
||||
wire[NUM_REQUESTS-1:0] real_out_per_valids = out_per_valids & {NUM_REQUESTS{~out_empty}};
|
||||
|
||||
assign qual_valids = use_per_valids;
|
||||
assign qual_addr = use_per_addr;
|
||||
@@ -144,9 +144,9 @@ module VX_cache_req_queue
|
||||
assign qual_mem_write = use_per_mem_write;
|
||||
assign qual_pc = use_per_pc;
|
||||
|
||||
wire[`vx_clog2(NUMBER_REQUESTS)-1:0] qual_request_index;
|
||||
wire[`LOG2UP(NUM_REQUESTS)-1:0] qual_request_index;
|
||||
wire qual_has_request;
|
||||
VX_generic_priority_encoder #(.N(NUMBER_REQUESTS)) VX_sel_bank(
|
||||
VX_generic_priority_encoder #(.N(NUM_REQUESTS)) VX_sel_bank(
|
||||
.valids(qual_valids),
|
||||
.index (qual_request_index),
|
||||
.found (qual_has_request)
|
||||
@@ -155,7 +155,7 @@ module VX_cache_req_queue
|
||||
assign reqq_empty = !qual_has_request;
|
||||
assign reqq_req_st0 = qual_has_request;
|
||||
assign reqq_req_tid_st0 = qual_request_index;
|
||||
assign reqq_req_addr_st0 = qual_addr [qual_request_index];
|
||||
assign reqq_req_addr_st0 = qual_addr[qual_request_index];
|
||||
assign reqq_req_writedata_st0 = qual_writedata[qual_request_index];
|
||||
assign reqq_req_rd_st0 = qual_rd;
|
||||
assign reqq_req_wb_st0 = qual_wb[qual_request_index];
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_cache_wb_sel_merge
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
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}
|
||||
@@ -49,52 +49,52 @@ module VX_cache_wb_sel_merge
|
||||
(
|
||||
|
||||
// Per Bank WB
|
||||
input wire [NUMBER_BANKS-1:0] per_bank_wb_valid,
|
||||
input wire [NUMBER_BANKS-1:0][`vx_clog2(NUMBER_REQUESTS)-1:0] per_bank_wb_tid,
|
||||
input wire [NUMBER_BANKS-1:0][4:0] per_bank_wb_rd,
|
||||
input wire [NUMBER_BANKS-1:0][1:0] per_bank_wb_wb,
|
||||
input wire [NUMBER_BANKS-1:0][`NW_BITS-1:0] per_bank_wb_warp_num,
|
||||
input wire [NUMBER_BANKS-1:0][`WORD_SIZE_RNG] per_bank_wb_data,
|
||||
input wire [NUMBER_BANKS-1:0][31:0] per_bank_wb_pc,
|
||||
input wire [NUMBER_BANKS-1:0][31:0] per_bank_wb_address,
|
||||
output wire [NUMBER_BANKS-1:0] per_bank_wb_pop,
|
||||
input wire [NUM_BANKS-1:0] per_bank_wb_valid,
|
||||
input wire [NUM_BANKS-1:0][`LOG2UP(NUM_REQUESTS)-1:0] per_bank_wb_tid,
|
||||
input wire [NUM_BANKS-1:0][4:0] per_bank_wb_rd,
|
||||
input wire [NUM_BANKS-1:0][1:0] per_bank_wb_wb,
|
||||
input wire [NUM_BANKS-1:0][`NW_BITS-1:0] per_bank_wb_warp_num,
|
||||
input wire [NUM_BANKS-1:0][`WORD_SIZE_RNG] per_bank_wb_data,
|
||||
input wire [NUM_BANKS-1:0][31:0] per_bank_wb_pc,
|
||||
input wire [NUM_BANKS-1:0][31:0] per_bank_wb_address,
|
||||
output wire [NUM_BANKS-1:0] per_bank_wb_pop,
|
||||
|
||||
|
||||
// Core Writeback
|
||||
input wire core_no_wb_slot,
|
||||
output reg [NUMBER_REQUESTS-1:0] core_wb_valid,
|
||||
output reg [NUMBER_REQUESTS-1:0][`WORD_SIZE_RNG] core_wb_readdata,
|
||||
output reg [NUMBER_REQUESTS-1:0][31:0] core_wb_pc,
|
||||
output wire [4:0] core_wb_req_rd,
|
||||
output wire [1:0] core_wb_req_wb,
|
||||
output wire [`NW_BITS-1:0] core_wb_warp_num,
|
||||
output reg [NUMBER_REQUESTS-1:0][31:0] core_wb_address
|
||||
input wire core_no_wb_slot,
|
||||
output reg [NUM_REQUESTS-1:0] core_wb_valid,
|
||||
output reg [NUM_REQUESTS-1:0][`WORD_SIZE_RNG] core_wb_readdata,
|
||||
output reg [NUM_REQUESTS-1:0][31:0] core_wb_pc,
|
||||
output wire [4:0] core_wb_req_rd,
|
||||
output wire [1:0] core_wb_req_wb,
|
||||
output wire [`NW_BITS-1:0] core_wb_warp_num,
|
||||
output reg [NUM_REQUESTS-1:0][31:0] core_wb_address
|
||||
|
||||
);
|
||||
|
||||
reg [NUMBER_BANKS-1:0] per_bank_wb_pop_unqual;
|
||||
assign per_bank_wb_pop = per_bank_wb_pop_unqual & {NUMBER_BANKS{~core_no_wb_slot}};
|
||||
reg [NUM_BANKS-1:0] per_bank_wb_pop_unqual;
|
||||
assign per_bank_wb_pop = per_bank_wb_pop_unqual & {NUM_BANKS{~core_no_wb_slot}};
|
||||
|
||||
// wire[NUMBER_BANKS-1:0] bank_wants_wb;
|
||||
// wire[NUM_BANKS-1:0] bank_wants_wb;
|
||||
// genvar curr_bank;
|
||||
// generate
|
||||
// for (curr_bank = 0; curr_bank < NUMBER_BANKS; curr_bank=curr_bank+1) begin
|
||||
// for (curr_bank = 0; curr_bank < NUM_BANKS; curr_bank=curr_bank+1) begin
|
||||
// assign bank_wants_wb[curr_bank] = (|per_bank_wb_valid[curr_bank]);
|
||||
// end
|
||||
// endgenerate
|
||||
|
||||
|
||||
wire [(`vx_clog2(NUMBER_BANKS))-1:0] main_bank_index;
|
||||
wire [`LOG2UP(NUM_BANKS)-1:0] main_bank_index;
|
||||
wire found_bank;
|
||||
|
||||
VX_generic_priority_encoder #(.N(NUMBER_BANKS)) VX_sel_bank(
|
||||
VX_generic_priority_encoder #(.N(NUM_BANKS)) VX_sel_bank(
|
||||
.valids(per_bank_wb_valid),
|
||||
.index (main_bank_index),
|
||||
.found (found_bank)
|
||||
);
|
||||
|
||||
assign core_wb_req_rd = per_bank_wb_rd [main_bank_index];
|
||||
assign core_wb_req_wb = per_bank_wb_wb [main_bank_index];
|
||||
assign core_wb_req_rd = per_bank_wb_rd[main_bank_index];
|
||||
assign core_wb_req_wb = per_bank_wb_wb[main_bank_index];
|
||||
assign core_wb_warp_num = per_bank_wb_warp_num[main_bank_index];
|
||||
|
||||
integer this_bank;
|
||||
@@ -104,10 +104,14 @@ module VX_cache_wb_sel_merge
|
||||
core_wb_readdata = 0;
|
||||
core_wb_pc = 0;
|
||||
core_wb_address = 0;
|
||||
for (this_bank = 0; this_bank < NUMBER_BANKS; this_bank = this_bank + 1) begin
|
||||
for (this_bank = 0; this_bank < NUM_BANKS; this_bank = this_bank + 1) begin
|
||||
if ((FUNC_ID == `L2FUNC_ID) || (FUNC_ID == `L3FUNC_ID)) begin
|
||||
|
||||
if (found_bank && !core_wb_valid[per_bank_wb_tid[this_bank]] && per_bank_wb_valid[this_bank] && ((this_bank == main_bank_index) || (per_bank_wb_tid[this_bank] != per_bank_wb_tid[main_bank_index]))) begin
|
||||
if (found_bank
|
||||
&& !core_wb_valid[per_bank_wb_tid[this_bank]]
|
||||
&& per_bank_wb_valid[this_bank]
|
||||
&& ((main_bank_index == `LOG2UP(NUM_BANKS)'(this_bank))
|
||||
|| (per_bank_wb_tid[this_bank] != per_bank_wb_tid[main_bank_index]))) begin
|
||||
core_wb_valid[per_bank_wb_tid[this_bank]] = 1;
|
||||
core_wb_readdata[per_bank_wb_tid[this_bank]] = per_bank_wb_data[this_bank];
|
||||
core_wb_pc[per_bank_wb_tid[this_bank]] = per_bank_wb_pc[this_bank];
|
||||
@@ -119,8 +123,13 @@ module VX_cache_wb_sel_merge
|
||||
|
||||
end else begin
|
||||
|
||||
|
||||
if (((this_bank == main_bank_index) || (per_bank_wb_tid[this_bank] != per_bank_wb_tid[main_bank_index])) && found_bank && !core_wb_valid[per_bank_wb_tid[this_bank]] && (per_bank_wb_valid[this_bank]) && (per_bank_wb_rd[this_bank] == per_bank_wb_rd[main_bank_index]) && (per_bank_wb_warp_num[this_bank] == per_bank_wb_warp_num[main_bank_index])) begin
|
||||
if (((main_bank_index == `LOG2UP(NUM_BANKS)'(this_bank))
|
||||
|| (per_bank_wb_tid[this_bank] != per_bank_wb_tid[main_bank_index]))
|
||||
&& found_bank
|
||||
&& !core_wb_valid[per_bank_wb_tid[this_bank]]
|
||||
&& (per_bank_wb_valid[this_bank])
|
||||
&& (per_bank_wb_rd[this_bank] == per_bank_wb_rd[main_bank_index])
|
||||
&& (per_bank_wb_warp_num[this_bank] == per_bank_wb_warp_num[main_bank_index])) begin
|
||||
core_wb_valid[per_bank_wb_tid[this_bank]] = 1;
|
||||
core_wb_readdata[per_bank_wb_tid[this_bank]] = per_bank_wb_data[this_bank];
|
||||
core_wb_pc[per_bank_wb_tid[this_bank]] = per_bank_wb_pc[this_bank];
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_dcache_llv_resp_bank_sel
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
@@ -45,24 +45,24 @@ module VX_dcache_llv_resp_bank_sel
|
||||
|
||||
)
|
||||
(
|
||||
output reg [NUMBER_BANKS-1:0] per_bank_llvq_pop,
|
||||
input wire[NUMBER_BANKS-1:0] per_bank_llvq_valid,
|
||||
input wire[NUMBER_BANKS-1:0][31:0] per_bank_llvq_res_addr,
|
||||
input wire[NUMBER_BANKS-1:0][`BANK_LINE_WORDS-1:0][31:0] per_bank_llvq_res_data,
|
||||
input wire[NUMBER_BANKS-1:0][`vx_clog2(NUMBER_REQUESTS)-1:0] per_bank_llvq_res_tid,
|
||||
output reg [NUM_BANKS-1:0] per_bank_llvq_pop,
|
||||
input wire[NUM_BANKS-1:0] per_bank_llvq_valid,
|
||||
input wire[NUM_BANKS-1:0][31:0] per_bank_llvq_res_addr,
|
||||
input wire[NUM_BANKS-1:0][`BANK_LINE_WORDS-1:0][31:0] per_bank_llvq_res_data,
|
||||
input wire[NUM_BANKS-1:0][`LOG2UP(NUM_REQUESTS)-1:0] per_bank_llvq_res_tid,
|
||||
|
||||
input wire llvq_pop,
|
||||
output reg[NUMBER_REQUESTS-1:0] llvq_valid,
|
||||
output reg[NUMBER_REQUESTS-1:0][31:0] llvq_res_addr,
|
||||
output reg[NUMBER_REQUESTS-1:0][`BANK_LINE_WORDS-1:0][31:0] llvq_res_data
|
||||
input wire llvq_pop,
|
||||
output reg[NUM_REQUESTS-1:0] llvq_valid,
|
||||
output reg[NUM_REQUESTS-1:0][31:0] llvq_res_addr,
|
||||
output reg[NUM_REQUESTS-1:0][`BANK_LINE_WORDS-1:0][31:0] llvq_res_data
|
||||
|
||||
|
||||
);
|
||||
|
||||
wire [(`vx_clog2(NUMBER_BANKS))-1:0] main_bank_index;
|
||||
wire [(`LOG2UP(NUM_BANKS))-1:0] main_bank_index;
|
||||
wire found_bank;
|
||||
|
||||
VX_generic_priority_encoder #(.N(NUMBER_BANKS)) VX_sel_bank(
|
||||
VX_generic_priority_encoder #(.N(NUM_BANKS)) VX_sel_bank(
|
||||
.valids(per_bank_llvq_valid),
|
||||
.index (main_bank_index),
|
||||
.found (found_bank)
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_fill_invalidator
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
parameter NUM_REQUESTS = 2,
|
||||
// Number of cycles to complete stage 1 (read from memory)
|
||||
parameter STAGE_1_CYCLES = 2,
|
||||
|
||||
@@ -81,7 +81,7 @@ module VX_fill_invalidator
|
||||
assign matched = (|(matched_fill));
|
||||
|
||||
|
||||
wire [(`vx_clog2(FILL_INVALIDAOR_SIZE))-1:0] enqueue_index;
|
||||
wire [(`LOG2UP(FILL_INVALIDAOR_SIZE))-1:0] enqueue_index;
|
||||
wire enqueue_found;
|
||||
VX_generic_priority_encoder #(.N(FILL_INVALIDAOR_SIZE)) VX_sel_bank(
|
||||
.valids(~fills_active),
|
||||
@@ -111,7 +111,7 @@ module VX_fill_invalidator
|
||||
|
||||
|
||||
// reg success_found;
|
||||
// reg[(`vx_clog2(FILL_INVALIDAOR_SIZE))-1:0] success_index;
|
||||
// reg[(`LOG2UP(FILL_INVALIDAOR_SIZE))-1:0] success_index;
|
||||
|
||||
// integer curr_fill;
|
||||
// always @(*) begin
|
||||
@@ -136,7 +136,7 @@ module VX_fill_invalidator
|
||||
|
||||
|
||||
|
||||
// wire [(`vx_clog2(FILL_INVALIDAOR_SIZE))-1:0] enqueue_index;
|
||||
// wire [(`LOG2UP(FILL_INVALIDAOR_SIZE))-1:0] enqueue_index;
|
||||
// wire enqueue_found;
|
||||
|
||||
// VX_generic_priority_encoder #(.N(FILL_INVALIDAOR_SIZE)) VX_sel_bank(
|
||||
|
||||
@@ -23,8 +23,8 @@ module VX_prefetcher
|
||||
);
|
||||
|
||||
|
||||
reg[`vx_clog2(PRFQ_STRIDE):0] use_valid;
|
||||
reg[31:0] use_addr;
|
||||
reg[`LOG2UP(PRFQ_STRIDE):0] use_valid;
|
||||
reg[31:0] use_addr;
|
||||
|
||||
|
||||
wire current_valid;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
module VX_snp_fwd_arb
|
||||
#(
|
||||
parameter NUMBER_BANKS = 8
|
||||
parameter NUM_BANKS = 8
|
||||
)
|
||||
(
|
||||
input wire[NUMBER_BANKS-1:0] per_bank_snp_fwd,
|
||||
input wire[NUMBER_BANKS-1:0][31:0] per_bank_snp_fwd_addr,
|
||||
output reg[NUMBER_BANKS-1:0] per_bank_snp_fwd_pop,
|
||||
input wire[NUM_BANKS-1:0] per_bank_snp_fwd,
|
||||
input wire[NUM_BANKS-1:0][31:0] per_bank_snp_fwd_addr,
|
||||
output reg[NUM_BANKS-1:0] per_bank_snp_fwd_pop,
|
||||
|
||||
output wire snp_fwd,
|
||||
output wire[31:0] snp_fwd_addr,
|
||||
@@ -15,13 +15,12 @@ module VX_snp_fwd_arb
|
||||
|
||||
);
|
||||
|
||||
wire[NUM_BANKS-1:0] qual_per_bank_snp_fwd = per_bank_snp_fwd & {NUM_BANKS{!snp_fwd_delay}};
|
||||
|
||||
wire[NUMBER_BANKS-1:0] qual_per_bank_snp_fwd = per_bank_snp_fwd & {NUMBER_BANKS{!snp_fwd_delay}};
|
||||
|
||||
wire[`vx_clog2(NUMBER_BANKS)-1:0] fsq_bank;
|
||||
wire[`LOG2UP(NUM_BANKS)-1:0] fsq_bank;
|
||||
wire fsq_valid;
|
||||
|
||||
VX_generic_priority_encoder #(.N(NUMBER_BANKS)) VX_sel_ffsq(
|
||||
VX_generic_priority_encoder #(.N(NUM_BANKS)) VX_sel_ffsq(
|
||||
.valids(qual_per_bank_snp_fwd),
|
||||
.index (fsq_bank),
|
||||
.found (fsq_valid)
|
||||
|
||||
@@ -7,11 +7,11 @@ module VX_tag_data_access
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
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}
|
||||
@@ -64,7 +64,7 @@ module VX_tag_data_access
|
||||
input wire[2:0] mem_write_st1e,
|
||||
input wire[2:0] mem_read_st1e,
|
||||
|
||||
output wire[`WORD_SIZE_RNG] readword_st1e,
|
||||
output wire[`WORD_SIZE_RNG] readword_st1e,
|
||||
output wire[`DBANK_LINE_WORDS-1:0][31:0] readdata_st1e,
|
||||
output wire[`TAG_SELECT_SIZE_RNG] readtag_st1e,
|
||||
output wire miss_st1e,
|
||||
@@ -104,9 +104,9 @@ module VX_tag_data_access
|
||||
VX_tag_data_structure #(
|
||||
.CACHE_SIZE_BYTES (CACHE_SIZE_BYTES),
|
||||
.BANK_LINE_SIZE_BYTES (BANK_LINE_SIZE_BYTES),
|
||||
.NUMBER_BANKS (NUMBER_BANKS),
|
||||
.NUM_BANKS (NUM_BANKS),
|
||||
.WORD_SIZE_BYTES (WORD_SIZE_BYTES),
|
||||
.NUMBER_REQUESTS (NUMBER_REQUESTS),
|
||||
.NUM_REQUESTS (NUM_REQUESTS),
|
||||
.STAGE_1_CYCLES (STAGE_1_CYCLES),
|
||||
.FUNC_ID (FUNC_ID),
|
||||
.REQQ_SIZE (REQQ_SIZE),
|
||||
|
||||
@@ -6,12 +6,12 @@ module VX_tag_data_structure
|
||||
parameter CACHE_SIZE_BYTES = 1024,
|
||||
// Size of line inside a bank in bytes
|
||||
parameter BANK_LINE_SIZE_BYTES = 16,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUMBER_BANKS = 8,
|
||||
// Number of banks {1, 2, 4, 8,...}
|
||||
parameter NUM_BANKS = 8,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE_BYTES = 4,
|
||||
// Number of Word requests per cycle {1, 2, 4, 8, ...}
|
||||
parameter NUMBER_REQUESTS = 2,
|
||||
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}
|
||||
@@ -66,7 +66,7 @@ module VX_tag_data_structure
|
||||
|
||||
);
|
||||
|
||||
reg[`DBANK_LINE_WORDS-1:0][3:0][7:0] data [`BANK_LINE_COUNT-1:0];
|
||||
reg[`DBANK_LINE_WORDS-1:0][3:0][7:0] data [`BANK_LINE_COUNT-1:0];
|
||||
reg[`TAG_SELECT_SIZE_RNG] tag [`BANK_LINE_COUNT-1:0];
|
||||
reg valid[`BANK_LINE_COUNT-1:0];
|
||||
reg dirty[`BANK_LINE_COUNT-1:0];
|
||||
|
||||
Reference in New Issue
Block a user