vunit icon indicating copy to clipboard operation
vunit copied to clipboard

Support hierarchical library mapping in ModelSim

Open ThomasWismer opened this issue 4 years ago • 6 comments

The library section of the modelsim.ini file allows to refer to a subordinate INI file using an "others" clause (subordinate files may also contain an "others" clause). The current implementation for collecting all mapped libraries ignores the "others" clause. With this change, all library mappings from all subordinate files are included.

ThomasWismer avatar Oct 30 '21 15:10 ThomasWismer

@LarsAsplund this as been reviewed by Umarcor, I suggest to merge and close.

dalex78 avatar May 10 '22 15:05 dalex78

I think we should probably add a test for this.

LarsAsplund avatar May 13 '22 22:05 LarsAsplund

You are right. I don't mind working on that but I do not understand how the tests work. I guess I need to modify the tests/unit/test_modelsim_interface.py but where are specified the content of the tested modelsim.ini ? If anyone can explain me how the tests are working I would appreciate.

dalex78 avatar May 14 '22 12:05 dalex78

@dalex78 The tests create their own ini files. These doesn't have to be real and complete files but just enough to verify that VUnit handles the files as expected. For example, the test setup creates a file containing a single line: https://github.com/VUnit/vunit/blob/fbb46c60b3b6b150bfaeb6e4fb30afa8ccdaf5a1/tests/unit/test_modelsim_interface.py#L328

Some tests, i.e. https://github.com/VUnit/vunit/blob/fbb46c60b3b6b150bfaeb6e4fb30afa8ccdaf5a1/tests/unit/test_modelsim_interface.py#L257, don't even use valid ini files to verify behavior

In this case you would need to create ini files containing the others clause and verify that VUnit collects the information correctly.

LarsAsplund avatar May 29 '22 07:05 LarsAsplund

As the author of this pull request, I felt obliged to submit a unit test. @dalex78 Thanks anyway for your offer to take on this "burden".

ThomasWismer avatar Jun 04 '22 18:06 ThomasWismer

@LarsAsplund This one might be merged aswell

std-max avatar Nov 04 '22 11:11 std-max