Skip to content

Commit

Permalink
ariane_soc: Parametrise number of harts
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Wistoff <[email protected]>
  • Loading branch information
niwis committed Jul 15, 2023
1 parent 2cf4a6d commit 776332e
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ litmus:
script:
- corev_apu/rv_plic/rtl/gen_plic_addrmap.py -t4 > corev_apu/rv_plic/rtl/plic_regmap.sv
- ${PRFX} ci/build-riscv-litmus-tests.sh
- ${PRFX} make -j12 run-litmus-tests-verilator defines=RVFI_PORT=1
- ${PRFX} make -j12 run-litmus-tests-verilator defines=RVFI_PORT=1 target=cv64a6_dual
- ${PRFX} make check-litmus-tests
3 changes: 3 additions & 0 deletions core/include/cv32a60x_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv32a6_embedded_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv32a6_ima_sv32_fpga_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv32a6_imac_sv0_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv32a6_imac_sv32_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv32a6_imafc_sv32_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
89 changes: 89 additions & 0 deletions core/include/cv64a6_dual_config_pkg.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// Copyright 2021 Thales DIS design services SAS
//
// Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
// You may obtain a copy of the License at https://solderpad.org/licenses/
//
// Original Author: Jean-Roch COULON - Thales


package cva6_config_pkg;

typedef enum logic {
WB = 0,
WT = 1
} cache_type_t ;

localparam CVA6ConfigXlen = 64;

localparam CVA6ConfigFpuEn = 1;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
localparam CVA6ConfigCExtEn = 1;
localparam CVA6ConfigAExtEn = 1;
localparam CVA6ConfigBExtEn = 0;
localparam CVA6ConfigSclicExtEn = 0;
localparam CVA6ConfigHExtEn = 0; // hypervisor extension disabled by default

localparam CVA6ConfigAxiIdWidth = 4;
localparam CVA6ConfigAxiAddrWidth = 64;
localparam CVA6ConfigAxiDataWidth = 64;
localparam CVA6ConfigFetchUserEn = 0;
localparam CVA6ConfigFetchUserWidth = 1;
localparam CVA6ConfigDataUserEn = 0;
localparam CVA6ConfigDataUserWidth = 1;

localparam CVA6ConfigRenameEn = 0;

localparam CVA6ConfigIcacheByteSize = 16384;
localparam CVA6ConfigIcacheSetAssoc = 4;
localparam CVA6ConfigIcacheLineWidth = 128;
localparam CVA6ConfigDcacheByteSize = 32768;
localparam CVA6ConfigDcacheSetAssoc = 8;
localparam CVA6ConfigDcacheLineWidth = 128;

localparam CVA6ConfigDcacheIdWidth = 1;
localparam CVA6ConfigMemTidWidth = 2;

localparam CVA6ConfigWtDcacheWbufDepth = 8;

localparam CVA6ConfigNrCommitPorts = 2;
localparam CVA6ConfigNrScoreboardEntries = 8;

localparam CVA6ConfigFPGAEn = 0;

localparam CVA6ConfigNrLoadPipeRegs = 1;
localparam CVA6ConfigNrStorePipeRegs = 0;

localparam CVA6ConfigInstrTlbEntries = 16;
localparam CVA6ConfigDataTlbEntries = 16;

localparam CVA6ConfigRASDepth = 2;
localparam CVA6ConfigBTBEntries = 32;
localparam CVA6ConfigBHTEntries = 128;

localparam CVA6ConfigNrPMPEntries = 8;

localparam CVA6ConfigPerfCounterEn = 1;

localparam CVA6ConfigDcacheType = WB;

localparam CVA6ConfigMmuPresent = 1;

// Do not modify
`ifdef RVFI_PORT
localparam CVA6ConfigRvfiTrace = 1;
`else
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 2;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv64a6_imafdc_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
3 changes: 3 additions & 0 deletions core/include/cv64a6_imafdcsclic_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ package cva6_config_pkg;
localparam CVA6ConfigRvfiTrace = 0;
`endif

// For ariane_soc (no need to adjust in other systems
localparam ArianeSoCNumHarts = 1;

endpackage
2 changes: 1 addition & 1 deletion corev_apu/tb/ariane_soc_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package ariane_soc;
localparam int unsigned CLICNumInterruptSrc = 64;
localparam int unsigned CLICIntCtlBits = 8;

localparam int unsigned NumHarts = 2;
localparam int unsigned NumHarts = cva6_config_pkg::ArianeSoCNumHarts;
localparam int unsigned NrSlaves = NumHarts + 1; // actually masters, but slaves on the crossbar

// 4 is recommended by AXI standard, so lets stick to it, do not change
Expand Down

0 comments on commit 776332e

Please sign in to comment.