chipsalliance / Cores-VeeR-EL2

VeeR EL2 Core
https://chipsalliance.github.io/Cores-VeeR-EL2/html/main/docs_rendered/html/index.html
Apache License 2.0
238 stars 70 forks source link

Improve readability and usability of common_defines.vh generated file #150

Closed calebofearth closed 6 months ago

calebofearth commented 7 months ago

When running the veer config script as defined in the readme, one of the output files is common_defines.vh. There are several potential improvements that our team requests for this generated file:

  1. When the file is re-generated (with or without any changes to the core configuration arguments), the ordering of macros in common_defines.vh is scrambled, which makes text diffs/git changes difficult to read. Making the order consistent between re-generation would be helpful.
  2. Protection header macros can help reduce compilation warnings due to re-definition of verilog macros. Header protection macros are implemented in the Caliptra project and may be used as reference for this request: common_defines.sv
  3. RV_ASSERT_ON macro should be guarded by checks for SYNTHESIS and for VERILATOR as shown here