Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Changing Ibex core configuration parameters for synthesis #3

Open
snematbakhsh opened this issue Apr 12, 2022 · 4 comments
Open

Changing Ibex core configuration parameters for synthesis #3

snematbakhsh opened this issue Apr 12, 2022 · 4 comments

Comments

@snematbakhsh
Copy link

If there a convenient way to change the Ibex core configuration parameters for synthesis (for example, to change the multiplier implementation to RV32MSingleCycle)? I experimented a bit with the build options and I didn't find a way to set those parameters externally in a way that Vivado would respect. Of course changing the parameters directly in the rtl works fine, e.g.:

--- a/vendor/lowrisc_ibex/rtl/ibex_top.sv
+++ b/vendor/lowrisc_ibex/rtl/ibex_top.sv
@@ -13,19 +13,19 @@
  * Top level module of the ibex RISC-V core
  */
 module ibex_top import ibex_pkg::*; #(
-  parameter bit          PMPEnable        = 1'b0,
+  parameter bit          PMPEnable        = 1'b1,
   parameter int unsigned PMPGranularity   = 0,

... but is there a better way to do it? Sorry for the beginner question, I am a newbie with Vivado and related tools.

@GregAC
Copy link
Owner

GregAC commented Apr 27, 2022

Right now there's out of the box way to change the Ibex configuration. It would be possible to expose these parameters at the FPGA top level (top_artya7.sv) and then fuseSoC could set them. This would be a worthwhile future enhancement to super system.

In the mean time I'd suggest setting parameters within ibex_super_system.sv where ibex_top is instantiated however your method also works fine. In general you shouldn't alter the files within the vendor/ directory but practically this is only a issue when you come to bring in a new version of Ibex. As your changes will be trivial it shouldn't be hard to reapply them if you do vendor in a newer version of Ibex.

@GregAC
Copy link
Owner

GregAC commented Apr 27, 2022

Leaving this issue open as a reminder to me to do the enhancement described in my previous comment.

@snematbakhsh
Copy link
Author

Thanks for the info. Is df5b88d similar to what you had in mind? Happy to submit a PR if so.

@GregAC
Copy link
Owner

GregAC commented Jun 24, 2022

Instead of the fixed config structures selected by a single string parameter I'd expose all of the parameters in the ibex_super_system/top_artya_a7 top-level then the build system can provide the various configuration sets. If you look in the Ibex repository we have a YAML file that defines various configurations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants