Add get_simulator_name() to ui#610
Add get_simulator_name() to ui#610kraigher merged 1 commit intoVUnit:masterfrom LukasVik:get_simulator_name
Conversation
|
Hi @LukasVik! Taking https://github.com/VHDL/Compliance-Tests/blob/master/run.py as a reference, might this work? from vunit.sim_if.factory import SIMULATOR_FACTORY
SIMULATOR_FACTORY.select_simulator().name |
|
It is probably good to have this on the public api. I avoided it before to not exclude running tests for multiple simulators in the same run. I do not think that will happen or is so important though so we can merge this. |
|
Thanks for the tip @eine. I really like you avatar. Monkey Island is great.
I agree. The design pattern is probably common enough among VUnit users that it makes sense to add to the public api. While I realise we don't want to clutter the api, this makes it more convenient than the previously available solution. Thanks for merging! |
Thanks! You are actually the first one that made a reference to it ;)
It is! |
In my
run.pyI want to do different things depending on what simulator the user is running. That might be things like using different locations for precompiled simlib, not adding some sources when using ghdl, etc.This PR is a suggestion for a simple interface that solves my use case. Feel free to provide feedback.