Questions tagged [modelsim]

ModelSim is a popular simulator and debugging environment for VHDL, Verilog and SystemC. It is used in electronic design automation for development and verification of electronic (mainly digital) modules and systems for implementation on field-programmable gate arrays or integrated circuits.

ModelSim is a product by Mentor Graphics to simulate systems written in one of the hardware description languages (HDLs) VHDL or Verilog or the system-level modeling language SystemC.

Depending on the license, ModelSim offers all or a subset of the following features:

  • Source code editor
  • Compiler
  • Simulator
  • Waveform viewer
  • Interactive debugging such as breakpoints, stepping etc.
  • Signal tracing (dataflow) analysis
  • Code coverage analysis
  • Functional coverage analysis
  • Project file management

ModelSim integrates these features in a single configurable GUI, however, it can also be scripted via the Tcl language and controlled through command-line parameters which allows for automation of simulation and verification tasks.

756 questions
3
votes
2 answers

VHDL - Testbench internal signals

I am spending some time learning about writing test benches to try out on some of the models I have produced. Does anyone know a way to monitor signals that are internal to the architecture of the unit under test. I have tried using LIBRARY…
hoboBob
  • 832
  • 1
  • 17
  • 37
3
votes
1 answer

Why can't I declare a shared variable in the same package as the protected type?

I have a simulation helper protected type, which is declared in a package. An instance of that type is defined in the same package. The code is acepted by GHDL, but not by ModelSim. Is it standard conform? and How can a write a workaround? ** Error…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
3
votes
1 answer

Issue with parameters in Modelsim

Recently I've came across following issue: in Quartus software I've defined my Verilog module as follows: module module_name( input [w1-1:0] in1, input [w2-1:0] in2, output [w1-1:0] out1 ); parameter w1 = 16; parameter…
Qiu
  • 5,651
  • 10
  • 49
  • 56
3
votes
2 answers

Vhdl code simulation

I'm trying to simulate the following code : entity schal is port ( SW : in bit_vector(7 downto 0); LED : out bit_vector(7 downto 0)); end schal; architecture BEHAVIOUR of schal is begin INOUT_PROS : process (SW) begin LED <= SW;…
Engine
  • 5,360
  • 18
  • 84
  • 162
3
votes
1 answer

Error loading design ModelSim 10.1

I'm trying to create a counter using D flip-flop asynchronous resets. It compiles successfully but this is the error I got during the simulation in ModelSim: 'error loading design' And above it, I found four other errors: # ** Error: (vopt-3053)…
Hanieh
  • 325
  • 2
  • 14
3
votes
2 answers

Modelsim simulation starting and ending time

I want to calculate the total execution time that should appear on a Modelsim console by taking the difference between starting time and finishing time. I have one solution but didn't give me a final answer. I am doing set start [clock…
hassan anwar
  • 119
  • 1
  • 2
  • 11
3
votes
9 answers

Reset modelsim editor to the default one

I want to reset my editor to the default one in Modelsim but I don't know how. When I double click on a project it opens in Notepad. I tried to change the value of the editor variable from the "Edit Preferences" tab but it didn't work. I also tried…
kamal
  • 96
  • 1
  • 2
  • 10
3
votes
0 answers

Hierarchical access in Mixed Language Simulation

I have a Testbench that uses VHDL-2008's hierarchical accesses to test the good behaviour of my architecture, which I wrote in VHDL. Like this : TEST_SIGNAL <= << signal uut_0.signal_to_test : std_logic_vector(7 downto 0) >>; This worked great…
DylanM
  • 333
  • 2
  • 5
  • 17
3
votes
1 answer

tf_nodeinfo has been deprecated by IEEE

I would like to use PLI routines that were developed years ago using PLI 1.0. It worked fine before. But when I tried to run using a newer version of ModelSim Verilog simulator, I got the following error message: # ** Warning: (vsim-8668)…
user2756376
  • 117
  • 9
3
votes
4 answers

Changing the modelsim.ini file (ModelSim)

I would like to make a modifications on several parameters in ModelSim like the MessageFormat for instance. To that extent, I made changes to the modelsim.ini file located in ModelSim installation directory but when I re-launch ModelSim, the default…
DylanM
  • 333
  • 2
  • 5
  • 17
3
votes
1 answer

How to execute 'Zoom Fit' in ModelSim/QuestaSim from TCL console?

I'm using ModelSim / Questa-SIM from command line in GUI mode. If ModelSim runs in GUI mode I would like to execute a 'Zoom Fit' from my imported 'wave.do' file. I pass this file to vsim by -do wave.do. Here is the script: add wave * run -all I…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
3
votes
2 answers

Why can't I call a function in a constant declaration, that is defined in the same package in ModelSim?

I have a VHDL package that defines a function (forward declaration) and a constant. The constant's value is calculated by that function, whose body is located in the package body. As of now ModelSim/QuestaSim is the only tool that does not like this…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
3
votes
1 answer

How to define generic value at compile time using Modelsim?

Is it possible to define a generic value at COMPILE time using Modelsim? I need to compile a file that contains generate statements, which are turned off & on based on the value of my generic boolean. I have unsuccessfully tried the following…
AaronDanielson
  • 2,230
  • 28
  • 29
3
votes
2 answers

What happens when there are multiple architectures on a single entity?

Suppose one has an entity which has two architectures defined. Those two architectures work with the same entity (obviously) and subsequently the two set the output pins to different values. My question is, how does the program (simulator) determine…
nettek
  • 213
  • 1
  • 3
  • 13
3
votes
1 answer

Warning: (vsim-7) Failed to open readmem file "mem_content_01.dat" in read mode

I am trying to run a test simulation in ModelSim and am getting the error in the title. I have double checked and the file is in the same location as my project and the names match just fine. Does anyone have any idea what the problem could be?…
aurora91
  • 478
  • 1
  • 9
  • 25