vunit icon indicating copy to clipboard operation
vunit copied to clipboard

Fix warning "(vcom-1246) Range 1 to 0 is null" for Modelsim/Questa.

Open tasgomes opened this issue 10 months ago • 5 comments

This is a minor fix to avoid unnecessary warnings with Questa and Modelsim.

tasgomes avatar Mar 06 '25 09:03 tasgomes

I also once needed a null vector and I also reported a similar issue: https://github.com/VUnit/vunit/issues/993 I was just wondering if this trick can be used for almost all null vector cases? Sry, for hijacking this PR. 😬

nselvara avatar Apr 22 '25 08:04 nselvara

I would say that yes it can. At least for me, I was able to solve this kind of warnings for Modelsim and Questa using this approach.

tasgomes avatar Apr 22 '25 11:04 tasgomes

Thx for the reply. I think then the feature is almost not needed really. Those warnings are for real very annoying...

nselvara avatar Apr 22 '25 13:04 nselvara

I have to disagree on the "almost not needed really", specially if we can fix a warning with very low effort like this one. I would rather have a compilation with zero warnings than having avoidable ones that could "hide" important warnings that shall be addressed.

tasgomes avatar Apr 22 '25 13:04 tasgomes

Yeah, I agree with you - removing those useless warnings improves the debugging experience. Btw, I actually meant the null vector as a useless feature. However, I'm not sure if yours could be used in every (corner) case.

nselvara avatar Apr 23 '25 08:04 nselvara