Forum Discussion
Quartus Pro 22.2 SystemVerilog: argument of size should be an identifier
- 4 years ago
Hi,
Check this https://www.intel.com/content/www/us/en/docs/programmable/683236/22-2/verilog-and-systemverilog-synthesis-support.html so latest SystemVerilog supported is SystemVerilog-2012. Then can refer to IEEE Standard 1800-2012 check here http://www.ece.uah.edu/~gaede/cpe526/2012%20System%20Verilog%20Language%20Reference%20Manual.pdf (page 604) under section 20.7 Array querying functions. You can see array_identifier is mentioned. There are some examples under that section as well for your reference.
This code can be synthesized in simulator. I tested in Questa Starter Edition with no problem. So means this is something supported in testbench. If so should be no problem too as testbench normally is not included in Quartus tool for compilation. Vivado 2021.2 still fails to synthesize $size but able to synthesize $bits. Check the images attached.
Thanks,
Best Regards,
Sheng
Hi,
Probably need to do something like below for example:
byte Dynamic_array[4] = {2'b0, 2'b0, 2'b0, 4'b0};
...
.DATA_WIDTH ( $size(Dynamic_array) )
Best Regards,
Sheng
p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution and give Kudos.
- alexislms4 years ago
Contributor
Your example is wrong.
Please report the bug to the Quartus' dev team.
Regards,