chipsalliance / Cores-VeeR-EL2

VeeR EL2 Core
https://chipsalliance.github.io/Cores-VeeR-EL2/html/
Apache License 2.0
251 stars 75 forks source link

VeeR defines uniquification #59

Open nstewart-amd opened 1 year ago

nstewart-amd commented 1 year ago

VeeR defines must be uniquified to avoid collision/redefinition when multiple VeeR cores are instantiated in a single design.

Since verilog macro defines are global namespace, they must be uniquified to avoid macro redifinition collision against other common IP names and multi-VeeR usercases.

The following are generic and subject to contention:

common_defines.vh define REGWIDTH 32 define CLOCK_PERIOD 100 `define TOP tb_top

el2_param.vh Most everything. From a generic perspective, VeeR users should be able to integrate mutliple Veer configurations in parallel without collision. Hence, anything "defined" in {veer.config -default} must not collide with defines in {veer.config -high_perf}. Defines must be uniquified allowing multiple concurrent instantiation of differently configured VeeR cores.

Today: `define FOO 0x1

Recommended VeeR default config: `define VEER_default_FOO 0x1 Veer high_perf config: `define VEER_high_perf_FOO 0x2