New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Questa qrun/QIS flow #3306
base: master
Are you sure you want to change the base?
Conversation
If we're OK with the flow in general I'll add the same commands to the runner as well (probably in a separate PR). |
@imphil Yeah sure, thanks for you efforts. I am looking into this and testing it now, I will update you once I am done |
Needs a newsfragment. |
Thanks for your efforts @imphil, It is working well, the info messages also are great and keep the user aware of the changes done. also variables names looks better now. We are OK with this, you can go head. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. After the newsfragment of course.
Sorry, can we add the python architecture check again to Makefile.questa-qrun, I assumed user will point to only one binary and forgot the case when user has both 32 and 64 binaries in same path, this should not impact anything else. |
b3b508c
to
01fb79f
Compare
Updated to include the 64b switch as proposed as well as a newsfragment. I'll wait with merging until we have Questa 2023 in CI (currently blocked for unrelated test failures). |
01fb79f
to
e0e12dc
Compare
OK, we now got Questa 2023.2 in CI, together with Questa 2022.4. All tests pass with 2022.4 using the +acc old flow. Unfortunately, a number of tests fail with the new QIS/Qrun flow:
The failures look on first sight like differences in signal visibility due to the QIS flow. @AbdouTharwat Can you reproduce these test failures with this PR? You should get the same failures if you run the tests against Questa 2023.2, as described at https://github.com/cocotb/cocotb/blob/master/CONTRIBUTING.md#running-tests-locally. I can try to piece together steps to reproduce these failures and file an issue with Siemens, but you're probably in a much better position to do so. Let me know if you need further input from my side. |
Thanks @imphil, I have reproduced these 4 test failures and filed an issue. We are now looking into this |
So what can we do for now to get this in for 1.8? Do we add conditionals for both version and whether the qrun mode is used? We can only really detect if we are using qrun if use the environment variable, but perhaps that's fine here since this is a part of the regression where we are only using makefiles (for now). |
I'd just leave this out of 1.8, we're not ready yet to move users over to the new flow without regressions. Users can still use the older flow until we understand the regressions better. |
Hello @imphil, after having a look on the failures you mentioned I have some observations: in test_iteration_verilog --> testcase: recursive_discovery
in test_iteration_mixedlang --> testcase: recursive_discovery
in test_iteration_vhdl (FLI) --> testcase: recursive_discovery
in test_array --> testcase: recursive_discovery
We are investigating other issues of:
|
Why are we even trying to discover always, initial, and function blocks? |
Updated Makefile for Questa simulator to use the new flow QIS and qrun instead of +acc and vlog/vsim respectively. Also using Visualizer instead of the classic GUI for Live simulation and adding option for Visualizer post simulation mode By Default Questa runs in batch mode, to enable Live SIM mode set GUI=livesim, to enable Post SIM mode set GUI=postsim Added vis cmd for Visualizer beside vsim cmd for Post SIM mode, and added same checks for the cmd as vsim Changed way of invoking Questa from running .DO file into directly invoking Questa from bash/shell terminal VSIM_ARGS and other variables kept untouched for backward compatibility, also SCRIPT_FILE is kept for user custom DO file Added more variables for new design.bin and qwave.db file names for user custom preferences Fixes cocotb#2852
The FLI library is now always built (because we ship the required headers), there's no need to check for that in the Makefile any more.
The custom flows documentation for Questa is already quite minimal, keep it that way and only mention the existence of qrun.
Ensure the VHDL_GPI_INTERFACE environment variable is set, even if this variable is not explicitly set in the environment, but only as a default make variable.
Add a cocotb-internal environment variable, COCOTB__QUESTA_MODE to indicate if the simulation is using the QIS/Qrun flow, or the compat flow. This variable is for use by cocotb and its tests only, hence the double underscore name.
e0e12dc
to
c9d729c
Compare
@AbdouTharwat Thanks for looking into the fails, much appreciated! I pushed a number of commits to address some of the issues that you found plus a couple more, most notably:
TODOs:
|
History, I guess :-) I don't think we have much use for these blocks ultimately. |
c9d729c
to
44809a3
Compare
The QIS/Qrun flow discovers more objects, notable vpiAlways objects. Adjust the test expectations to reflect that.
44809a3
to
9f06918
Compare
I looked at the runs and that's what I'm getting with the QIS/Qrun flow with Questa 2023.2: VHDL-VHPI
VHDL-FLI
Verilog-VPI
|
Hi @imphil, Regarding the VPI tests, there are some observations: test_array
50.00ns INFO cocotb.test ------Found HierarchyObject(array_module.asc_gen[20].#ALWAYS#182) (GPI_MODULE) Reviewing analog_module.sv we find:
In conclusion it appears that QIS shows objects that were not shown by old flow but are correct as shown above test_cocotb_arraythe test was run with LOG_LEVEL DEBUG and for the 3 mentioned tests test_in_vect_packed_packed_unpacked, test_in_arr_packed_unpacked, and test_in_2d_arr_unpacked it appears that old flow failed to find handle for those while new QIS flow succeeded. I am attaching the debug log for the 3 tests both in QIS flow and +acc flow so you can have a look Reviewing the test_cocotb_array.py file we find 3 comments at lines 85, 125, 154 stating that Questa is unable to access elements of a logic array if the last dimension is unpacked (gh-2605) which means it is an open issue and it appears to be solved with new QIS flow In conclusion it appears that these tests were failing earlier but works well with QIS flow. So they should be modified now that QIS flow is able to access those elements, do you agree? Finally regarding FLI and VHPI failures, we already opened issues for those and are being investigated, so we are on track. Thanks, |
@AbdouTharwat I'm going to fix #3353 then this back and forth should be moot. |
Support the qrun/QIS flow in Questa in the Makefile flow
v2 from #3274:
@AbdouTharwat I kept the original commit attributed to you, since you did the majority of the work. Thank you for it! Can you please have a look and give it a try?
Patches: