Skip to content

Commit

Permalink
spatz_cluster: Parameterize the number of FPUs and IPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
suehtamacv committed Oct 23, 2023
1 parent 31d651d commit 13ad800
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hw/ip/spatz_cc/src/spatz_cc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module spatz_cc
parameter int unsigned NumSpatzOutstandingLoads = 0,
// Enable V Extension
parameter bit RVV = 1,
// Spatz paramaters
// Spatz parameters
parameter int unsigned NumSpatzFPUs = 4,
parameter int unsigned NumSpatzIPUs = 1,
/// Add isochronous clock-domain crossings e.g., make it possible to operate
Expand Down
7 changes: 6 additions & 1 deletion hw/system/spatz_cluster/src/spatz_cluster.sv
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ module spatz_cluster
parameter int unsigned NumIntOutstandingMem [NrCores] = '{default: '0},
/// Per-core Spatz outstanding loads
parameter int unsigned NumSpatzOutstandingLoads [NrCores] = '{default: '0},
// Spatz parameters
parameter int unsigned NumSpatzFPUs [NrCores] = '{default: '0},
parameter int unsigned NumSpatzIPUs [NrCores] = '{default: '0},
/// ## Timing Tuning Parameters
/// Insert Pipeline registers into off-loading path (response)
parameter bit RegisterOffloadRsp = 1'b0,
Expand Down Expand Up @@ -736,6 +739,8 @@ module spatz_cluster
.XF8 (1'b1 ),
.XF8ALT (1'b1 ),
.IsoCrossing (1'b0 ),
.NumSpatzFPUs (NumSpatzFPUs[i] ),
.NumSpatzIPUs (NumSpatzIPUs[i] ),
.NumIntOutstandingLoads (NumIntOutstandingLoads[i] ),
.NumIntOutstandingMem (NumIntOutstandingMem[i] ),
.NumSpatzOutstandingLoads(NumSpatzOutstandingLoads[i]),
Expand Down Expand Up @@ -777,7 +782,7 @@ module spatz_cluster
assign wide_axi_mst_req[SDMAMst] = axi_dma_req;
assign axi_dma_res = wide_axi_mst_rsp[SDMAMst];
assign dma_events = dma_core_events;
end else begin: gen_no_dma_connection
end else begin: gen_no_dma_connection
assign axi_dma_res = '0;
end
end
Expand Down
4 changes: 4 additions & 0 deletions hw/system/spatz_cluster/src/spatz_cluster_wrapper.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ module ${cfg['name']}_wrapper
localparam int unsigned NumIntOutstandingLoads [NumCores] = '{${core_cfg('num_int_outstanding_loads')}};
localparam int unsigned NumIntOutstandingMem [NumCores] = '{${core_cfg('num_int_outstanding_mem')}};
localparam int unsigned NumSpatzOutstandingLoads [NumCores] = '{${core_cfg('num_spatz_outstanding_loads')}};
localparam int unsigned NumSpatzFPUs [NumCores] = '{${cfg['n_fpu']}};
localparam int unsigned NumSpatzIPUs [NumCores] = '{${cfg['n_ipu']}};

spatz_cluster_pkg::spatz_axi_iwc_out_req_t axi_from_cluster_iwc_req;
spatz_cluster_pkg::spatz_axi_iwc_out_resp_t axi_from_cluster_iwc_resp;
Expand Down Expand Up @@ -507,6 +509,8 @@ module ${cfg['name']}_wrapper
.NumIntOutstandingLoads (NumIntOutstandingLoads),
.NumIntOutstandingMem (NumIntOutstandingMem),
.NumSpatzOutstandingLoads (NumSpatzOutstandingLoads),
.NumSpatzFPUs (NumSpatzFPUs),
.NumSpatzIPUs (NumSpatzIPUs),
.axi_in_req_t (axi_in_req_t),
.axi_in_resp_t (axi_in_resp_t),
.axi_out_req_t (spatz_cluster_pkg::spatz_axi_iwc_out_req_t),
Expand Down
4 changes: 2 additions & 2 deletions util/Makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

# Root
SHELL = /usr/bin/env bash
SPATZ_DIR := $(shell git rev-parse --show-toplevel 2>/dev/null || echo $$SPATZ_DIR)
ROOT_DIR := ${SPATZ_DIR}
SPATZ_DIR ?= $(shell git rev-parse --show-toplevel 2>/dev/null || echo $$SPATZ_DIR)
ROOT_DIR ?= ${SPATZ_DIR}

# Binaries
INSTALL_PREFIX ?= install
Expand Down

0 comments on commit 13ad800

Please sign in to comment.