Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Verilog internal signals simulation

Status
Not open for further replies.

nag123

Member level 1
Joined
Jun 11, 2007
Messages
33
Helped
6
Reputation
12
Reaction score
1
Trophy points
1,288
Activity points
1,543
modelsim invisible waveform

Hi all,

I am new to verilog. I have implemented a mux and testbench in verilog. I simulated the design. but no signal is displayed in object window to watch. I couldn't even see the mux component instantiation. Can you help me?
Here is the code

module mux(q, in1, in0, s);
output q;
input in1, in0, s;

wire tmp;

assign q = in1 & s | in0 & (!s) ;

assign tmp = in1 & s;

endmodule





module top;

wire q;
wire in1,in0, s;

reg in1i, in0i, si;

mux mux0(.q(q), .in1(in1i), .in0(in0i), .s(si));

initial
begin
in1i = 1'b0;
in0i = 1'b1;
si = 1'b0;
end

always
begin
#10 in1i = !in1i;
#50 in0i = !in0i;
#20 si = !si;
end


assign in1 = in1i;
assign in0 = in0i;
assign s = si;


endmodule
 

modelsim invisible signals

To clarify, are you trying to learn how to operate the simulator?
Which simulator are you using? How are you launching it?

Assuming you are using ModelSim and your file is named top.v, try these commands from your operating system command prompt:
vlib work
vlog top.v
vsim top


Now run these commands from the ModelSim command prompt:
add wave -recursive *
run 500


You should see several waveforms.
 

modelsim vopt assign problem

I am using modelsim. The problem is signals are not displayed in object window. Mux component is not visible in workspace.

I simulated using this command
vsim top.v

add wave recursive *

" No objects found matching "*" " message displayed.
 

Please type carefully.

Instead of this: vsim top.v
Try this: vsim top

Instead of this: add wave recursive *
Try this: add wave -recursive *

Just in case your version of ModelSim doesn't support "-recursive", also try this: add wave *

If you still have no luck, then maybe your ModelSim installation isn't complete somehow. Are you able to run any other simulations successfully?
 

thanks
The problem is modelsim simulator is optimizing and removing internal signals and blocks. It's defaultly setting vopt command to 1 in ini file. so i couldn't see any signals in object window.
now i set voptflow to 0 in ini file. its working.
 

Ok, you may have different default settings than mine. I use optimization without problems. Also, the problem could be version dependent. ModelSim made some changes recently to optimization and waveform display. I have version 6.3c.

Also try this ModelSim command before running the simulation: log -r /*
I don't fully understand it, but it has helped some folks see previously invisible waveforms.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top