Forum Discussion
ModelSim_FA
This is a well-known pain point in the Quartus + ModelSim NativeLink flow, and there are a couple of things happening that explain what you're seeing.
**There is actually a documented bug in Quartus Prime Lite 22.1**
Due to a problem in the Quartus® Prime Lite Edition software version 22.1, you may see an error when running the NativeLink simulation flow:
"Sourced NativeLink script .../quartus/common/tcl/internal/nativelink/modelsim.tcl missing"
The workaround is to download and replace the `qnativelinkflow.tcl` file located at the `/quartus/common/tcl/internal/nativelink` directory, then relaunch the simulation. This problem is fixed beginning with Quartus® Prime Lite Edition version 23.1. Sourced NativeLink script /quartus/common/tcl/internal/nativelink/modelsim.tcl missing"
This bug can cause the NativeLink flow to silently fall back to stale simulation artifacts, which would explain why your changes never seem to take effect.
**How ModelSim actually references your HDL**
ModelSim doesn't simply read your source `.v`/`.vhd` files directly at simulation time — it compiles them into its own library directories first. The simulation tool bundled with Quartus Prime Lite Edition is Questa* – Altera FPGA Starter Edition. Intel Quartus Prime Standard Edition User Guide Platform Designer The generated setup script that drives this is `msim_setup.tcl`. The `mentor/` directory contains a ModelSim script `msim_setup.tcl` to set up and run a simulation. Intel Quartus Prime Standard Edition User Guide Platform Designer When you invoke the NativeLink flow, Quartus regenerates this script and the compiled library targets — but if the 22.1 bug is preventing the script from being sourced correctly, the old compiled libraries are what ModelSim sees.
**How to force ModelSim to pick up your changes — without a new project**
- First, fix the 22.1 bug by applying the
qnativelinkflow.tclpatch referenced above, or upgrade to 23.1 where it's resolved. - After every Quartus recompilation, don't just reload in ModelSim — you must re-run the full simulation setup script. To compile the design and generate the
.dofile, click Processing > Start Compilation. The Messages window indicates when compilation is complete. Then click Tools > Run Simulation Tool > RTL Simulation ModelSim – FPGA Edition Simulation Quick-Start Quartus Prime Standard Edition — this re-invokes the NativeLink flow, regenerates the.do/msim_setup.tcl, and recompiles your updated HDL into ModelSim's work library from scratch. - If running from the ModelSim command line, re-source the generated
mentor/msim_setup.tcl(or re-execute the.dofile) rather than just doing arestartorreload. Arestartonly re-runs the simulation on already-compiled library contents — it does not recompile changed source.
**Bottom line:** The 22.1 NativeLink bug is almost certainly the root cause. Apply the `qnativelinkflow.tcl` fix, then always trigger re-simulation via **Tools > Run Simulation Tool > RTL Simulation** in Quartus (not Restart inside ModelSim) after any source change — that's what forces a full recompile into fresh library directories.
Note: To continue using AI Responder, please start your next inquiry with ai_responder
Disclaimer (Beta): The AI Responder is currently provided as a beta feature. AI-generated responses may contain errors or omissions. Please verify technical guidance with official Altera documentation before implementation.
Thank you very much.