aboutsummaryrefslogtreecommitdiff
path: root/rtl/config_pkg.sv
diff options
context:
space:
mode:
authorWarrick Lo <wlo@warricklo.net>2026-06-20 20:39:51 +0000
committerWarrick Lo <wlo@warricklo.net>2026-06-20 20:39:51 +0000
commitd6f2d1744a0e693b14846867a1f1b03d4b853396 (patch)
treebf73f64d249190c21f3c35f66149a54e91618b07 /rtl/config_pkg.sv
parentMerge branch 'crajaman/top-level-rtl' (diff)
parentMinor refactor to regfile formal test module (diff)
downloadmontreal-d6f2d1744a0e693b14846867a1f1b03d4b853396.tar.xz
montreal-d6f2d1744a0e693b14846867a1f1b03d4b853396.zip
Merge branch 'feature/core'
* feature/core: Minor refactor to regfile formal test module Add formal verification for regfile Move typedefs to types.svh from montreal_pkg Move design parameters to config_pkg regfile: refactor: 'chunks' are now 'slices' See-also: #13 See-also: #14 Reviewed-by: Warrick Lo <wlo@warricklo.net>
Diffstat (limited to '')
-rw-r--r--rtl/config_pkg.sv17
1 files changed, 17 insertions, 0 deletions
diff --git a/rtl/config_pkg.sv b/rtl/config_pkg.sv
new file mode 100644
index 0000000..01d6c20
--- /dev/null
+++ b/rtl/config_pkg.sv
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: CERN-OHL-P-2.0 */
+
+package config_pkg;
+
+ /* Word width as defined in the RISC-V spec. */
+ localparam int unsigned XLEN = 32;
+
+ /* We use a byte-sliced datapath, inspired by the
+ * classic bit-sliced architecture of old CPUs. */
+ localparam int unsigned SLICE_WIDTH = 8;
+
+ /* The RV32E ISA defines 16 general-purpose registers.
+ * We have two read ports to allow for pipelined reads. */
+ localparam int unsigned REG_ADDR_WIDTH = 4;
+ localparam int unsigned REG_NUM_READ_PORTS = 2;
+
+endpackage : config_pkg