pulp-platform / pulp_soc

pulp_soc is the core building component of PULP based SoCs
Other
78 stars 81 forks source link

issue with DC synthesis #25

Closed daviderossi1982 closed 4 years ago

daviderossi1982 commented 4 years ago

Error: ../../../rtl/pulp_soc/rtl/pulp_soc/pulp_soc.sv:355: Found expression without known width in context that requires one

The line is the following:

function logic [NB_CORES-1:0][10:0] CORE_CL_ID_FX();

FrancescoConti commented 4 years ago

The whole block linked below is coded in a non-synthesizable fashion. My opinion is that it should be wholly refactored to make all the localparams defined statically at compile time, e.g. by using a set of static defines and ifdefs.

https://github.com/pulp-platform/pulp_soc/blob/88acbc387aad0f0f5f05bec2f7dbe3871bd5f3fb/rtl/pulp_soc/pulp_soc.sv#L254-L298

bluewww commented 4 years ago

I believe these expressions to be synthesizable (constant expressions in SystemVerilog LRM language), but I guess not all tools agree. Vivado has no complaints.

The author of this is @anga93. I can rewrite it with macros.

bluewww commented 4 years ago

It turns out that you need to declare constant functions before they are used in DC (2019.12). I fixed this in cea40aa529a7dc6328d6a64b490e5740df4bba70 . Please check if it is fixed for you too.

bluewww commented 4 years ago

Fixed in #28