Skip to content

Questasim fix exit codes#209

Merged
Risto97 merged 1 commit into
HEP-SoC:developfrom
Risto97:questa_exit_code
Apr 30, 2026
Merged

Questasim fix exit codes#209
Risto97 merged 1 commit into
HEP-SoC:developfrom
Risto97:questa_exit_code

Conversation

@Risto97
Copy link
Copy Markdown
Contributor

@Risto97 Risto97 commented Apr 27, 2026

Questasim does not propagate the exit codes to the CLI after it executes the testbench.
It means that the calls like $fatal(), $error() are ignored by the simulator and not forwarded to the shell.

This leads to difficulties in CI flows as we cannot rely on the exit codes, even if the $fatal() was called the exit code can still be 0.
This pull request should fix that by using a default run.do script instead of inline tcl.

I also added the DO_FILES argument to questasim so that user can pass any number of tcl scripts to execute in place of the default ones.

@mtravaillard can you please check if this breaks any of your flows (in case you use questa), or internal CI pipelines.

@Risto97 Risto97 requested a review from mtravaillard April 27, 2026 18:39
@Risto97 Risto97 added the trigger-gitlab-testing PRs receiving this label automatically trigger the testing workflow on gitlab CI runners. label Apr 27, 2026
Copy link
Copy Markdown
Contributor

@mtravaillard mtravaillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use Questa but it worked correctly on the CI, for 3 different versions of the tool.

Do you think it would be useful to add the DO_FILES argument to other tools (vcs, xcelium ...) or it's not relevant ? Currently they don't use/need do run -all like we do with Questa.

@Risto97
Copy link
Copy Markdown
Contributor Author

Risto97 commented Apr 28, 2026

The other simulators work differently, and I am not sure if its possible to pass tcl scripts when running.
I think its more of a peculiarity of mentor tools.

I will test it a bit more and merge

@Risto97 Risto97 merged commit c6ec10e into HEP-SoC:develop Apr 30, 2026
3 checks passed
@Risto97 Risto97 deleted the questa_exit_code branch April 30, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger-gitlab-testing PRs receiving this label automatically trigger the testing workflow on gitlab CI runners.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants