Intel Quartus ModelSim Simulation Guide
Intel Quartus ModelSim Simulation Guide
To compile libraries in ModelSim when not using the Intel-specific version, first navigate to the Quartus installation directory where simulation libraries are located (e.g., C:\intelFPGA_lite\XX.X\quartus\eda\sim_lib). Then, use ModelSim commands such as 'vlib' to create library directories and 'vlog' to compile the libraries like 'altera_primitives.v'. This manual step is necessary because third-party ModelSim versions do not automatically handle library linking like the Intel FPGA Edition does, ensuring that all necessary primitives and components are available for simulation .
The 'vcom' and 'vlog' commands in ModelSim are used to compile VHDL and Verilog files, respectively, as part of the simulation setup. They translate the high-level HDL code into an intermediate form that ModelSim can execute, preparing the simulation environment within the designated 'work' library. These commands ensure that the design files are correctly interpreted and ready for simulation execution .
The 'vsim.do' script file in ModelSim automates the setup and execution of simulations by storing a sequence of ModelSim commands required to initialize the simulation environment. It can include commands to create libraries, map them, compile design files, and run simulations with specific parameters, thus streamlining the workflow and minimizing human error during repetitive simulation tasks .
A user might need to modify the 'modelsim.ini' file manually in scenarios where the default ModelSim installation does not include certain configurations or paths needed for simulation. This could occur when using a separate ModelSim installation where default library paths are incorrect or missing. Manually editing 'modelsim.ini' allows users to configure specific library mappings, simulation directories, and environment settings, ensuring that ModelSim can properly locate and use the right files and libraries .
The command 'add wave *' in ModelSim adds all the signals to the waveform window for observation during a simulation. It integrates into the simulation process by allowing users to visually inspect the signal changes over time, aiding in debugging and analysis of the circuit's behavior. This visual representation is crucial for understanding timing relationships and logic errors, making it an essential part of the simulation analysis .
Environment variables play a critical role in customizing the setup process for ModelSim when not using the bundled Intel FPGA Edition. For a separate installation of ModelSim, users need to manually set the environment variables using the modelsim.ini file by locating it in the installation directory and making it writable. Then, specific paths like those in "Advanced system settings" should be set, which enables ModelSim to locate necessary support files, potentially resolving issues if automatic configurations fail .
Functional simulation is used to verify the logic and behavior of the design without any timing delays, focusing on logic correctness as described in the HDL code. In contrast, timing simulation considers the delays introduced by logic synthesis and place-and-route processes, providing a more realistic simulation by including timing information. When using Quartus to generate netlists, the user sets the simulation model type to either 'Functional Simulation' or 'Timing Simulation', and accordingly, different files are used for the simulations in ModelSim .
Using 'run –all' in ModelSim commands the simulator to continue the simulation until all events are processed or a stop condition is encountered. This is useful in scenarios where the entire behavior or convergence of a design needs to be observed without manually specifying simulation time bounds. It simplifies the process, particularly in extensive test setups, where capturing the complete set of interactions is necessary for validating the design .
The guide recommends using ModelSim-Intel FPGA Edition if available because it offers automatic handling of library links, reducing the configuration required by the user. This seamless integration avoids potential compatibility issues and ensures that simulations can be set up more efficiently without manual errors .
To set up a simulation directory in Quartus for ModelSim, open a Quartus project and navigate to Assignments, then Settings, followed by EDA Tool Settings, and select Simulation. Set the tool name to ModelSim-Altera or Intel FPGA Edition and specify the HDL format. The default simulation directory is '/simulation/modelsim', where Quartus will generate the necessary simulation setup scripts and netlists, such as 'vsim.do', which facilitates the simulation process in ModelSim .