Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17255 Discussions

# Invalid time string specified: in ModelSim

Altera_Forum
Honored Contributor II
6,059 Views

I'm using ModelSim Altera Starter Edition 6.6 for simulating some very simple designs. I started a new project, compiled and everything was ok. But when I had wanted to start simulation, I have opened the wave window and all I get is:# Invalid time string specified: and the wave window is just a big grey window. 

Even an other project that I had already simulated stopped working. I tried deleting some configuration files and nothing. I reinstalled the whole software and still nothing. 

Searching on google and on the forums I even found some threads of people with similar problems, but none got a solution. 

 

And I wanted also to ask why Altera changed the simulator integrated in Quartus II 9.1 for ModelSim. I used the 9.1 version for a while and it was so much easier to simulate. What does ModelSim offer that Quartus couldn't handle? 

 

Thanks, 

Daniel K. Franch
0 Kudos
18 Replies
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

# Invalid time string specified 

 

--- Quote End ---  

If you are simulating Verilog, then try adding '-t ps' to the vsim command line to set the timescale to 1ps. You might also want to add something like 

 

`timescale 1 ps / 1 ps 

 

to your Verilog. 

 

 

 

--- Quote Start ---  

 

What does ModelSim offer that Quartus couldn't handle? 

 

--- Quote End ---  

A programmable method of generating a testbench. Drawing stimulus waveforms works for only the simplest of testbenches. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

you should also get more stimulus reuse when using HDL/C/etc test benches

0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

Actually, I'm simulating VHDL. I tried adding -t ps to the command line, but it didn't work. It still gives me that message and a grey window when I try to open the wave window. 

 

I guess as I am testing very simple projects, ModelSim seems over-complicated to me. But I probably should learn how to use it know, for it will be easier when I try to simulate more complex projects.
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

I'm simulating VHDL. 

 

--- Quote End ---  

 

 

Post your code. 

 

 

--- Quote Start ---  

I guess as I am testing very simple projects, ModelSim seems over-complicated to me. But I probably should learn how to use it know, for it will be easier when I try to simulate more complex projects. 

--- Quote End ---  

 

 

Its worth learning. 

 

There's an example at this thread you can use: 

 

http://www.alteraforum.com/forum/showthread.php?t=32386 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

My code is the following: 

entity ex_or is port(a,b,c,d : in bit; x,y,z : out bit); end ex_or; architecture a of ex_or is begin x <= a xor b; y <= a xor b xor c xor d; z <= (a and b) xor (c and d); end a;  

It is just an exercise from a Digital Electronic book, from the chapter of XOR gates. I'm just trying to get used with VHDL. 

 

I already simulated an equally simple code to test AND and OR gates and it worked yesterday. But when I try to do it now, I get the same result. 

 

I will take a look in this example, it seems useful. Thanks. 

 

--- 

 

Edit: I just tried the example and got the same thing: Invalid time string specified, grey wave window. It doesn't seem to be something with code, but in some configuration or command.
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

Don't use the same architecture name as a signal or port or component name. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

Just changed that, but still no luck.

0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

Just changed that, but still no luck. 

--- Quote End ---  

 

 

Try the modelsim simulation I sent you the link to. See if that works. 

 

That'll at least tell you the tools are setup ok. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

Try the modelsim simulation I sent you the link to. See if that works. 

--- Quote End ---  

 

 

I used your simulation, just as it was described on the readme file, and got the grey wave window all over again.  

 

 

--- Quote Start ---  

 

That'll at least tell you the tools are setup ok. 

--- Quote End ---  

 

 

So the problem probably isn't the code, but the tools?
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

I used your simulation, just as it was described on the readme file, and got the grey wave window all over again.  

 

So the problem probably isn't the code, but the tools? 

--- Quote End ---  

 

 

Sounds like it. 

 

When you get a grey wave window, do you get the time string error? 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

Sounds like it. 

 

When you get a grey wave window, do you get the time string error? 

 

--- Quote End ---  

 

 

Yes. They both come always together. And show up when I go on View>Wave.
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

Look at the sim.tcl script, and implement each step manually. eg., vcom, then vsim, and then type 'add wave *' to add all the waveforms to the wave window. 

 

Does that work? 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

I wen through sim.tcl step by step. All worked fine, until I the vsim command. It instantly opens the wave window and I get that same old error. I try to close the window and start typing the commands on example_tb.do but on the first one (quietly WaveActivateNextPane {} 0) it tries to open wave window again and I get the error once more.  

 

Is this a problem with vsim? 

 

--- 

 

Edit: I tried closing the wave window everytime it appeared after a command, but that doesn't seem to help. I can't see anything this way. It seems to be something specific to the wave window.
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

I wen through sim.tcl step by step. All worked fine, until I the vsim command. It instantly opens the wave window 

 

--- Quote End ---  

 

 

I've never seen the wave window open up when using the vsim command. Perhaps there is come configuration file that has been screwed up - is there a modelsim.ini file in your local directory? Delete it. 

 

 

--- Quote Start ---  

 

I try to close the window and start typing the commands on example_tb.do but on the first one (quietly WaveActivateNextPane {} 0) it tries to open wave window again and I get the error once more.  

 

--- Quote End ---  

 

 

Look at the script again, the procedure example_tb just runs a couple of commands, i.e., essentially 

 

vsim -novopt -gWIDTH=$WIDTH example_tb do scripts/example_tb.do run -a  

 

You don't type in the contents of the example_tb.do file, you just source it, and it will open the wave window. 

 

Take a screen shot of what you are seeing and post it. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

Wave window shouldn't appear automatically? Awkward. It does. This way: 

http://img252.imageshack.us/img252/1697/invalidtimestringspecif.png 

 

I tried just sourcing example_tb.do also, but got the same result. 

 

I searched for a modelsim.ini but I haven't found it. I will try looking for something like that on the ModelSim folder. 

 

--- 

Edit: I am now on my Linux partition. I will try installing Quartus and ModelSim here to see what I get.
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

Well... I tried installing ModelSim in my Linux partition but that was even worse. I couldn't even run it. I guess that's because I'm running on a 64-bit processor and ModelSim doesn't have a 64-bit version for Linux. 

So I tried uninstalling everything related to Altera in Windows, and then reinstalling Quartus II and ModelSim, everything updated to the last version. 

 

And I still get the same thing. I have absolutely no idea about what's going on. I'm just trying to get a hang on the basics of FPGAs and VHDL and the tools associated with them, but I'm getting a real bad headache with ModelSim. I'm kind of losing hope about using it. What is a good substitute for it (I guess there is some alternative to it)? 

 

--- 

 

Edit: oh, I found the modelsim.ini in my folder, but that didn't change anything too.
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

 

--- Quote Start ---  

I'm getting a real bad headache with ModelSim. I'm kind of losing hope about using it. 

--- Quote End ---  

I've never had a problem with Modelsim under Linux or Windows. 

 

How about this; 

 

1) Download and install VirtualBox 

 

2) Download and install Ubuntu 11.10 VirtualBox. I prefer the older Gnome interface, so follow this: 

 

http://www.virtualhelp.me/linux/470-install-gnome-in-ubuntu-1110-oneiric-ocelot 

 

3) Install Quartus and then Modelsim Altera-Starter-Edition 

 

Just to be on the safe side, start with a 32-bit OS and 32-bit versions of the tools. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
4,613 Views

I got the same error with version 10.c. Deleting the Registry did not work for me. But I could solve it by going to the GUI, Simulate>start Simulation, and changing the resolution to anything other than "default". Then restart ModelSim and it should work.

0 Kudos
Reply