pulp-platform / axi

AXI SystemVerilog synthesizable IP modules and verification infrastructure for high-performance on-chip communication
Other
1.12k stars 268 forks source link

axi_xbar_unmuxed: Avoid multi dimensional arrays in more tools #353

Open olofk opened 1 month ago

olofk commented 1 month ago

axi_xbar_unmuxed doesn't parse with (our version of) Xcelium because of problems with multi dimensional interfaces. I see the same problem has come up with VCS which was fixed in https://github.com/pulp-platform/axi/commit/14fbbf59082c6b13e8820a71131b8f845e3a8683

Two thoughts here

  1. My experience tells me that it's best to avoid multi-dimensional interfaces completely because of poor tool support
  2. Use something like `ifdef NO_MULTI_DIM_ARRAYS instead of `ifdef VCS. It's not a good idea to have tool-specific ifdefs. It's better to name the ifdef after the actual missing feature (e.g. `ifdef NO_MULTI_DIM_ARRAYS in this case) I had the same comment a couple of years ago around assertions where there were a lot of `ifdef VERILATOR. When we wanted to run this in XSIM, we had to also add a layer of `ifdef XSIM and then after a while, Verilator started to support assertions which made things more confusing. Having e.g. an `ifdef ASSERTIONS and controlling when to set that through the build system would help in these cases.
olofk commented 1 month ago

Just remembered that common_cells nowadays does have a `COMMON_CELLS_ASSERTS_OFF which I think is a good example of how to do this.