Forum Discussion

6 Replies

  • Hi Njoroge, 

    Regarding the solution provided in the link, here are some suggestions on how to run it:
    1. Command Prompt (cmd)
    If you are running the simulation from a Windows Command Prompt or Questa Command Shell, you may launch the simulation using:
    vsim -c <module to stimulate> -ldflags "-lws2_32" -64

    2. Questa Transcript Window (GUI mode)

    If you are running the simulation from the Questa GUI, you may enter the command directly in the Transcript window. In this case, the -c option is not required.

    3. Simulation Script 
    If you are using a .do, msim_setup.tcl, or run_msim.tcl script, you may locate the vsim command in the script and add the necessary parameter to that command.

    Please feel free to let me know if you have any issues or questions after trying the above suggestions.

    Regards, 
    Zi Ying 

  • Hi Njoroge​ 
     

    I just wanted to check whether you received the private message I sent earlier.

    Due to a system issue on my side, I’m unable to see the message in our internal tools, so I’m not sure if it was delivered successfully.

    The message contained the information below regarding the ld and ld_debug simulation flows and the vsim command updates.
     

    Hi Njoroge,
     

    Thanks for the detailed information. You've done a great job, and I really appreciate the effort you put into documenting and sharing all the steps you've taken so far. It was very helpful.

    Based on the documents (AN 985: Nios V Processor Tutorial), there are 2 commands, which are ld and ld_debug. Both of them will calling different simulation flow. Hence, you will see 2 separate instance of the vsim commnd in the msim_setup.tcl. 

    Just as a quick update to prevent confusion, the documentation is expected to be revised in the future release. 

    In the elab_debug section, the statement:

    "Elaborates the top-level design with the novopt option"

    The novopt will be updated to -voptargs=+acc, since novopt is no longer being used.
     

    Likewise, in the ld_debug section, the description:

    "Compiles all the design files and elaborates the top-level design with the vopt option"

    The vopt will be updated to -voptargs=+acc as well.

    To answer on your question on which vsim should be modify, based on the tutorial, if you are using ld_debug command, it is an alias that calls dev_com -> com -> elab_debug

    In this case, the vsim command that needs to be modified is the one inside the elab_debug alias. Hence, the updated command will be eval vsim -voptargs=+acc -ldflags "-lws2_32" -64 $elabcommand


    Alternatively, if you want to try on ld command, then you may modify the vsim command defined in the elab alias instead. Then, the updated command will be eval vsim -ldflags "-lws2_32" -64 $elabcommand

    The main difference between these two vsim commands is the -voptargs="+acc". The +acc argument enables full signal visibility during simulation, preventing signals from being optimized away and making them accessible for debugging, waveform viewing, and signal tracing.

    Could you please try the suggested changes and let me know the outcome? If you run into any issues or have any questions, feel free to share the details and I'll be happy to help further.

    Regards, 
    ZiYingE_Altera
     

    When you have a moment, could you please confirm whether you received it?  Due to the issue on my side, I just want to make sure the message and attachment came through successfully. Thanks and appreciate for your understanding! 


    Regards,
    ZiYingE_Altera

    • Njoroge's avatar
      Njoroge
      Icon for Occasional Contributor rankOccasional Contributor

      Hi ZiYingE,

      I received your solution and applied it but the error persists. I did reply to you in the inbox discussion we were having.

      Here's the changes I made:

      Here's the transcript window of Questa after ld/ld_debug:

      Regards.

    • ZiYingE_Altera's avatar
      ZiYingE_Altera
      Icon for Contributor rankContributor

      Hi Njoroge,
       

      Thank you for sharing the latest log.
       

      Based on the log, the current issue appears to be that the GCC 6.3.0 compiler located at: C:\MinGW\bin\g++.exe  is unable to successfully link vsim_auto_compile.dll against the Questa 2024.1 libraries. From the transcript, it appears that Questa is picking up this external MinGW compiler from your system PATH rather than using its bundled GCC compiler.
       

      To help further troubleshoot the issue, could you please provide the following information?

      1. Which Quartus version are you currently using?
       

      2. Could you check whether your Questa installation includes a bundled GCC compiler? If available, please try using the bundled GCC compiler instead.

      Please look for a path similar to:

      <Questa_install_dir>\gcc-<version>-mingw64<variant>\bin\g++.exe
      For example: 

      C:\questasim64_2024.1\gcc-10.3.0-mingw64vc16\bin\g++.exe or 

      questa_fse\gcc-7.4.0-mingw64vc15\bin\g++.exe
      If available, please let me know the exact path too. 

      3. Once the bundled GCC compiler is located, could you try updating the vsim command to explicitly use it via the -dpicpppath option?
      For example: eval vsim -voptargs=+acc -dpicpppath "<path_to_bundled_g++.exe>" $elabcommand
      a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; }

      Note: If your DPI code does not use:

      #include <winsock2.h>
      then you may also try removing: -ldflags "-lws2_32" -64 and rerunning the simulation.

      Regards, 
      ZiYingE_Altera

      • Njoroge's avatar
        Njoroge
        Icon for Occasional Contributor rankOccasional Contributor

        Hi ZiYingE_Altera,

        The solution is actually much easier than that. What I had was the 32-bit Mingw installed. All I did was remove it and install the 64-bit version using msys tools and then set the environment variable to point to the bin folder. It worked right away.

        I am on Quartus Pro 25.3 and there is no gcc compiler bundled with Questasim on my system.

        I believe the problem has been solved so I appreciate the help. Thank you.