@@ -23,8 +23,6 @@ module cva6_hpdcache_wrapper
2323 parameter int NumPorts = 4 ,
2424 parameter int NrHwPrefetchers = 4 ,
2525
26- parameter type cmo_req_t = logic ,
27- parameter type cmo_rsp_t = logic ,
2826 parameter type hpdcache_mem_addr_t = logic ,
2927 parameter type hpdcache_mem_id_t = logic ,
3028 parameter type hpdcache_mem_data_t = logic ,
@@ -73,9 +71,6 @@ module cva6_hpdcache_wrapper
7371 // AMO request/response - EX_STAGE
7472 input ariane_pkg :: amo_req_t dcache_amo_req_i,
7573 output ariane_pkg :: amo_resp_t dcache_amo_resp_o,
76- // CMO interface request/response
77- input cmo_req_t dcache_cmo_req_i,
78- output cmo_rsp_t dcache_cmo_resp_o,
7974 // Data cache input request/response ports - EX_STAGE
8075 input dcache_req_i_t [NumPorts- 1 : 0 ] dcache_req_ports_i,
8176 output dcache_req_o_t [NumPorts- 1 : 0 ] dcache_req_ports_o,
@@ -119,7 +114,7 @@ module cva6_hpdcache_wrapper
119114 input hpdcache_mem_resp_w_t dcache_mem_resp_write_i
120115);
121116
122- localparam int HPDCACHE_NREQUESTERS = NumPorts + 2 ;
117+ localparam int HPDCACHE_NREQUESTERS = NumPorts + 1 ;
123118
124119 typedef logic [63 : 0 ] hwpf_stride_param_t ;
125120
@@ -133,13 +128,11 @@ module cva6_hpdcache_wrapper
133128 hpdcache_rsp_t dcache_rsp [HPDCACHE_NREQUESTERS ];
134129 logic dcache_read_miss, dcache_write_miss;
135130
136- logic [ 2 : 0 ] snoop_valid;
137- logic [ 2 : 0 ] snoop_abort;
138- hpdcache_req_offset_t [ 2 : 0 ] snoop_addr_offset;
139- hpdcache_tag_t [ 2 : 0 ] snoop_addr_tag;
140- logic [ 2 : 0 ] snoop_phys_indexed;
141-
142- logic dcache_cmo_req_is_prefetch;
131+ logic [ 1 : 0 ] snoop_valid;
132+ logic [ 1 : 0 ] snoop_abort;
133+ hpdcache_req_offset_t [ 1 : 0 ] snoop_addr_offset;
134+ hpdcache_tag_t [ 1 : 0 ] snoop_addr_tag;
135+ logic [ 1 : 0 ] snoop_phys_indexed;
143136
144137 hwpf_stride_pkg :: hwpf_stride_throttle_t [NrHwPrefetchers- 1 : 0 ] hwpf_throttle_in;
145138 hwpf_stride_pkg :: hwpf_stride_throttle_t [NrHwPrefetchers- 1 : 0 ] hwpf_throttle_out;
@@ -224,37 +217,6 @@ module cva6_hpdcache_wrapper
224217 .hpdcache_rsp_valid_i (dcache_rsp_valid[NumPorts- 1 ]),
225218 .hpdcache_rsp_i (dcache_rsp[NumPorts- 1 ])
226219 );
227-
228- `ifdef HPDCACHE_ENABLE_CMO
229- cva6_hpdcache_cmo_if_adapter # (
230- .cmo_req_t (cmo_req_t),
231- .cmo_rsp_t (cmo_rsp_t)
232- ) i_cva6_hpdcache_cmo_if_adapter (
233- .clk_i,
234- .rst_ni,
235-
236- .dcache_req_sid_i (hpdcache_req_sid_t ' (NumPorts)),
237-
238- .cva6_cmo_req_i (dcache_cmo_req_i),
239- .cva6_cmo_resp_o (dcache_cmo_resp_o),
240-
241- .dcache_req_valid_o (dcache_req_valid[NumPorts]),
242- .dcache_req_ready_i (dcache_req_ready[NumPorts]),
243- .dcache_req_o (dcache_req[NumPorts]),
244- .dcache_req_abort_o (dcache_req_abort[NumPorts]),
245- .dcache_req_tag_o (dcache_req_tag[NumPorts]),
246- .dcache_req_pma_o (dcache_req_pma[NumPorts]),
247-
248- .dcache_rsp_valid_i (dcache_rsp_valid[NumPorts]),
249- .dcache_rsp_i (dcache_rsp[NumPorts])
250- );
251- `else
252- assign dcache_req_valid[NumPorts] = 1'b0 ,
253- dcache_req[NumPorts] = '0 ,
254- dcache_req_abort[NumPorts] = 1'b0 ,
255- dcache_req_tag[NumPorts] = '0 ,
256- dcache_req_pma[NumPorts] = '0 ;
257- `endif
258220 endgenerate
259221
260222 // Snoop load port
@@ -271,26 +233,6 @@ module cva6_hpdcache_wrapper
271233 snoop_addr_tag[1 ] = dcache_req_tag[NumPorts- 1 ],
272234 snoop_phys_indexed[1 ] = dcache_req[NumPorts- 1 ].phys_indexed;
273235
274- `ifdef HPDCACHE_ENABLE_CMO
275- // Snoop CMO port (in case of read prefetch accesses)
276- assign dcache_cmo_req_is_prefetch = hpdcache_pkg :: is_cmo_prefetch (
277- dcache_req[NumPorts].op, dcache_req[NumPorts].size
278- );
279- assign snoop_valid[2 ] = dcache_req_valid[NumPorts]
280- & dcache_req_ready[NumPorts]
281- & dcache_cmo_req_is_prefetch,
282- snoop_abort[2 ] = dcache_req_abort[NumPorts],
283- snoop_addr_offset[2 ] = dcache_req[NumPorts].addr_offset,
284- snoop_addr_tag[2 ] = dcache_req_tag[NumPorts],
285- snoop_phys_indexed[2 ] = dcache_req[NumPorts].phys_indexed;
286- `else
287- assign snoop_valid[2 ] = 1'b0 ,
288- snoop_abort[2 ] = 1'b0 ,
289- snoop_addr_offset[2 ] = '0 ,
290- snoop_addr_tag[2 ] = '0 ,
291- snoop_phys_indexed[2 ] = 1'b0 ;
292- `endif
293-
294236 generate
295237 for (genvar h = 0 ; h < NrHwPrefetchers; h++ ) begin : gen_hwpf_throttle
296238 assign hwpf_throttle_in[h] = hwpf_stride_pkg :: hwpf_stride_throttle_t ' (hwpf_throttle_i[h]);
@@ -301,7 +243,7 @@ module cva6_hpdcache_wrapper
301243 hwpf_stride_wrapper # (
302244 .HPDcacheCfg (HPDcacheCfg),
303245 .NUM_HW_PREFETCH (NrHwPrefetchers),
304- .NUM_SNOOP_PORTS (3 ),
246+ .NUM_SNOOP_PORTS (2 ),
305247 .hpdcache_tag_t (hpdcache_tag_t),
306248 .hpdcache_req_offset_t (hpdcache_req_offset_t),
307249 .hpdcache_req_data_t (hpdcache_req_data_t),
@@ -331,16 +273,16 @@ module cva6_hpdcache_wrapper
331273 .snoop_addr_tag_i (snoop_addr_tag),
332274 .snoop_phys_indexed_i (snoop_phys_indexed),
333275
334- .hpdcache_req_sid_i (hpdcache_req_sid_t ' (NumPorts + 1 )),
276+ .hpdcache_req_sid_i (hpdcache_req_sid_t ' (NumPorts)),
335277
336- .hpdcache_req_valid_o (dcache_req_valid[NumPorts+ 1 ]),
337- .hpdcache_req_ready_i (dcache_req_ready[NumPorts+ 1 ]),
338- .hpdcache_req_o (dcache_req[NumPorts+ 1 ]),
339- .hpdcache_req_abort_o (dcache_req_abort[NumPorts+ 1 ]),
340- .hpdcache_req_tag_o (dcache_req_tag[NumPorts+ 1 ]),
341- .hpdcache_req_pma_o (dcache_req_pma[NumPorts+ 1 ]),
342- .hpdcache_rsp_valid_i (dcache_rsp_valid[NumPorts+ 1 ]),
343- .hpdcache_rsp_i (dcache_rsp[NumPorts+ 1 ])
278+ .hpdcache_req_valid_o (dcache_req_valid[NumPorts]),
279+ .hpdcache_req_ready_i (dcache_req_ready[NumPorts]),
280+ .hpdcache_req_o (dcache_req[NumPorts]),
281+ .hpdcache_req_abort_o (dcache_req_abort[NumPorts]),
282+ .hpdcache_req_tag_o (dcache_req_tag[NumPorts]),
283+ .hpdcache_req_pma_o (dcache_req_pma[NumPorts]),
284+ .hpdcache_rsp_valid_i (dcache_rsp_valid[NumPorts]),
285+ .hpdcache_rsp_i (dcache_rsp[NumPorts])
344286 );
345287
346288 hpdcache # (
0 commit comments