mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-06-27 17:01:10 -04:00
cache repl reset
Some checks are pending
CI / setup (push) Waiting to run
CI / build (32) (push) Blocked by required conditions
CI / build (64) (push) Blocked by required conditions
CI / tests (cache, 32) (push) Blocked by required conditions
CI / tests (cache, 64) (push) Blocked by required conditions
CI / tests (config1, 32) (push) Blocked by required conditions
CI / tests (config1, 64) (push) Blocked by required conditions
CI / tests (config2, 32) (push) Blocked by required conditions
CI / tests (config2, 64) (push) Blocked by required conditions
CI / tests (debug, 32) (push) Blocked by required conditions
CI / tests (debug, 64) (push) Blocked by required conditions
CI / tests (opencl, 32) (push) Blocked by required conditions
CI / tests (opencl, 64) (push) Blocked by required conditions
CI / tests (regression, 32) (push) Blocked by required conditions
CI / tests (regression, 64) (push) Blocked by required conditions
CI / tests (scope, 32) (push) Blocked by required conditions
CI / tests (scope, 64) (push) Blocked by required conditions
CI / tests (stress, 32) (push) Blocked by required conditions
CI / tests (stress, 64) (push) Blocked by required conditions
CI / tests (synthesis, 32) (push) Blocked by required conditions
CI / tests (synthesis, 64) (push) Blocked by required conditions
CI / tests (vector, 32) (push) Blocked by required conditions
CI / tests (vector, 64) (push) Blocked by required conditions
CI / tests (vm, 32) (push) Blocked by required conditions
CI / tests (vm, 64) (push) Blocked by required conditions
CI / complete (push) Blocked by required conditions
Some checks are pending
CI / setup (push) Waiting to run
CI / build (32) (push) Blocked by required conditions
CI / build (64) (push) Blocked by required conditions
CI / tests (cache, 32) (push) Blocked by required conditions
CI / tests (cache, 64) (push) Blocked by required conditions
CI / tests (config1, 32) (push) Blocked by required conditions
CI / tests (config1, 64) (push) Blocked by required conditions
CI / tests (config2, 32) (push) Blocked by required conditions
CI / tests (config2, 64) (push) Blocked by required conditions
CI / tests (debug, 32) (push) Blocked by required conditions
CI / tests (debug, 64) (push) Blocked by required conditions
CI / tests (opencl, 32) (push) Blocked by required conditions
CI / tests (opencl, 64) (push) Blocked by required conditions
CI / tests (regression, 32) (push) Blocked by required conditions
CI / tests (regression, 64) (push) Blocked by required conditions
CI / tests (scope, 32) (push) Blocked by required conditions
CI / tests (scope, 64) (push) Blocked by required conditions
CI / tests (stress, 32) (push) Blocked by required conditions
CI / tests (stress, 64) (push) Blocked by required conditions
CI / tests (synthesis, 32) (push) Blocked by required conditions
CI / tests (synthesis, 64) (push) Blocked by required conditions
CI / tests (vector, 32) (push) Blocked by required conditions
CI / tests (vector, 64) (push) Blocked by required conditions
CI / tests (vm, 32) (push) Blocked by required conditions
CI / tests (vm, 64) (push) Blocked by required conditions
CI / complete (push) Blocked by required conditions
This commit is contained in:
parent
d1f37fc629
commit
fb4527fe95
8 changed files with 46 additions and 48 deletions
2
hw/rtl/cache/VX_cache.sv
vendored
2
hw/rtl/cache/VX_cache.sv
vendored
|
@ -52,7 +52,7 @@ module VX_cache import VX_gpu_pkg::*; #(
|
|||
parameter DIRTY_BYTES = 0,
|
||||
|
||||
// Replacement policy
|
||||
parameter REPL_POLICY = `CS_REPL_CYCLIC,
|
||||
parameter REPL_POLICY = `CS_REPL_FIFO,
|
||||
|
||||
// Request debug identifier
|
||||
parameter UUID_WIDTH = 0,
|
||||
|
|
11
hw/rtl/cache/VX_cache_bank.sv
vendored
11
hw/rtl/cache/VX_cache_bank.sv
vendored
|
@ -48,7 +48,7 @@ module VX_cache_bank #(
|
|||
parameter DIRTY_BYTES = 0,
|
||||
|
||||
// Replacement policy
|
||||
parameter REPL_POLICY = `CS_REPL_CYCLIC,
|
||||
parameter REPL_POLICY = `CS_REPL_FIFO,
|
||||
|
||||
// Request debug identifier
|
||||
parameter UUID_WIDTH = 0,
|
||||
|
@ -353,9 +353,11 @@ module VX_cache_bank #(
|
|||
.clk (clk),
|
||||
.reset (reset),
|
||||
.stall (pipe_stall),
|
||||
.hit_valid (do_lookup_st1 && is_hit_st1 && ~pipe_stall),
|
||||
.hit_line (line_idx_st1),
|
||||
.hit_way (way_idx_st1),
|
||||
.init (do_init_st0),
|
||||
.lookup_valid(do_lookup_st1 && ~pipe_stall),
|
||||
.lookup_hit (is_hit_st1),
|
||||
.lookup_line(line_idx_st1),
|
||||
.lookup_way (way_idx_st1),
|
||||
.repl_valid (do_fill_st0 && ~pipe_stall),
|
||||
.repl_line (line_idx_st0),
|
||||
.repl_way (victim_way_st0)
|
||||
|
@ -443,7 +445,6 @@ module VX_cache_bank #(
|
|||
) cache_data (
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
.stall (pipe_stall),
|
||||
// inputs
|
||||
.init (do_init_st0),
|
||||
.fill (do_fill_st0 && ~pipe_stall),
|
||||
|
|
2
hw/rtl/cache/VX_cache_cluster.sv
vendored
2
hw/rtl/cache/VX_cache_cluster.sv
vendored
|
@ -56,7 +56,7 @@ module VX_cache_cluster import VX_gpu_pkg::*; #(
|
|||
parameter DIRTY_BYTES = 0,
|
||||
|
||||
// Replacement policy
|
||||
parameter REPL_POLICY = `CS_REPL_CYCLIC,
|
||||
parameter REPL_POLICY = `CS_REPL_FIFO,
|
||||
|
||||
// Request debug identifier
|
||||
parameter UUID_WIDTH = 0,
|
||||
|
|
2
hw/rtl/cache/VX_cache_data.sv
vendored
2
hw/rtl/cache/VX_cache_data.sv
vendored
|
@ -33,7 +33,6 @@ module VX_cache_data #(
|
|||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
input wire stall,
|
||||
// inputs
|
||||
input wire init,
|
||||
input wire fill,
|
||||
|
@ -53,7 +52,6 @@ module VX_cache_data #(
|
|||
output wire [LINE_SIZE-1:0] evict_byteen
|
||||
);
|
||||
`UNUSED_PARAM (WORD_SIZE)
|
||||
`UNUSED_VAR (stall)
|
||||
|
||||
wire [`CS_WORDS_PER_LINE-1:0][WORD_SIZE-1:0] write_mask;
|
||||
for (genvar i = 0; i < `CS_WORDS_PER_LINE; ++i) begin : g_write_mask
|
||||
|
|
2
hw/rtl/cache/VX_cache_define.vh
vendored
2
hw/rtl/cache/VX_cache_define.vh
vendored
|
@ -73,7 +73,7 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
`define CS_REPL_RANDOM 0
|
||||
`define CS_REPL_CYCLIC 1
|
||||
`define CS_REPL_FIFO 1
|
||||
`define CS_REPL_PLRU 2
|
||||
|
||||
`endif // VX_CACHE_DEFINE_VH
|
||||
|
|
72
hw/rtl/cache/VX_cache_repl.sv
vendored
72
hw/rtl/cache/VX_cache_repl.sv
vendored
|
@ -90,19 +90,23 @@ module VX_cache_repl #(
|
|||
// Number of associative ways
|
||||
parameter NUM_WAYS = 1,
|
||||
// replacement policy
|
||||
parameter REPL_POLICY = `CS_REPL_CYCLIC
|
||||
parameter REPL_POLICY = `CS_REPL_FIFO
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
input wire stall,
|
||||
input wire hit_valid,
|
||||
input wire [`CS_LINE_SEL_BITS-1:0] hit_line,
|
||||
input wire [`CS_WAY_SEL_WIDTH-1:0] hit_way,
|
||||
input wire init,
|
||||
input wire lookup_valid,
|
||||
input wire lookup_hit,
|
||||
input wire [`CS_LINE_SEL_BITS-1:0] lookup_line,
|
||||
input wire [`CS_WAY_SEL_WIDTH-1:0] lookup_way,
|
||||
input wire repl_valid,
|
||||
input wire [`CS_LINE_SEL_BITS-1:0] repl_line,
|
||||
output wire [`CS_WAY_SEL_WIDTH-1:0] repl_way
|
||||
);
|
||||
localparam WAY_SEL_WIDTH = `CS_WAY_SEL_WIDTH;
|
||||
`UNUSED_VAR (reset)
|
||||
`UNUSED_VAR (init)
|
||||
`UNUSED_VAR (stall)
|
||||
|
||||
if (NUM_WAYS > 1) begin : g_enable
|
||||
|
@ -119,26 +123,23 @@ module VX_cache_repl #(
|
|||
.SIZE (`CS_LINES_PER_BANK),
|
||||
.WRENW (LRU_WIDTH),
|
||||
.RDW_MODE ("R"),
|
||||
`ifdef SIMULATION
|
||||
.RESET_RAM (1),
|
||||
`endif
|
||||
.RADDR_REG (1)
|
||||
) plru_store (
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
.reset (1'b0),
|
||||
.read (repl_valid),
|
||||
.write (hit_valid),
|
||||
.wren (plru_wmask),
|
||||
.waddr (hit_line),
|
||||
.write (init || (lookup_valid && lookup_hit)),
|
||||
.wren (init ? '1 : plru_wmask),
|
||||
.waddr (lookup_line),
|
||||
.raddr (repl_line),
|
||||
.wdata (plru_wdata),
|
||||
.wdata (init ? '0 : plru_wdata),
|
||||
.rdata (plru_rdata)
|
||||
);
|
||||
|
||||
plru_decoder #(
|
||||
.NUM_WAYS (NUM_WAYS)
|
||||
) plru_dec (
|
||||
.way_idx (hit_way),
|
||||
.way_idx (lookup_way),
|
||||
.lru_data (plru_wdata),
|
||||
.lru_mask (plru_wmask)
|
||||
);
|
||||
|
@ -150,40 +151,39 @@ module VX_cache_repl #(
|
|||
.way_idx (repl_way)
|
||||
);
|
||||
|
||||
end else if (REPL_POLICY == `CS_REPL_CYCLIC) begin : g_cyclic
|
||||
// Cyclic replacement policy
|
||||
`UNUSED_VAR (hit_valid)
|
||||
`UNUSED_VAR (hit_line)
|
||||
`UNUSED_VAR (hit_way)
|
||||
end else if (REPL_POLICY == `CS_REPL_FIFO) begin : g_fifo
|
||||
// Fifo replacement policy
|
||||
`UNUSED_VAR (lookup_valid)
|
||||
`UNUSED_VAR (lookup_hit)
|
||||
`UNUSED_VAR (lookup_line)
|
||||
`UNUSED_VAR (lookup_way)
|
||||
|
||||
wire [WAY_SEL_WIDTH-1:0] ctr_rdata;
|
||||
wire [WAY_SEL_WIDTH-1:0] ctr_wdata = ctr_rdata + 1;
|
||||
wire [WAY_SEL_WIDTH-1:0] fifo_rdata;
|
||||
wire [WAY_SEL_WIDTH-1:0] fifo_wdata = fifo_rdata + 1;
|
||||
|
||||
VX_sp_ram #(
|
||||
.DATAW (WAY_SEL_WIDTH),
|
||||
.SIZE (`CS_LINES_PER_BANK),
|
||||
.RDW_MODE ("R"),
|
||||
`ifdef SIMULATION
|
||||
.RESET_RAM (1),
|
||||
`endif
|
||||
.RADDR_REG (1)
|
||||
) ctr_store (
|
||||
) fifo_store (
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
.reset (1'b0),
|
||||
.read (repl_valid),
|
||||
.write (repl_valid),
|
||||
.write (init || repl_valid),
|
||||
.wren (1'b1),
|
||||
.addr (repl_line),
|
||||
.wdata (ctr_wdata),
|
||||
.rdata (ctr_rdata)
|
||||
.wdata (init ? '0 : fifo_wdata),
|
||||
.rdata (fifo_rdata)
|
||||
);
|
||||
|
||||
assign repl_way = ctr_rdata;
|
||||
assign repl_way = fifo_rdata;
|
||||
end else begin : g_random
|
||||
// Random replacement policy
|
||||
`UNUSED_VAR (hit_valid)
|
||||
`UNUSED_VAR (hit_line)
|
||||
`UNUSED_VAR (hit_way)
|
||||
`UNUSED_VAR (lookup_valid)
|
||||
`UNUSED_VAR (lookup_hit)
|
||||
`UNUSED_VAR (lookup_line)
|
||||
`UNUSED_VAR (lookup_way)
|
||||
`UNUSED_VAR (repl_valid)
|
||||
`UNUSED_VAR (repl_line)
|
||||
reg [WAY_SEL_WIDTH-1:0] victim_idx;
|
||||
|
@ -198,10 +198,10 @@ module VX_cache_repl #(
|
|||
end
|
||||
end else begin : g_disable
|
||||
`UNUSED_VAR (clk)
|
||||
`UNUSED_VAR (reset)
|
||||
`UNUSED_VAR (hit_valid)
|
||||
`UNUSED_VAR (hit_line)
|
||||
`UNUSED_VAR (hit_way)
|
||||
`UNUSED_VAR (lookup_valid)
|
||||
`UNUSED_VAR (lookup_hit)
|
||||
`UNUSED_VAR (lookup_line)
|
||||
`UNUSED_VAR (lookup_way)
|
||||
`UNUSED_VAR (repl_valid)
|
||||
`UNUSED_VAR (repl_line)
|
||||
assign repl_way = 1'b0;
|
||||
|
|
2
hw/rtl/cache/VX_cache_wrap.sv
vendored
2
hw/rtl/cache/VX_cache_wrap.sv
vendored
|
@ -54,7 +54,7 @@ module VX_cache_wrap import VX_gpu_pkg::*; #(
|
|||
parameter DIRTY_BYTES = 0,
|
||||
|
||||
// Replacement policy
|
||||
parameter REPL_POLICY = `CS_REPL_CYCLIC,
|
||||
parameter REPL_POLICY = `CS_REPL_FIFO,
|
||||
|
||||
// Request debug identifier
|
||||
parameter UUID_WIDTH = 0,
|
||||
|
|
|
@ -138,7 +138,6 @@ proc run_report {} {
|
|||
# Generate the synthesis report
|
||||
report_place_status -file place.rpt
|
||||
report_route_status -file route.rpt
|
||||
report_timing_summary -file timing.rpt
|
||||
|
||||
# Generate timing report
|
||||
report_timing -nworst 100 -delay_type max -sort_by group -file timing.rpt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue