-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Scratchpads] Needed packages for scratchpads and ahb peripheral bus #2458
Open
CoralieAllioux
wants to merge
34
commits into
openhwgroup:feature/scratchpads
Choose a base branch
from
boschglobal:feature/scratchpads
base: feature/scratchpads
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
1b8f2ad
Add packages for scratchpad and AHB periph.
CoralieAllioux e6b4236
Merge branch 'scratchpad-periphbus-packages' into feature/scratchpads
CoralieAllioux 887be36
Remove patch
CoralieAllioux b3feeb7
Add address decoder for scratchpad and ahb periph regions
CoralieAllioux b58ae5d
Merge branch 'scratchpads/address_decoder' into feature/scratchpads
CoralieAllioux 2ab02dd
Add parameters for ahb peripheral bus, data and instruction scratchpads
CoralieAllioux aa276ed
Add new parameters in all cva6 configurations
CoralieAllioux ba33f04
Add function to check if an address is inside scratchpads / ahb peirp…
CoralieAllioux b0aa116
Apply verible
CoralieAllioux 2aae707
Merge branch 'scratchpads/parameters' into feature/scratchpads
CoralieAllioux 400f176
Add ahb master adapter: used for ahb peripheral bus
CoralieAllioux a105964
Merge branch 'periph_bus/ahb_master' into feature/scratchpads
CoralieAllioux 273a67a
Add AHB peripheral bus module
CoralieAllioux 679d19b
Merge branch 'periph_bus/periph_bus' into feature/scratchpads
CoralieAllioux b10e82d
Add sram_controller: used for scratchpads
CoralieAllioux 2f76258
Merge branch 'scratchpad/sram_controller' into feature/scratchpads
CoralieAllioux 0b39bcf
Add AHB slave module
CoralieAllioux dd817f5
Add ahb slave in flist and missing files
CoralieAllioux a8f0a11
Add data scratchpad controller module
CoralieAllioux 60cbf57
Add dscr controller to filelist
CoralieAllioux 3013a54
Add instruction scratchpad controller
CoralieAllioux 7e7fcc7
Add iscr controller to filelist
CoralieAllioux cb5d33f
Integrate address decoder in store buffer for scratchpads and create …
CoralieAllioux 16754f5
Merge branch 'scratchpad/store_buffer' into feature/scratchpads
CoralieAllioux 7193e34
Integrate new port list for store_buffer and handle exceptions with n…
CoralieAllioux 195cced
Merge branch 'scratchpad/store_unit' into feature/scratchpads
CoralieAllioux 3553487
Integrate new port list for store_unit and load_unit in load_store_un…
CoralieAllioux acf2531
Merge branch 'scratchpad/ex_stage' into feature/scratchpads
CoralieAllioux 483caa0
Add needed localparam type for scratchpads and ahb pierphe + integrat…
CoralieAllioux 664917a
Declare needed signals to integrate scratchpads and periph bus
CoralieAllioux bb52e97
Instantiate ex_stage with additional IOs
CoralieAllioux 9b2c9db
Add address decoder after frontend to support scratchpad targets
CoralieAllioux 71c8fa2
Instantiate dscr and iscr sram and associate controllers; instantiate…
CoralieAllioux d8b7f5c
Merge branch 'scratchpad/cva6_top' into feature/scratchpads
CoralieAllioux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//----------------------------------------------------------------------------- | ||
// Copyright 2024 Robert Bosch GmbH | ||
// | ||
// SPDX-License-Identifier: SHL-0.51 | ||
// | ||
// Original Author: Coralie Allioux - Robert Bosch France SAS | ||
//----------------------------------------------------------------------------- | ||
|
||
package address_decoder_pkg; | ||
|
||
// ---------------------- | ||
// Address Decoder Mode | ||
// ---------------------- | ||
|
||
localparam DECODER_MODE_WIDTH = 2; | ||
typedef enum logic [DECODER_MODE_WIDTH-1:0] { | ||
DECODER_MODE_CACHE, | ||
DECODER_MODE_DSCR, | ||
DECODER_MODE_ISCR, | ||
DECODER_MODE_AHB_PERIPH | ||
} addr_dec_mode_e; | ||
|
||
endpackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//----------------------------------------------------------------------------- | ||
// Copyright 2024 Robert Bosch GmbH | ||
// | ||
// SPDX-License-Identifier: SHL-0.51 | ||
// | ||
// Original Author: Coralie Allioux - Robert Bosch France SAS | ||
//----------------------------------------------------------------------------- | ||
|
||
package ahb_pkg; | ||
|
||
localparam AHBSizeWidth = 3; | ||
localparam AHBTransWidth = 2; | ||
localparam AHBBurstWidth = 3; | ||
localparam AHBProtWidth = 4; | ||
|
||
typedef logic [AHBSizeWidth-1:0] size_t; | ||
typedef logic [AHBTransWidth-1:0] trans_t; | ||
typedef logic [AHBBurstWidth-1:0] burst_t; | ||
typedef logic [AHBProtWidth-1:0] prot_t; | ||
|
||
// htrans values | ||
typedef enum logic [AHBTransWidth-1:0] { | ||
AHB_TRANS_IDLE, | ||
AHB_TRANS_BUSY, | ||
AHB_TRANS_NONSEQ, | ||
AHB_TRANS_SEQ | ||
} ahb_trans_e; | ||
|
||
endpackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,38 @@ | ||||||||||
//----------------------------------------------------------------------------- | ||||||||||
// Copyright 2024 Robert Bosch GmbH | ||||||||||
// | ||||||||||
// SPDX-License-Identifier: SHL-0.51 | ||||||||||
// | ||||||||||
// Original Author: Coralie Allioux - Robert Bosch France SAS | ||||||||||
//----------------------------------------------------------------------------- | ||||||||||
|
||||||||||
package scratchpad_pkg; | ||||||||||
|
||||||||||
// ---------------------- | ||||||||||
// Instruction Scratchpad Mode | ||||||||||
// ---------------------- | ||||||||||
typedef enum logic { | ||||||||||
ISCR_MODE_FUNCTIONAL, | ||||||||||
ISCR_MODE_PRELOAD | ||||||||||
} iscr_mode_t; | ||||||||||
|
||||||||||
// ---------------------- | ||||||||||
// Arbit values | ||||||||||
// ---------------------- | ||||||||||
localparam DSCR_ARBIT_NUM_IN = 3; | ||||||||||
localparam ISCR_ARBIT_NUM_IN = 4; | ||||||||||
|
||||||||||
typedef enum logic [$clog2(ISCR_ARBIT_NUM_IN)-1:0] { | ||||||||||
ISCR_ARBIT_LOAD, | ||||||||||
ISCR_ARBIT_STORE, | ||||||||||
ISCR_ARBIT_AHB, | ||||||||||
ISCR_ARBIT_FRONTEND | ||||||||||
} iscr_arbit_e; | ||||||||||
|
||||||||||
typedef enum logic [$clog2(DSCR_ARBIT_NUM_IN)-1:0] { | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [verible-verilog-format] reported by reviewdog 🐶
Suggested change
|
||||||||||
DSCR_ARBIT_LOAD, | ||||||||||
DSCR_ARBIT_STORE, | ||||||||||
DSCR_ARBIT_AHB | ||||||||||
} dscr_arbit_e; | ||||||||||
|
||||||||||
endpackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
diff --git a/core/Flist.cva6 b/core/Flist.cva6 | ||
index aa885261..b22d2849 100644 | ||
--- a/core/Flist.cva6 | ||
+++ b/core/Flist.cva6 | ||
@@ -69,6 +69,9 @@ ${CVA6_REPO_DIR}/core/include/wt_cache_pkg.sv | ||
${CVA6_REPO_DIR}/core/include/std_cache_pkg.sv | ||
${CVA6_REPO_DIR}/core/include/instr_tracer_pkg.sv | ||
${CVA6_REPO_DIR}/core/include/build_config_pkg.sv | ||
+${CVA6_REPO_DIR}/core/include/ahb_pkg.sv | ||
+${CVA6_REPO_DIR}/core/include/address_decoder_pkg.sv | ||
+${CVA6_REPO_DIR}/core/include/scratchpad_pkg.sv | ||
|
||
//CVXIF | ||
${CVA6_REPO_DIR}/core/include/cvxif_pkg.sv | ||
@@ -193,4 +196,4 @@ ${CVA6_REPO_DIR}/core/cva6_mmu/cva6_ptw.sv | ||
${CVA6_REPO_DIR}/core/cva6_mmu/cva6_tlb.sv | ||
${CVA6_REPO_DIR}/core/cva6_mmu/cva6_shared_tlb.sv | ||
|
||
-// end of manifest | ||
+// end of manifest | ||
\ No newline at end of file | ||
diff --git a/core/include/address_decoder_pkg.sv b/core/include/address_decoder_pkg.sv | ||
new file mode 100644 | ||
index 00000000..4f4073e7 | ||
--- /dev/null | ||
+++ b/core/include/address_decoder_pkg.sv | ||
@@ -0,0 +1,23 @@ | ||
+//----------------------------------------------------------------------------- | ||
+// Copyright 2024 Robert Bosch GmbH | ||
+// | ||
+// SPDX-License-Identifier: SHL-0.51 | ||
+// | ||
+// Original Author: Coralie Allioux - Robert Bosch France SAS | ||
+//----------------------------------------------------------------------------- | ||
+ | ||
+package address_decoder_pkg; | ||
+ | ||
+ // ---------------------- | ||
+ // Address Decoder Mode | ||
+ // ---------------------- | ||
+ | ||
+ localparam DECODER_MODE_WIDTH = 2; | ||
+ typedef enum logic [DECODER_MODE_WIDTH-1:0] { | ||
+ DECODER_MODE_CACHE, | ||
+ DECODER_MODE_DSCR, | ||
+ DECODER_MODE_ISCR, | ||
+ DECODER_MODE_AHB_PERIPH | ||
+ } addr_dec_mode_e; | ||
+ | ||
+endpackage | ||
diff --git a/core/include/ahb_pkg.sv b/core/include/ahb_pkg.sv | ||
new file mode 100644 | ||
index 00000000..ed9be392 | ||
--- /dev/null | ||
+++ b/core/include/ahb_pkg.sv | ||
@@ -0,0 +1,29 @@ | ||
+//----------------------------------------------------------------------------- | ||
+// Copyright 2024 Robert Bosch GmbH | ||
+// | ||
+// SPDX-License-Identifier: SHL-0.51 | ||
+// | ||
+// Original Author: Coralie Allioux - Robert Bosch France SAS | ||
+//----------------------------------------------------------------------------- | ||
+ | ||
+package ahb_pkg; | ||
+ | ||
+ localparam AHBSizeWidth = 3; | ||
+ localparam AHBTransWidth = 2; | ||
+ localparam AHBBurstWidth = 3; | ||
+ localparam AHBProtWidth = 4; | ||
+ | ||
+ typedef logic [AHBSizeWidth-1:0] size_t; | ||
+ typedef logic [AHBTransWidth-1:0] trans_t; | ||
+ typedef logic [AHBBurstWidth-1:0] burst_t; | ||
+ typedef logic [AHBProtWidth-1:0] prot_t; | ||
+ | ||
+ // htrans values | ||
+ typedef enum logic [AHBTransWidth-1:0] { | ||
+ AHB_TRANS_IDLE, | ||
+ AHB_TRANS_BUSY, | ||
+ AHB_TRANS_NONSEQ, | ||
+ AHB_TRANS_SEQ | ||
+ } ahb_trans_e; | ||
+ | ||
+endpackage | ||
diff --git a/core/include/scratchpad_pkg.sv b/core/include/scratchpad_pkg.sv | ||
new file mode 100644 | ||
index 00000000..f9173ae5 | ||
--- /dev/null | ||
+++ b/core/include/scratchpad_pkg.sv | ||
@@ -0,0 +1,38 @@ | ||
+//----------------------------------------------------------------------------- | ||
+// Copyright 2024 Robert Bosch GmbH | ||
+// | ||
+// SPDX-License-Identifier: SHL-0.51 | ||
+// | ||
+// Original Author: Coralie Allioux - Robert Bosch France SAS | ||
+//----------------------------------------------------------------------------- | ||
+ | ||
+package scratchpad_pkg; | ||
+ | ||
+ // ---------------------- | ||
+ // Instruction Scratchpad Mode | ||
+ // ---------------------- | ||
+ typedef enum logic { | ||
+ ISCR_MODE_FUNCTIONAL, | ||
+ ISCR_MODE_PRELOAD | ||
+ } iscr_mode_t; | ||
+ | ||
+ // ---------------------- | ||
+ // Arbit values | ||
+ // ---------------------- | ||
+ localparam DSCR_ARBIT_NUM_IN = 3; | ||
+ localparam ISCR_ARBIT_NUM_IN = 4; | ||
+ | ||
+ typedef enum logic [$clog2(ISCR_ARBIT_NUM_IN)-1:0] { | ||
+ ISCR_ARBIT_LOAD, | ||
+ ISCR_ARBIT_STORE, | ||
+ ISCR_ARBIT_AHB, | ||
+ ISCR_ARBIT_FRONTEND | ||
+ } iscr_arbit_e; | ||
+ | ||
+ typedef enum logic [$clog2(DSCR_ARBIT_NUM_IN)-1:0] { | ||
+ DSCR_ARBIT_LOAD, | ||
+ DSCR_ARBIT_STORE, | ||
+ DSCR_ARBIT_AHB | ||
+ } dscr_arbit_e; | ||
+ | ||
+endpackage |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[verible-verilog-format] reported by reviewdog 🐶