Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Modelsim:- Waveform does not appear on the wave window

Status
Not open for further replies.

srinpraveen

Member level 2
Joined
Dec 2, 2009
Messages
48
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,731
Hi!
I have a perplexing problem and its very irritating. I tried simulating a simple counter in modelsim pe student edition 10.0a. Yesterday the simulation worked and I was able to see the waves in the modelsim wave window after adding the signals to the wave. But today morning after I rebooted my laptop and tried opening modelsim and repeating the same process, I am not able to see any waveform on the wave window.
Here is a checklist of the procedure I followed.
1) I started modelsim.
2) I added counter.v and counter_tb.v to a project.
3) I clicked "Start simulation" in the "Simulate menu"
4) The I clicked my testbench module name under the work directory.
5) Then I clicked on the "Objects" tab and selected all the signals, right clicked, wave, add to wave all the signals in the design.
6) Now when I move to wave tab and click run icon i don't see any of the green waveforms.

This procedure worked yesterday and is not working today. I have enclosed a screenshot of my wave window. Modelsim was installed only 3 weeks back and I don't think there is anything to do with licensing because I tried uninstalling modelsim, reinstalling and repeating the same process but again that was to no effect.

Here is my counter code.

module mod4_counter(clk, reset, start_count, count_value);
input clk, reset, start_count;
output wire [1:0] count_value;

reg [1:0] pre_count_value;

always @ (posedge clk or posedge reset)
begin
if (reset == 1'b1)
pre_count_value <= 2'b00;
else if (start_count == 1'b1)
pre_count_value <= pre_count_value + 1'b1;
else pre_count_value <= pre_count_value;
end

assign count_value = pre_count_value;

endmodule

Here is my counter testbench.
module testbench1;
reg clk, reset, start_count;
wire [1:0] count_value;

mod4_counter mod4_cnt(clk, reset, start_count, count_value);

initial
begin
clk = 0;
start_count = 1'b0;
#10 reset = 1'b1;
#10 reset = 1'b0;
#10 start_count = 1'b1;
#520 reset = 1'b1;
#50 reset = 1'b0;
end

always
begin
#50 clk = ~clk;
end

endmodule

As you can see in the screenshot, the signals have been added on the wave window and run icon clicked. Yet the waveforms do not turn up. Mind boggling indeed and very stressful as I have some deadlines to meet. PLS help.
 

Attachments


Iamventure

Junior Member level 3
Joined
Jun 6, 2007
Messages
30
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,288
Activity points
1,451
Hi the most possible issue could be that the data set is not closed properly.
use dataset close -all
quit -sim

if possible recompile the work folder. (Just right click on work in the libraries tab and select recompile)
Now simulate using vsim only.
Once the vsim is done, add the wave using do wave.do (You can save it from your current wave window itself)
Now give run -all
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,020
Reputation
4,156
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
there are many run buttons and the edit is set to 0ns so maybe you are pressing the button that runs for the period specified in the edit box which is 0.
Try to change it to 100ns or press the run all

Alex
 

srinpraveen

Member level 2
Joined
Dec 2, 2009
Messages
48
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,731
Thanks that was helpful. But earlier I had clicked "run all" and even that didn't work. Now after I reinstalled, invoked modelsim and changed the run length to 1000ns, then the waveforms showed up. First of all, it beats me why the run length got reset suddenly to 0 ns.

But the good thing is I got the waveforms now. Thanks again.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top