Seguindo o tutorial da ALTERA para o MODELSIM

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar

Este tutorial ensina como utilizar o Modelsim para realizar a simulação funcional e também temporal. É requisito para a realização do tutorial o acesso ao software Quartus II e Modelsim ou Modelsim-ALTERA.

PASSO 1

/opt/altera/13.0sp1/modelsim_ase/bin/vsim
  • Para usar o ModelSim 10.1d no LabProg abra um terminal e digite:
/opt/altera/13.0/quartus/modelsim_ase/linux/vsim

PASSO 2 - Functional Simulation with ModelSim

Creating a Project
  • To create a project in ModelSim, select [File > New > Project...]
project name = serial_adder,
project location <= <subdiretorio do usuário>/Using_ModelSim/functional
default library name <= tutorial
copy settings field.
click [OK]
  • Since the file for this tutorial exists, click Add Existing File and select serial.vhd file.
  • Once the file is added to the project, it will appear in the Project tab
  • click [Close]
Compiling a Project

Compilation in ModelSim checks if the project files are correct and creates intermediate data that will be used during simulation.

  • select [Compile > Compile All]. A green check mark will appear to the right of the serial.vhd file in the Project tab.
Simulation
  • Put Modelsim in simulation mode by selecting [Simulate > Start Simulation...]
  • The window to start simulation consists of many tabs. For the purposes of the functional simulation, we only need to look at the Design tab.
  • In the Design tab you will see a list of libraries and entities you can simulate. In this tutorial, simulate a entity called serial.
  • To select this entity, scroll down and locate the tutorial library and click on the plus (+) sign.
  • You will see three entities available for simulation: FSM, serial, and shift_reg. Select the serial entity (Design Unit(s) = tutorial.serial) and click [OK] to begin simulation.